/* MCW Write A Review — button + modal.
 * Button visual matches the .mcw-pr__more / .mcw-button outline style.
 * Modal uses backdrop + slide-in dialog with focus trap (JS-driven).
 */

.mcw-wr.mcw-wr {
	box-sizing: border-box;
	width: 100%;
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, BlinkMacSystemFont, sans-serif;
	color: #050101;
}

.mcw-wr.mcw-wr *,
.mcw-wr.mcw-wr *::before,
.mcw-wr.mcw-wr *::after {
	box-sizing: border-box;
}

.mcw-wr.mcw-wr--align-left   { text-align: left; }
.mcw-wr.mcw-wr--align-center { text-align: center; }
.mcw-wr.mcw-wr--align-right  { text-align: right; }

/* ---------- Button ---------- */
.mcw-wr.mcw-wr .mcw-wr__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	background: #ffffff;
	color: #050101;
	border: 1px solid #050101;
	border-radius: 0;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: capitalize;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mcw-wr.mcw-wr .mcw-wr__btn:hover,
.mcw-wr.mcw-wr .mcw-wr__btn:focus-visible {
	background: #050101;
	color: #ffffff;
	outline: none;
}

.mcw-wr.mcw-wr .mcw-wr__btn--small  { padding: 10px 20px; font-size: 12px; }
.mcw-wr.mcw-wr .mcw-wr__btn--medium { padding: 14px 28px; font-size: 13px; }
.mcw-wr.mcw-wr .mcw-wr__btn--large  { padding: 18px 36px; font-size: 14px; }

.mcw-wr.mcw-wr .mcw-wr__btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.mcw-wr.mcw-wr .mcw-wr__note {
	margin: 8px 0 0;
	font-size: 11px;
	color: #6b6e70;
}

/* ---------- Modal ---------- */
.mcw-wr.mcw-wr .mcw-wr__modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.mcw-wr.mcw-wr .mcw-wr__modal.is-open {
	display: flex;
}

.mcw-wr.mcw-wr .mcw-wr__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.mcw-wr.mcw-wr .mcw-wr__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 48px);
	background: #ffffff;
	border-radius: 0;
	overflow: auto;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	/* Reset alignment so the modal content reads left-to-right even when
	 * the host widget is align-right / align-center. */
	text-align: left;
}

.mcw-wr.mcw-wr .mcw-wr__head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 64px 20px 24px; /* right padding makes room for close button */
	border-bottom: 1px solid #e6e6e6;
}

.mcw-wr.mcw-wr .mcw-wr__title {
	margin: 0;
	font-family: "Ivy Mode", "Cormorant Garamond", Georgia, serif;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.2;
	color: #050101;
}

/* Close pinned to the top-right corner — visible above the dialog header
 * regardless of how the host theme styles <button>. Specific selectors +
 * a couple of !important guards win against generic theme button rules. */
.mcw-wr.mcw-wr .mcw-wr__close {
	position: absolute !important;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	color: #050101 !important;
	border: 1px solid transparent !important;
	border-radius: 0 !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
	line-height: 1;
}

.mcw-wr.mcw-wr .mcw-wr__close svg {
	display: block;
	width: 16px;
	height: 16px;
	color: inherit;
}

.mcw-wr.mcw-wr .mcw-wr__close:hover,
.mcw-wr.mcw-wr .mcw-wr__close:focus-visible {
	background: #f3f3f3 !important;
	border-color: #050101 !important;
	outline: none;
}

.mcw-wr.mcw-wr .mcw-wr__body {
	padding: 28px 32px 32px;
}

.mcw-wr.mcw-wr .mcw-wr__closed {
	margin: 0;
	font-size: 14px;
	color: #6b6e70;
}

/* ---------- Form layout — vertical rhythm ----------
 * 24px between every visible section. Block layout (not flex) so
 * the trailing hidden inputs / scripts don't punch empty gap slots
 * into the column. Targeted selectors keep the rhythm exact. */
.mcw-wr.mcw-wr .comment-form {
	display: block;
}

.mcw-wr.mcw-wr .comment-form > p,
.mcw-wr.mcw-wr .comment-form > div,
.mcw-wr.mcw-wr .comment-form > fieldset {
	margin: 0 0 24px;
}

/* Hidden + non-visual rows shouldn't claim spacing. */
.mcw-wr.mcw-wr .comment-form > script,
.mcw-wr.mcw-wr .comment-form > input[type="hidden"],
.mcw-wr.mcw-wr .comment-form > p:empty {
	display: none;
}

.mcw-wr.mcw-wr .comment-form > p.form-submit {
	margin-bottom: 0;
	margin-top: 0;
}

/* ---------- Labels ---------- */
.mcw-wr.mcw-wr .comment-form label,
.mcw-wr.mcw-wr .comment-form-rating label {
	display: block;
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #050101;
	margin: 0 0 10px;
}

.mcw-wr.mcw-wr .comment-form label .required {
	color: #050101;
	margin-left: 2px;
}

/* ---------- Inputs / select / textarea ---------- */
.mcw-wr.mcw-wr .comment-form input[type="text"],
.mcw-wr.mcw-wr .comment-form input[type="email"],
.mcw-wr.mcw-wr .comment-form input[type="url"],
.mcw-wr.mcw-wr .comment-form select,
.mcw-wr.mcw-wr .comment-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 14px 16px;
	background: #ffffff;
	color: #050101;
	border: 1px solid #050101;
	border-radius: 0;
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	transition: box-shadow 0.15s ease;
}

.mcw-wr.mcw-wr .comment-form select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%23050101' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 10px 6px;
	padding-right: 40px;
	cursor: pointer;
}

.mcw-wr.mcw-wr .comment-form textarea {
	min-height: 140px;
	resize: vertical;
}

.mcw-wr.mcw-wr .comment-form input:focus,
.mcw-wr.mcw-wr .comment-form select:focus,
.mcw-wr.mcw-wr .comment-form textarea:focus {
	outline: none;
	box-shadow: 0 0 0 1px #050101;
}

/* ---------- Photo upload — custom-styled wrapper ---------- */
.mcw-wr.mcw-wr .comment-form-mcw-image input[type="file"] {
	display: block;
	width: 100%;
	font-family: inherit;
	font-size: 13px;
	color: #050101;
	padding: 12px 14px;
	background: #ffffff;
	border: 1px dashed #050101;
	border-radius: 0;
	cursor: pointer;
}

.mcw-wr.mcw-wr .comment-form-mcw-image input[type="file"]::-webkit-file-upload-button,
.mcw-wr.mcw-wr .comment-form-mcw-image input[type="file"]::file-selector-button {
	margin-right: 14px;
	padding: 8px 16px;
	background: #050101;
	color: #ffffff;
	border: 1px solid #050101;
	border-radius: 0;
	font-family: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mcw-wr.mcw-wr .comment-form-mcw-image input[type="file"]::file-selector-button:hover {
	background: #ffffff;
	color: #050101;
}

.mcw-wr.mcw-wr .comment-form-mcw-image small {
	display: block;
	margin-top: 8px;
	font-family: inherit;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.3px;
	color: #6b6e70;
}

/* ---------- "Would recommend" checkbox ---------- */
.mcw-wr.mcw-wr .comment-form-mcw-recommend label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	color: #050101;
}

.mcw-wr.mcw-wr .comment-form-mcw-recommend input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	background: #ffffff;
	border: 1px solid #050101;
	border-radius: 0;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	margin: 0;
}

.mcw-wr.mcw-wr .comment-form-mcw-recommend input[type="checkbox"]:checked {
	background: #050101;
}

.mcw-wr.mcw-wr .comment-form-mcw-recommend input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 6px;
	height: 11px;
	border: solid #ffffff;
	border-width: 0 1.6px 1.6px 0;
	transform: rotate(45deg);
}

.mcw-wr.mcw-wr .comment-form-mcw-recommend input[type="checkbox"]:focus-visible {
	outline: 2px solid #050101;
	outline-offset: 2px;
}

/* ---------- Submit button — site CTA style ----------
 * Theme (Astra/etc.) styles #submit with higher specificity AND tends
 * to load CSS after the plugin. Use both an ID-anchored selector and
 * !important so the brand styling wins regardless. */

.mcw-wr.mcw-wr .comment-form .form-submit input[type="submit"],
.mcw-wr.mcw-wr .comment-form .form-submit input#submit,
.mcw-wr.mcw-wr .comment-form .form-submit button,
.mcw-wr.mcw-wr .comment-form #submit {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 200px !important;
	height: auto !important;
	padding: 16px 36px !important;
	background: #050101 !important;
	color: #ffffff !important;
	border: 1px solid #050101 !important;
	border-radius: 0 !important;
	font-family: "Mona Sans Expanded", "Mona Sans", -apple-system, BlinkMacSystemFont, sans-serif !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	letter-spacing: 1.5px !important;
	text-transform: uppercase !important;
	text-shadow: none !important;
	box-shadow: none !important;
	cursor: pointer !important;
	transition: background-color 0.2s ease, color 0.2s ease !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	opacity: 1 !important;
}

.mcw-wr.mcw-wr .comment-form .form-submit input[type="submit"]:hover,
.mcw-wr.mcw-wr .comment-form .form-submit input#submit:hover,
.mcw-wr.mcw-wr .comment-form .form-submit button:hover,
.mcw-wr.mcw-wr .comment-form #submit:hover,
.mcw-wr.mcw-wr .comment-form .form-submit input[type="submit"]:focus-visible,
.mcw-wr.mcw-wr .comment-form .form-submit input#submit:focus-visible,
.mcw-wr.mcw-wr .comment-form .form-submit button:focus-visible,
.mcw-wr.mcw-wr .comment-form #submit:focus-visible {
	background: #ffffff !important;
	color: #050101 !important;
	outline: none !important;
}

/* ---------- "Logged in as ..." info bar ---------- */
.mcw-wr.mcw-wr .logged-in-as {
	margin: 0;
	padding: 12px 16px;
	background: #f7f7f7;
	font-size: 12px;
	letter-spacing: 0.3px;
	color: #6b6e70;
}

.mcw-wr.mcw-wr .logged-in-as a {
	color: #050101;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mcw-wr.mcw-wr .comment-notes {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.3px;
	color: #6b6e70;
}

/* ---------- Rating select grouping ---------- */
.mcw-wr.mcw-wr .comment-form-rating select {
	max-width: 100%;
	width: 100%;
}

/* Safety net: hide any .stars row that other plugins/themes try to inject. */
.mcw-wr.mcw-wr .comment-form-rating .stars {
	display: none;
}

/* Lock page scroll when modal is open (set on <html> by JS). */
html.mcw-wr-modal-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.mcw-wr.mcw-wr .mcw-wr__modal {
		padding: 0;
		align-items: stretch;
	}
	.mcw-wr.mcw-wr .mcw-wr__dialog {
		max-width: 100%;
		max-height: 100vh;
		height: 100vh;
	}
}
