/* =====================================================
   YWG Reviews — Landing-page chrome
   ----------------------------------------------------
   Scoped to body.ywg-review-landing (set in templates/landing.php)
   so these rules don't bleed onto the regular site. Pulls colour
   tokens from the theme via :root variables (--ywg-green etc.).
   ===================================================== */

body.ywg-review-landing {
	background-color: var(--ywg-light-cream, #F8F6EB);
	min-height: 100vh;
	margin: 0;
	display: flex;
	flex-direction: column;
}

/* ── Slim brand strip ─────────────────────────────────── */
.ywg-review-landing__header {
	background-color: var(--ywg-light-cream, #F8F6EB);
	border-bottom: 1px solid var(--ywg-line-light-green, rgba(50, 69, 38, 0.15));
	padding: 16px 0;
}
.ywg-review-landing__bar {
	max-width: var(--ywg-container-max, 1200px);
	margin: 0 auto;
	padding: 0 var(--ywg-container-pad, 1.5rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.ywg-review-landing__logo {
	display: inline-flex;
	align-items: center;
	max-width: 220px;
	text-decoration: none;
}
.ywg-review-landing__logo img {
	max-height: 56px;
	max-width: 100%;
	height: auto;
	width: auto;
	display: block;
}
.ywg-review-landing__logo-text {
	font-family: var(--ywg-font-heading, "Lato", sans-serif);
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--ywg-heading, #333D29);
	text-decoration: none;
}
.ywg-review-landing__cta-wrap {
	display: flex;
	align-items: center;
}

/* On phones, drop the logo a little so a wrapped Book/Checkout
 * button doesn't shove it into the corner. */
@media (max-width: 480px) {
	.ywg-review-landing__bar {
		gap: 0.5rem;
		flex-wrap: wrap;
	}
	.ywg-review-landing__logo img { max-height: 40px; }
	.ywg-review-landing__cta { font-size: 0.9rem; }
}

/* ── Main content area ───────────────────────────────── */
.ywg-review-landing__main {
	flex: 1 1 auto;
	max-width: 720px;
	margin: 0 auto;
	padding: clamp(1.5rem, 4vw, 3rem) var(--ywg-container-pad, 1.5rem);
	width: 100%;
	box-sizing: border-box;
}

/* Admin-preview banner — only renders when an admin opens the
 * form via the "Preview" button on the Booking edit screen
 * (?preview=admin&_wpnonce=…). Yellow-amber palette so it's
 * clearly an admin-only state, distinct from the brand greens. */
.ywg-review-form__preview-banner {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	background-color: #FFF4D6;
	border-left: 3px solid #C7891A;
	border-radius: 0 8px 8px 0;
	color: #5C4106;
	font-size: 0.9rem;
	line-height: 1.45;
}
.ywg-review-form__preview-banner strong {
	color: #5C4106;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-size: 0.78rem;
}
body.ywg-review-landing .ywg-review-form--admin-preview .ywg-review-form__button[disabled] {
	cursor: not-allowed;
	opacity: 0.6;
}

/* The form card. Provides the cream-on-white panel feel that
 * matches the rest of the site's form chrome (booking confirm,
 * checkout sections etc.). */
body.ywg-review-landing .ywg-review-form {
	background-color: var(--ywg-white, #FFFFFF);
	border: 1px solid var(--ywg-line-light-green, rgba(50, 69, 38, 0.15));
	border-radius: 16px;
	padding: clamp(1.5rem, 4vw, 2.25rem);
	box-shadow: 0 4px 20px rgba(50, 69, 38, 0.06);
}

/* Title moved INSIDE the form, replacing the old hero. */
body.ywg-review-landing .ywg-review-form__title {
	margin: 0 0 0.5rem;
	font-family: var(--ywg-font-heading, "Lato", sans-serif);
	font-size: clamp(1.5rem, 3.2vw, 1.9rem);
	font-weight: 900;
	line-height: 1.2;
	color: var(--ywg-heading, #333D29);
}
body.ywg-review-landing .ywg-review-form__greeting {
	margin: 0 0 1.25rem;
	color: var(--ywg-text, #515151);
	font-size: 1rem;
	line-height: 1.55;
}
body.ywg-review-landing .ywg-review-form__greeting strong {
	color: var(--ywg-heading, #333D29);
	font-weight: 700;
}

/* Writing prompts — inline list, no extra container chrome. The
 * earlier cream-panel + green-bar version read as a card-within-the-
 * form-card; this is just a small lead line followed by a tight
 * stack of bullets, single column for readability. */
.ywg-review-form__prompts {
	margin: 0 0 1.5rem;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
}
.ywg-review-form__prompts-lead {
	margin: 0 0 0.35rem;
	font-weight: 600;
	color: var(--ywg-heading, #333D29);
	font-size: 0.9rem;
}
.ywg-review-form__prompts ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	color: var(--ywg-text-muted, #6b7560);
	font-size: 0.9rem;
}
.ywg-review-form__prompts li {
	margin: 0;
	line-height: 1.4;
}

/* Field rows — keep first/last name on one row at tablet+. */
.ywg-review-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
@media (max-width: 480px) {
	.ywg-review-form__row { grid-template-columns: 1fr; gap: 0.5rem; }
}
body.ywg-review-landing .ywg-review-form__field {
	margin-bottom: 1rem;
}
body.ywg-review-landing .ywg-review-form__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--ywg-heading, #333D29);
}
body.ywg-review-landing .ywg-review-form__field input[type="text"],
body.ywg-review-landing .ywg-review-form__field textarea {
	width: 100%;
	min-height: 44px;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--ywg-border-grey, #DADFDE);
	border-radius: 8px;
	background-color: var(--ywg-light-cream, #F8F6EB);
	font-family: var(--ywg-font-body, "Roboto", sans-serif);
	font-size: 1rem;
	color: var(--ywg-heading, #333D29);
	box-sizing: border-box;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}
body.ywg-review-landing .ywg-review-form__field textarea {
	min-height: 140px;
	resize: vertical;
	line-height: 1.5;
}
body.ywg-review-landing .ywg-review-form__field input:focus,
body.ywg-review-landing .ywg-review-form__field input:focus-visible,
body.ywg-review-landing .ywg-review-form__field textarea:focus,
body.ywg-review-landing .ywg-review-form__field textarea:focus-visible {
	outline: none;
	border-color: var(--ywg-green, #57693F);
	box-shadow: 0 0 0 3px rgba(50, 69, 38, 0.15);
}
body.ywg-review-landing .ywg-review-form__hint {
	display: block;
	margin-top: 0.3rem;
	color: var(--ywg-text-muted, #6b7560);
	font-size: 0.825rem;
}

/* Inline error chrome — same is-valid / is-invalid states the
 * contact form uses, so a single CSS rule covers both. */
body.ywg-review-landing .ywg-field.is-invalid input,
body.ywg-review-landing .ywg-field.is-invalid textarea {
	border-color: var(--ywg-error, #b3261e);
	box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}
body.ywg-review-landing .ywg-field__error {
	margin: 0.35rem 0 0;
	color: var(--ywg-error, #b3261e);
	font-size: 0.825rem;
	line-height: 1.4;
}

/* Required asterisk. */
.ywg-req {
	color: var(--ywg-mauve, #663D63);
	margin-left: 0.15em;
}

/* Submit row + status line. */
body.ywg-review-landing .ywg-review-form__submit {
	margin-top: 1.5rem;
}
body.ywg-review-landing .ywg-review-form__button {
	width: 100%;
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
}
body.ywg-review-landing .ywg-form__status {
	margin-top: 0.85rem;
	padding: 0.6rem 0.85rem;
	border-radius: 6px;
	font-size: 0.9rem;
}
body.ywg-review-landing .ywg-form__status.is-error {
	background-color: rgba(179, 38, 30, 0.08);
	border-left: 3px solid var(--ywg-error, #b3261e);
	color: var(--ywg-error, #b3261e);
}

/* Honeypot — visually hidden but accessible to bots; never display:none. */
.ywg-hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Submit button spinner state — same convention as form-submit.js. */
body.ywg-review-landing .ywg-btn__icon { display: inline-flex; }
body.ywg-review-landing .ywg-btn__icon--spinner { display: none; }
body.ywg-review-landing [data-state="loading"] .ywg-btn__icon--default { display: none; }
body.ywg-review-landing [data-state="loading"] .ywg-btn__icon--spinner {
	display: inline-flex;
	animation: ywg-review-spin 0.8s linear infinite;
}
@keyframes ywg-review-spin {
	to { transform: rotate(360deg); }
}

/* Success card after submit. */
body.ywg-review-landing .ywg-form__success {
	background-color: var(--ywg-white, #FFFFFF);
	border: 1px solid var(--ywg-line-light-green, rgba(50, 69, 38, 0.15));
	border-radius: 16px;
	padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.25rem);
	text-align: center;
	box-shadow: 0 4px 20px rgba(50, 69, 38, 0.06);
}
body.ywg-review-landing .ywg-form__success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0 0 1rem;
	border-radius: 50%;
	background-color: rgba(50, 69, 38, 0.08);
	color: var(--ywg-green, #57693F);
}
body.ywg-review-landing .ywg-form__success-heading {
	margin: 0 0 0.6rem;
	font-family: var(--ywg-font-heading, "Lato", sans-serif);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--ywg-heading, #333D29);
	outline: none;
}
body.ywg-review-landing .ywg-form__success-body {
	margin: 0;
	color: var(--ywg-text, #515151);
	font-size: 1rem;
	line-height: 1.55;
}

/* Conditional Book-again CTA — only revealed by frontend.js when
 * the guest gave 4 or 5 stars. Sits below the thank-you body with
 * a subtle separator so it reads as a follow-on, not part of the
 * confirmation message itself. */
body.ywg-review-landing .ywg-review-form__success-cta {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--ywg-line-light-green, rgba(50, 69, 38, 0.15));
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}
body.ywg-review-landing .ywg-review-form__success-cta-lead {
	margin: 0;
	color: var(--ywg-text, #515151);
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Token-error / link-expired panel — re-uses .ywg-review-form
 * shell so the layout still feels consistent. */
body.ywg-review-landing .ywg-review-form--error .ywg-review-form__panel,
body.ywg-review-landing .ywg-review-form--thanks .ywg-review-form__panel {
	text-align: center;
}
body.ywg-review-landing .ywg-review-form--error h2,
body.ywg-review-landing .ywg-review-form--thanks h2 {
	margin: 0 0 0.6rem;
	font-family: var(--ywg-font-heading, "Lato", sans-serif);
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--ywg-heading, #333D29);
}
body.ywg-review-landing .ywg-review-form--error p,
body.ywg-review-landing .ywg-review-form--thanks p {
	margin: 0 0 0.75rem;
	color: var(--ywg-text, #515151);
	line-height: 1.55;
}

/* ── Slim footer ─────────────────────────────────────── */
.ywg-review-landing__footer {
	padding: 1.5rem var(--ywg-container-pad, 1.5rem) calc(1.5rem + env(safe-area-inset-bottom, 0px));
	text-align: center;
	color: var(--ywg-text-muted, #6b7560);
	border-top: 1px solid var(--ywg-line-light-green, rgba(50, 69, 38, 0.15));
}
.ywg-review-landing__footer small {
	font-size: 0.85rem;
}
