/**
 * GOERGO booking pages (templates/booking.php).
 *
 * Section rhythm: hero (bg, gold glow) · booking (bg-alt) with the Amelia form
 * on an ivory panel and an appointment information column.
 *
 * Amelia renders its own form inside .goergo-booking-form. Rules that touch
 * Amelia markup are kept at the end of this file, scoped to that wrapper, and
 * only adjust colours and typography through Amelia's CSS variables so the
 * form keeps working if Amelia's markup changes.
 */

/* Hero */

.goergo-booking-hero {
	position: relative;
	isolation: isolate;
	padding-block: clamp(3rem, 2rem + 4vw, 6.5rem) clamp(3.5rem, 2rem + 5vw, 7rem);
	overflow: hidden;
	background:
		radial-gradient(70% 90% at 85% 10%, rgb(198 166 118 / 0.12), transparent 60%),
		var(--goergo-bg);
}

.goergo-booking-hero__grid {
	display: grid;
	gap: clamp(3rem, 2rem + 4vw, 5rem);
	align-items: center;
}

@media (min-width: 64em) {
	.goergo-booking-hero__grid {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		gap: clamp(4rem, 1rem + 6vw, 7rem);
	}
}

.goergo-booking-hero__body > * {
	animation: goergo-booking-rise 1s var(--goergo-ease) both;
}

.goergo-booking-hero__body > :nth-child(2) { animation-delay: 100ms; }
.goergo-booking-hero__body > :nth-child(3) { animation-delay: 200ms; }
.goergo-booking-hero__body > :nth-child(4) { animation-delay: 300ms; }
.goergo-booking-hero__body > :nth-child(5) { animation-delay: 400ms; }

.goergo .goergo-booking-hero__title {
	max-width: 14ch;
	margin: 0;
	font-size: clamp(2.75rem, 1.5rem + 4.6vw, 5.5rem);
	line-height: 1;
	letter-spacing: -0.02em;
}

.goergo-booking-hero__text {
	max-width: 36rem;
	margin: var(--goergo-space-6) 0 0;
	color: var(--goergo-text-2);
	font-size: var(--goergo-text-lg);
	line-height: 1.65;
}

.goergo-booking-facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--goergo-space-3) var(--goergo-space-6);
	margin: var(--goergo-space-6) 0 0;
	padding: var(--goergo-space-5) 0 0;
	border-top: 1px solid var(--goergo-line);
	list-style: none;
}

.goergo-booking-facts li {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--goergo-text);
	font-size: var(--goergo-text-sm);
	letter-spacing: 0.04em;
}

.goergo-booking-facts .goergo-icon,
.goergo-booking-details .goergo-icon {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	color: var(--goergo-gold);
}

.goergo-booking-hero__actions {
	margin-top: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
}

@media (max-width: 29.99em) {
	.goergo-booking-hero__actions .goergo-button {
		flex: 1 1 100%;
	}
}

/* Hero image: framed like the homepage spotlight; skipped on phones so the calendar comes sooner. */

.goergo-booking-hero__media {
	position: relative;
}

.goergo-booking-hero__media::before {
	content: "";
	position: absolute;
	top: -1.25rem;
	right: -1.25rem;
	width: 40%;
	height: 34%;
	border-top: 1px solid var(--goergo-line-gold);
	border-right: 1px solid var(--goergo-line-gold);
	pointer-events: none;
}

.goergo-booking-hero__image {
	box-shadow: var(--goergo-shadow-lg);
}

@media (max-width: 47.99em) {
	.goergo-booking-hero__media {
		display: none;
	}
}

@media (min-width: 48em) and (max-width: 63.99em) {
	.goergo-booking-hero__media {
		max-width: 34rem;
	}
}

@keyframes goergo-booking-rise {
	from {
		opacity: 0;
		transform: translate3d(0, 1.25rem, 0);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Booking section */

.goergo-booking-main {
	padding-block: clamp(3.5rem, 2rem + 5vw, 7rem);
	border-top: 1px solid var(--goergo-line);
	background: var(--goergo-bg-alt);
}

.goergo-booking-main__grid {
	display: grid;
	gap: clamp(2.5rem, 1.5rem + 3vw, 4rem);
	align-items: start;
}

@media (min-width: 64em) {
	.goergo-booking-main__grid {
		grid-template-columns: minmax(0, 1.75fr) minmax(19rem, 1fr);
		gap: clamp(2.5rem, 1rem + 3vw, 4.5rem);
	}

	.goergo-booking-aside {
		position: sticky;
		top: calc(var(--goergo-header-height) + var(--wp-admin--admin-bar--height, 0px) + 2rem);
	}
}

.goergo-booking-main__header {
	margin-bottom: var(--goergo-space-6);
}

.goergo .goergo-booking-main__title {
	margin: 0;
	font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem);
}

.goergo-booking-main__header p {
	max-width: 34rem;
	margin: var(--goergo-space-3) 0 0;
	color: var(--goergo-text-2);
}

/* Form panel: Amelia's light form sits on an ivory card framed in gold. */

.goergo-booking-form {
	position: relative;
	min-height: 32rem;
	padding: clamp(0.75rem, 0.25rem + 1.5vw, 1.5rem);
	border: 1px solid var(--goergo-line-gold);
	border-radius: var(--goergo-radius-sm);
	background: #f7f3ec;
	box-shadow: var(--goergo-shadow-lg);
	color: #1d1e21;
}

.goergo-booking-form::before {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	width: 22%;
	height: 2px;
	background: var(--goergo-gold);
}

.goergo-booking-form__noscript {
	margin: 0;
	padding: var(--goergo-space-6);
	color: #1d1e21;
	text-align: center;
}

/* Fallback when online booking is unavailable. */

.goergo-booking-fallback {
	padding: clamp(1.75rem, 1rem + 3vw, 3rem);
	border: 1px solid var(--goergo-line-gold);
	background: var(--goergo-bg);
}

.goergo-booking-fallback p {
	max-width: 36rem;
	margin: 0;
	color: var(--goergo-text);
	font-size: var(--goergo-text-lg);
}

.goergo-booking-fallback .goergo-actions {
	margin-top: var(--goergo-space-6);
}

/* Appointment information */

.goergo-booking-aside {
	display: grid;
	gap: var(--goergo-space-5);
}

.goergo-booking-card {
	padding: clamp(1.5rem, 1rem + 1.5vw, 2rem);
	border: 1px solid var(--goergo-line);
	background: var(--goergo-bg);
}

.goergo .goergo-booking-card__title {
	margin: 0 0 var(--goergo-space-5);
	color: var(--goergo-gold);
	font-family: var(--goergo-font-body);
	font-size: var(--goergo-text-xs);
	font-weight: 600;
	letter-spacing: var(--goergo-tracking-caps);
	line-height: 1.4;
	text-transform: uppercase;
}

.goergo-booking-details {
	display: grid;
	gap: var(--goergo-space-5);
	margin: 0;
}

.goergo-booking-details dt {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.35rem;
	color: var(--goergo-text-3);
	font-size: var(--goergo-text-xs);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.goergo-booking-details dd {
	margin: 0 0 0 1.75rem;
	color: var(--goergo-text);
}

.goergo-booking-details address {
	font-style: normal;
}

.goergo-booking-details__link,
.goergo-booking-details__link:visited {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	color: var(--goergo-gold);
	font-size: var(--goergo-text-sm);
}

.goergo-booking-details__link:hover,
.goergo-booking-details__link:focus-visible {
	color: var(--goergo-gold-soft);
}

.goergo-booking-card__note {
	margin: var(--goergo-space-5) 0 0;
	padding-top: var(--goergo-space-4);
	border-top: 1px solid var(--goergo-line);
	color: var(--goergo-text-3);
	font-size: var(--goergo-text-sm);
}

.goergo-booking-card.goergo-topics {
	margin: 0;
	border-color: var(--goergo-line);
}

.goergo-booking-card .goergo-topics__list {
	font-size: 0.9375rem;
}

.goergo-booking-card .goergo-button--text {
	margin-top: var(--goergo-space-4);
}

.goergo-booking-help p {
	margin: 0;
	color: var(--goergo-text-2);
	font-size: 0.9375rem;
}

.goergo-booking-help .goergo-actions {
	margin-top: var(--goergo-space-5);
}

.goergo-booking-help .goergo-button--whatsapp .goergo-icon {
	color: var(--goergo-color-whatsapp);
}

/* Small screens: form first, then details. */

@media (max-width: 63.99em) {
	.goergo-booking-aside {
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	}
}

/*
 * Amelia step-by-step form, themed through its colour variables.
 *
 * Amelia writes these variables inline on .am-fs__wrapper from its own
 * Customize settings; !important is needed to override inline values. Only
 * colours and spacing change, so Amelia's layout and behaviour are untouched
 * and Amelia's settings on production stay as they are. Contrast (WCAG AA):
 * bronze #87683a on ivory 4.8:1; ivory text on charcoal 16:1.
 */

.goergo-booking-form .am-fs__wrapper {
	--am-c-primary: #87683a !important;
	--am-c-main-bgr: #fffdf9 !important;
	--am-c-main-heading-text: #1d1e21 !important;
	--am-c-main-text: #3b3b3f !important;
	--am-c-sb-bgr: #141517 !important;
	--am-c-sb-text: #f4efe7 !important;
	--am-c-inp-bgr: #ffffff !important;
	--am-c-inp-border: #d9cfbf !important;
	--am-c-inp-text: #1d1e21 !important;
	--am-c-drop-bgr: #ffffff !important;
	--am-c-drop-text: #1d1e21 !important;
	--am-c-btn-prim: #141517 !important;
	--am-c-btn-prim-text: #f4efe7 !important;
	--am-c-btn-sec: #ffffff !important;
	--am-c-btn-sec-text: #1d1e21 !important;

	max-width: 100%;
	margin: 0 auto !important;
	box-shadow: 0 0.75rem 2rem rgb(16 17 19 / 0.12);
}

/* Calendar day cells: Amelia sets these on .am-advsc__wrapper. */
.goergo-booking-form .am-advsc__wrapper {
	--am-c-cal-init: #87683a !important;
	--am-c-cal-init-text: #6b5129 !important;
	--am-c-cal-init-op10: rgb(135 104 58 / 0.1) !important;
	--am-c-cal-init-op20: rgb(135 104 58 / 0.2) !important;
	--am-c-cal-init-op30: rgb(135 104 58 / 0.3) !important;
	--am-c-cal-init-op60: rgb(135 104 58 / 0.6) !important;
	--am-c-cal-selected: #141517 !important;
	--am-c-cal-selected-text: #f4efe7 !important;
	--am-c-cal-selected-op80: rgb(20 21 23 / 0.8) !important;
}

/* Amelia buttons carry their own colour variables inline. */
.goergo-booking-form .am-button--primary {
	--am-c-btn-first: #141517 !important;
	--am-c-btn-second: #f4efe7 !important;
	--am-c-btn-first-op80: rgb(20 21 23 / 0.8) !important;
	--am-c-btn-first-op30: rgb(20 21 23 / 0.3) !important;
	--am-c-btn-first-op20: rgb(20 21 23 / 0.1) !important;
}
