/**
 * Moongate Party Booking — front-end styles.
 *
 * Dark-first: the defaults are tuned for a black page (same family as the leaderboard) and the
 * widget inherits the theme's fonts. Everything a site might want to retune is a --mgp-* variable
 * on .moongate-pb; the Elementor widget's Style tab writes those same variables.
 *
 * Availability colors (--mgp-ok / warn / danger / call and the grey) are semantic and deliberately
 * NOT exposed as controls: they must mean the same thing on every site.
 */

.moongate-pb {
	--mgp-surface: #16181f;
	--mgp-surface-2: #1f232d;
	--mgp-line: rgba( 255, 255, 255, 0.12 );
	--mgp-line-strong: rgba( 255, 255, 255, 0.26 );
	--mgp-text: #f5f6fa;
	--mgp-muted: #9aa3b2;
	--mgp-brand: #4f80c8;
	--mgp-brand-ink: #ffffff;
	--mgp-accent: #d43a49;
	--mgp-ok: #2bd45f;
	/* "Filling up" is deliberately CREAM, not amber: amber and the green sit in the same band
	   for red-green color blindness, so the middle state separates by lightness instead. */
	--mgp-warn: #f2e3ae;
	--mgp-danger: #ef5a5a;
	--mgp-call: #3d82f0;
	--mgp-ok-soft: rgba( 43, 212, 95, 0.16 );
	--mgp-warn-soft: rgba( 242, 227, 174, 0.14 );
	--mgp-danger-soft: rgba( 239, 90, 90, 0.16 );
	--mgp-call-soft: rgba( 61, 130, 240, 0.16 );
	--mgp-radius: 14px;
	--mgp-btn-radius: 12px;
	--mgp-gap: 1.5rem;
	--mgp-heading-font: inherit;
	/* Where the desktop summary pins while scrolling — raise it to clear a fixed theme header. */
	--mgp-sticky-top: 1rem;

	position: relative; /* anchors the slot info popover */
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) 320px;
	gap: var( --mgp-gap );
	align-items: start;
	width: 100%;
	color: var( --mgp-text );
	line-height: 1.45;
	box-sizing: border-box;
}

.moongate-pb *,
.moongate-pb *::before,
.moongate-pb *::after {
	box-sizing: border-box;
}

/* Unavailable / no-connection state renders a single message instead of the grid. */
.moongate-pb--empty {
	display: block;
	color: var( --mgp-muted );
}

.moongate-pb__diag {
	font-size: 0.85em;
	opacity: 0.7;
}

/* ---------------------------------------------------------------------------
   Controls — hard reset so a host theme can't flood our buttons and fields.
   Background / color / border / shadow are driven through private custom
   properties, so the !important here still lets each control pick its own look.
   --------------------------------------------------------------------------- */
.moongate-pb button,
.moongate-pb button:hover,
.moongate-pb button:focus,
.moongate-pb button:active {
	background: var( --_bg, transparent ) !important;
	color: var( --_fg, inherit ) !important;
	border: 1px solid var( --_bd, transparent ) !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
	font: inherit;
	line-height: 1.3;
	margin: 0;
	/* Themes routinely set white-space:nowrap on button — slot notes must wrap inside the tile. */
	white-space: normal;
	overflow-wrap: anywhere;
	cursor: pointer;
	transition: filter 0.12s ease, transform 0.08s ease;
}

.moongate-pb button:focus-visible {
	outline: 3px solid var( --mgp-brand ) !important;
	outline-offset: 2px;
}

.moongate-pb button:disabled {
	cursor: default;
}

.moongate-pb input,
.moongate-pb select,
.moongate-pb textarea {
	background: var( --mgp-surface ) !important;
	color: var( --mgp-text ) !important;
	border: 1px solid var( --mgp-line-strong ) !important;
	border-radius: 10px;
	box-shadow: none !important;
	font: inherit;
	line-height: 1.3;
	margin: 0;
	padding: 0.65rem 0.75rem;
	width: 100%;
	min-height: 0;
	max-width: 100%;
}

.moongate-pb textarea {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	overflow: auto;
}

.moongate-pb input::placeholder,
.moongate-pb textarea::placeholder {
	color: var( --mgp-muted );
	opacity: 0.8;
}

.moongate-pb input:focus-visible,
.moongate-pb select:focus-visible,
.moongate-pb textarea:focus-visible {
	outline: 3px solid var( --mgp-brand );
	outline-offset: 1px;
}

/* ---------------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------------- */
.moongate-pb__flow {
	display: grid;
	gap: var( --mgp-gap );
	min-width: 0;
}

.moongate-pb__head {
	display: grid;
	gap: 0.35rem;
}

.moongate-pb__eyebrow {
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --mgp-muted );
	font-weight: 600;
}

.moongate-pb__title,
.moongate-pb__step-title,
.moongate-pb__month,
.moongate-pb__summary-title,
.moongate-pb__pkg-name {
	font-family: var( --mgp-heading-font );
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var( --mgp-text );
	margin: 0;
}

.moongate-pb__title {
	font-size: clamp( 2rem, 5vw, 2.8rem );
	line-height: 1;
	text-wrap: balance;
}

.moongate-pb__card {
	background: var( --mgp-surface );
	border: 1px solid var( --mgp-line );
	border-radius: var( --mgp-radius );
	padding: 1.1rem 1.2rem;
}

/* ---------------------------------------------------------------------------
   Package
   --------------------------------------------------------------------------- */
.moongate-pb__pkgs {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 220px, 1fr ) );
	gap: 0.8rem;
}

/* A lone card shouldn't stretch across the whole flow column. */
.moongate-pb__pkgs--one {
	grid-template-columns: minmax( 220px, 480px );
}

/* Cards in a row stretch to equal height (grid default); the body grows and the deposit line
   rides an auto margin to the bottom, so every card's deposit + dotted rule sit flush at the
   bottom edge instead of zig-zagging with the description lengths. */
.moongate-pb__pkg {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
}

/* Grid items default to min-width:auto, so a long package name's min-content width could push
   the row past the card edge; let everything shrink. */
.moongate-pb__pkg > * {
	min-width: 0;
}

/* One 16:9 marketing image per package (1920x1080 source, scaled) — the box keeps the exact
   ratio at every card width, so the same asset fits whether there are 1, 2 or 3 cards. */
.moongate-pb__pkg-media {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: var( --mgp-surface-2 );
}

/* Quiet gradient stand-ins while a package has no image (multi-package grids stay aligned). */
.moongate-pb__pkg-media--ph0 { background: linear-gradient( 135deg, #27437c, #12203f 60%, #0b1329 ); }
.moongate-pb__pkg-media--ph1 { background: linear-gradient( 135deg, #7c2733, #3f121b 60%, #290b10 ); }
.moongate-pb__pkg-media--ph2 { background: linear-gradient( 135deg, #7c6427, #3f3312 60%, #29200b ); }

.moongate-pb__pkg-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: baseline;
	width: 100%;
	padding: 0.8rem 1rem 0;
}

.moongate-pb__pkg-name {
	flex: 1;
	min-width: 0;
	/* Wrap between words only — the button reset's overflow-wrap:anywhere would split "BIRTHDAY". */
	overflow-wrap: normal;
	word-break: normal;
}

/* The name scales with the card itself (1-up cards are wide, 3-up cards narrow), so a long
   name never bleeds into the price. */
.moongate-pb__pkg {
	container-type: inline-size;
}

.moongate-pb__pkg .moongate-pb__pkg-name {
	font-size: clamp( 0.95rem, 7.25cqw, 1.3rem );
	line-height: 1.15;
}

/* Narrow cards (three-across): the price would squeeze a two-word name onto two lines, so it
   drops below the name instead and the name keeps the full row. */
@container ( max-width: 270px ) {
	.moongate-pb__pkg-row {
		display: block;
	}

	.moongate-pb__pkg-row .moongate-pb__pkg-price {
		display: block;
		margin-top: 0.15rem;
	}
}

.moongate-pb__pkg-price {
	white-space: nowrap;
}

.moongate-pb__pkg-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.45rem;
	padding: 0.35rem 1rem 0.9rem;
}

.moongate-pb__pkg-body .moongate-pb__deposit {
	margin-top: auto;
}

/* Selectable package cards (only rendered when the location offers more than one). */
.moongate-pb button.moongate-pb__pkg-pick {
	--_fg: var( --mgp-text );
	display: block;
	width: 100%;
	padding: 0;
	text-align: left;
}

.moongate-pb__pkg.is-selected {
	border-color: var( --mgp-brand );
	box-shadow: 0 0 0 1px var( --mgp-brand );
}

.moongate-pb__pkg.is-selected .moongate-pb__pkg-pick .moongate-pb__pkg-name::after {
	content: " ✓";
	color: var( --mgp-brand );
}

.moongate-pb__pkg-price {
	font-weight: 700;
	font-size: 1.25rem;
	font-variant-numeric: tabular-nums;
}

.moongate-pb__pkg-meta {
	color: var( --mgp-muted );
	font-size: 0.92rem;
}

/* The description is manager-authored HTML (sanitized server-side AND through wp_kses here). */
.moongate-pb__pkg-desc {
	margin: 0;
	max-width: 62ch;
}

.moongate-pb__pkg-desc p,
.moongate-pb__pkg-desc ul,
.moongate-pb__pkg-desc ol {
	margin: 0 0 0.5em;
	max-width: none;
}

.moongate-pb__pkg-desc > :last-child {
	margin-bottom: 0;
}

.moongate-pb__pkg-desc ul,
.moongate-pb__pkg-desc ol {
	padding-left: 1.2em;
}

.moongate-pb__pkg-desc a {
	color: var( --mgp-brand );
}

/* Collapsed: roughly three text lines. -webkit-line-clamp breaks on block children, so the
   clamp is a max-height crop with a fade — a partially cropped line dissolves instead of being
   sliced through the middle. "Read more" reveals the rest. */
.moongate-pb__pkg-desc.is-clamped {
	max-height: 4.4em;
	overflow: hidden;
	-webkit-mask-image: linear-gradient( to bottom, #000 55%, transparent 98% );
	mask-image: linear-gradient( to bottom, #000 55%, transparent 98% );
}

.moongate-pb button.moongate-pb__link {
	--_fg: var( --mgp-brand );
	padding: 0;
	font-weight: 600;
	text-decoration: underline !important;
	text-underline-offset: 2px;
	justify-self: start;
	border-radius: 4px;
}

.moongate-pb__deposit {
	font-size: 0.95rem;
	border-top: 1px dashed var( --mgp-line );
	padding-top: 0.6rem;
	margin-top: 0.2rem;
}

.moongate-pb__deposit b {
	font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
   Steps
   --------------------------------------------------------------------------- */
.moongate-pb__step {
	display: grid;
	gap: 0.9rem;
}

.moongate-pb__step[hidden] {
	display: none;
}

.moongate-pb__step-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.moongate-pb__step-title {
	font-size: 1.6rem;
}

.moongate-pb__step-title small {
	font-family: inherit;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.95rem;
	color: var( --mgp-muted );
	margin-left: 0.5rem;
	/* Always its own line under the title (Mike, 2026-09-05 — the inline version wrapped badly). */
	display: block;
	margin: 0.2rem 0 0;
}

.moongate-pb__loading {
	color: var( --mgp-muted );
	margin: 0;
	font-size: 0.95rem;
}

/* Fetch feedback: spinner centered in the box, label underneath. */
.moongate-pb__loading--center {
	display: grid;
	justify-items: center;
	align-content: center;
	gap: 0.7rem;
	padding: 2.2rem 1rem;
	min-height: 7rem;
}

.moongate-pb__spinner {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 3px solid var( --mgp-line );
	border-top-color: var( --mgp-brand );
	animation: moongate-pb-spin 0.8s linear infinite;
}

@keyframes moongate-pb-spin {
	to { transform: rotate( 360deg ); }
}

@media ( prefers-reduced-motion: reduce ) {
	.moongate-pb__spinner {
		animation: moongate-pb-fade 1.6s ease-in-out infinite;
	}

	@keyframes moongate-pb-fade {
		50% { opacity: 0.35; }
	}
}

/* ---------------------------------------------------------------------------
   Calendar
   --------------------------------------------------------------------------- */
.moongate-pb__cal {
	display: grid;
	gap: 0.75rem;
}

.moongate-pb__cal-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.moongate-pb__month {
	font-size: 1.4rem;
	letter-spacing: 0.03em;
}

.moongate-pb__cal-btns {
	display: flex;
	gap: 0.4rem;
}

.moongate-pb button.moongate-pb__iconbtn {
	--_bg: var( --mgp-surface-2 );
	--_bd: var( --mgp-line );
	--_fg: var( --mgp-text );
	width: 2.4rem;
	height: 2.4rem;
	padding: 0;
	border-radius: 10px;
	display: grid;
	place-items: center;
}

.moongate-pb button.moongate-pb__iconbtn:disabled {
	opacity: 0.35;
}

.moongate-pb__cal-grid {
	display: grid;
	grid-template-columns: repeat( 7, minmax( 0, 1fr ) );
	gap: 0.35rem;
}

.moongate-pb__dow {
	text-align: center;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	color: var( --mgp-muted );
	font-weight: 600;
	padding: 0.2rem 0;
}

.moongate-pb button.moongate-pb__day {
	--_bg: var( --mgp-surface );
	--_bd: var( --mgp-line );
	--_fg: var( --mgp-text );
	position: relative;
	aspect-ratio: 1 / 0.92;
	width: 100%;
	padding: 0;
	border-radius: 10px;
	display: grid;
	place-items: center;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.moongate-pb button.moongate-pb__day:hover:not( :disabled ) {
	--_bd: var( --mgp-line-strong );
	transform: translateY( -1px );
}

/* The availability bar under the number. */
.moongate-pb__day::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 12%;
	width: 48%;
	height: 6px;
	border-radius: 3px;
	transform: translateX( -50% );
	background: var( --_dot, transparent );
}

.moongate-pb__day--green { --_dot: var( --mgp-ok ); }
.moongate-pb__day--yellow { --_dot: var( --mgp-warn ); }
.moongate-pb__day--red { --_dot: var( --mgp-danger ); }
.moongate-pb__day--call { --_dot: var( --mgp-call ); }

.moongate-pb button.moongate-pb__day:disabled {
	--_bg: var( --mgp-surface-2 );
	--_bd: transparent;
	--_fg: var( --mgp-muted );
	opacity: 0.55;
}

.moongate-pb button.moongate-pb__day[aria-pressed="true"] {
	--_bg: var( --mgp-brand );
	--_bd: var( --mgp-brand );
	--_fg: var( --mgp-brand-ink );
	--_dot: var( --mgp-brand-ink );
}

.moongate-pb__day--blank {
	visibility: hidden;
}

.moongate-pb__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.1rem;
	font-size: 0.85rem;
	color: var( --mgp-muted );
}

.moongate-pb__legend i {
	display: inline-block;
	width: 18px;
	height: 6px;
	border-radius: 3px;
	vertical-align: middle;
	margin-right: 0.4rem;
	background: var( --_c );
}

.moongate-pb__legend .moongate-pb__sw {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 4px;
	background: var( --mgp-surface-2 );
	border: 1px solid var( --mgp-line );
	vertical-align: -2px;
	margin-right: 0.4rem;
}

/* ---------------------------------------------------------------------------
   Times + rooms
   --------------------------------------------------------------------------- */
.moongate-pb__times {
	display: grid;
	gap: 0.9rem;
}

.moongate-pb__slots {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
	gap: 0.6rem;
}

.moongate-pb button.moongate-pb__slot {
	--_bg: var( --mgp-surface );
	--_bd: var( --mgp-line );
	--_fg: var( --mgp-text );
	border-radius: 12px;
	padding: 0.75rem 0.85rem;
	text-align: left;
	display: grid;
	gap: 0.15rem;
	min-height: 4.2rem;
	width: 100%;
}

.moongate-pb__slot-time {
	font-family: var( --mgp-heading-font );
	font-weight: 800;
	font-size: 1.3rem;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}

.moongate-pb__slot-sub {
	font-size: 0.8rem;
	color: var( --mgp-muted );
	min-height: 1.1em;
	white-space: normal;
	overflow-wrap: anywhere;
}

.moongate-pb button.moongate-pb__slot[aria-pressed="true"] {
	--_bg: var( --mgp-brand );
	--_bd: var( --mgp-brand );
	--_fg: var( --mgp-brand-ink );
}

.moongate-pb button.moongate-pb__slot[aria-pressed="true"] .moongate-pb__slot-sub {
	color: inherit;
	opacity: 0.85;
}

.moongate-pb button.moongate-pb__slot:disabled {
	--_bg: var( --mgp-surface-2 );
	--_bd: transparent;
	opacity: 0.5;
}

.moongate-pb button.moongate-pb__slot:disabled .moongate-pb__slot-time {
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}

.moongate-pb__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

/* Slot info icon + popover ("Info Icon Box" text from the API's info_box field). */
.moongate-pb__slot-time .moongate-pb__info {
	display: inline-grid;
	place-items: center;
	width: 1.05em;
	height: 1.05em;
	margin-left: 0.35em;
	vertical-align: 0.08em;
	border: 1.5px solid var( --mgp-brand );
	border-radius: 50%;
	color: var( --mgp-brand );
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 0.62em;
	font-weight: 700;
	font-style: italic;
	line-height: 1;
	cursor: pointer;
}

.moongate-pb__slot[aria-pressed="true"] .moongate-pb__info {
	border-color: var( --mgp-brand-ink );
	color: var( --mgp-brand-ink );
}

.moongate-pb__info:focus-visible {
	outline: 2px solid var( --mgp-brand );
	outline-offset: 2px;
}

.moongate-pb__pop {
	position: absolute;
	z-index: 40;
	max-width: 300px;
	background: var( --mgp-surface-2 );
	border: 1px solid var( --mgp-line-strong );
	border-radius: 12px;
	padding: 0.75rem 0.95rem;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var( --mgp-text );
	box-shadow: 0 12px 30px rgba( 0, 0, 0, 0.45 );
}

.moongate-pb__tag {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: var( --mgp-accent );
	color: #fff;
	justify-self: start;
}

.moongate-pb button.moongate-pb__slot[aria-pressed="true"] .moongate-pb__tag {
	background: var( --mgp-brand-ink );
	color: var( --mgp-accent );
}

.moongate-pb__rooms {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 180px, 1fr ) );
	gap: 0.6rem;
}

.moongate-pb button.moongate-pb__room {
	--_bg: var( --mgp-surface );
	--_bd: var( --mgp-line );
	--_fg: var( --mgp-text );
	border-radius: 12px;
	padding: 0.75rem 0.85rem;
	text-align: left;
	width: 100%;
	display: grid;
	gap: 0.1rem;
}

.moongate-pb__room span {
	font-size: 0.85rem;
	color: var( --mgp-muted );
}

.moongate-pb button.moongate-pb__room[aria-pressed="true"] {
	--_bg: var( --mgp-brand );
	--_bd: var( --mgp-brand );
	--_fg: var( --mgp-brand-ink );
}

.moongate-pb button.moongate-pb__room[aria-pressed="true"] span {
	color: inherit;
	opacity: 0.85;
}

.moongate-pb__subtitle {
	font-family: var( --mgp-heading-font );
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-size: 1.2rem;
	margin: 0;
}

.moongate-pb__note {
	font-size: 0.92rem;
	color: var( --mgp-muted );
	padding: 0.6rem 0.8rem;
	border-radius: 10px;
	background: var( --mgp-surface-2 );
}

.moongate-pb__note p {
	margin: 0;
	max-width: none;
}

.moongate-pb__note p + p {
	margin-top: 0.45rem;
}

.moongate-pb__note b {
	color: var( --mgp-text );
}

.moongate-pb__callout {
	border-radius: 12px;
	padding: 0.9rem 1rem;
	display: grid;
	gap: 0.25rem;
	border: 1px solid transparent;
}

.moongate-pb__callout b {
	font-size: 1.05rem;
}

.moongate-pb__callout--call {
	background: var( --mgp-call-soft );
	border-color: var( --mgp-call );
}

.moongate-pb__callout--danger {
	background: var( --mgp-danger-soft );
	border-color: var( --mgp-danger );
}

.moongate-pb__callout--ok {
	background: var( --mgp-ok-soft );
	border-color: var( --mgp-ok );
}

/* ---------------------------------------------------------------------------
   Details form
   --------------------------------------------------------------------------- */
.moongate-pb__form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.8rem;
	margin: 0;
}

.moongate-pb__field {
	display: grid;
	gap: 0.3rem;
}

.moongate-pb__field--wide {
	grid-column: 1 / -1;
}

.moongate-pb__field label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var( --mgp-text );
	margin: 0;
}

.moongate-pb__field label small {
	color: var( --mgp-muted );
	font-weight: 400;
}

.moongate-pb__field textarea {
	min-height: 5rem;
	resize: vertical;
}

.moongate-pb__field.is-bad input,
.moongate-pb__field.is-bad select {
	border-color: var( --mgp-danger ) !important;
}

.moongate-pb__err {
	font-size: 0.8rem;
	color: var( --mgp-danger );
}

.moongate-pb__stepper {
	display: inline-grid;
	justify-self: start; /* don't stretch to the field's width */
	grid-template-columns: 2.6rem 3.6rem 2.6rem;
	border: 1px solid var( --mgp-line-strong );
	border-radius: 10px;
	overflow: hidden;
}

.moongate-pb button.moongate-pb__stepper-btn {
	--_bg: var( --mgp-surface-2 );
	--_fg: var( --mgp-text );
	border: 0 !important;
	border-radius: 0;
	font-size: 1.3rem;
	line-height: 1;
	height: 2.7rem;
	padding: 0;
}

.moongate-pb__stepper input {
	border: 0 !important;
	border-radius: 0;
	text-align: center;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	padding: 0.4rem 0.2rem;
	-moz-appearance: textfield;
}

.moongate-pb__stepper input::-webkit-outer-spin-button,
.moongate-pb__stepper input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Honeypot — off-screen, never display:none (some bots skip hidden fields). */
.moongate-pb__hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.moongate-pb button.moongate-pb__btn {
	--_bg: var( --mgp-brand );
	--_fg: var( --mgp-brand-ink );
	--_bd: var( --mgp-brand );
	border-radius: var( --mgp-btn-radius );
	padding: 0.9rem 1.2rem;
	font-weight: 700;
	font-size: 1.05rem;
	width: 100%;
	text-align: center;
}

.moongate-pb button.moongate-pb__btn:hover:not( :disabled ) {
	filter: brightness( 1.08 );
}

.moongate-pb button.moongate-pb__btn:disabled {
	--_bg: var( --mgp-surface-2 );
	--_fg: var( --mgp-muted );
	--_bd: var( --mgp-line );
}

.moongate-pb button.moongate-pb__btn--ghost {
	--_bg: transparent;
	--_fg: var( --mgp-text );
	--_bd: var( --mgp-line-strong );
}

/* ---------------------------------------------------------------------------
   Checkout — the earlier steps and the summary fold away; the pay step stands alone
   --------------------------------------------------------------------------- */
.moongate-pb.is-paying [data-step="package"],
.moongate-pb.is-paying [data-step="date"],
.moongate-pb.is-paying [data-step="time"],
.moongate-pb.is-paying [data-step="details"],
.moongate-pb.is-paying .moongate-pb__aside,
.moongate-pb.is-paying .moongate-pb__bar,
.moongate-pb.is-done .moongate-pb__step:not( [data-step="done"] ),
.moongate-pb.is-done .moongate-pb__aside,
.moongate-pb.is-done .moongate-pb__bar {
	display: none;
}

/* The wizard rules for the rail/nav sit later in the cascade at equal specificity, so the
   confirmed screen must out-rank them. */
.moongate-pb.is-done .moongate-pb__rail,
.moongate-pb.is-done .moongate-pb__wnav {
	display: none !important;
}

.moongate-pb.is-paying,
.moongate-pb.is-done {
	grid-template-columns: minmax( 0, 1fr );
	padding-bottom: 0 !important;
}

.moongate-pb__step--pay {
	max-width: 640px;
}

.moongate-pb__summaryline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 0.9rem;
	align-items: center;
	font-weight: 600;
}

.moongate-pb__hold-wrap {
	display: grid;
	gap: 0.9rem;
}

.moongate-pb__hold {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: var( --mgp-warn-soft );
	border: 1px solid var( --mgp-warn );
	border-radius: 12px;
	padding: 0.75rem 1rem;
}

.moongate-pb__hold-clock {
	font-family: var( --mgp-heading-font );
	font-weight: 800;
	font-size: 1.7rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
}

.moongate-pb__hold.is-late {
	background: var( --mgp-danger-soft );
	border-color: var( --mgp-danger );
}

@media ( prefers-reduced-motion: no-preference ) {
	.moongate-pb__hold.is-late .moongate-pb__hold-clock {
		animation: moongate-pb-pulse 1s ease-in-out infinite;
	}
}

@keyframes moongate-pb-pulse {
	50% { opacity: 0.4; }
}

.moongate-pb__lines {
	display: grid;
	gap: 0.35rem;
}

.moongate-pb__line {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-variant-numeric: tabular-nums;
}

.moongate-pb__line span:last-child {
	white-space: nowrap;
}

.moongate-pb__line--total {
	font-weight: 700;
	font-size: 1.15rem;
	border-top: 1px solid var( --mgp-line );
	padding-top: 0.5rem;
	margin-top: 0.2rem;
}

.moongate-pb__muted {
	color: var( --mgp-muted );
	font-size: 0.9rem;
	margin: 0;
}

.moongate-pb__stripe {
	border: 1px solid var( --mgp-line-strong );
	border-radius: 12px;
	padding: 0.9rem;
	display: grid;
	gap: 0.6rem;
	background: var( --mgp-surface );
	min-height: 6rem;
}

.moongate-pb__stripe-foot {
	font-size: 0.75rem;
	color: var( --mgp-muted );
	text-align: right;
	margin: 0;
}

.moongate-pb button.moongate-pb__btn--pay {
	--_bg: var( --mgp-ok );
	--_bd: var( --mgp-ok );
	--_fg: #ffffff;
}

.moongate-pb button.moongate-pb__btn.is-busy {
	opacity: 0.7;
	cursor: progress;
}

.moongate-pb__done {
	display: grid;
	gap: 1rem;
	text-align: center;
	padding: 1rem 0 2rem;
	max-width: 640px;
	margin: 0 auto;
}

.moongate-pb__done .moongate-pb__card {
	text-align: left;
}

.moongate-pb__done-check {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var( --mgp-ok );
	color: #fff;
	display: grid;
	place-items: center;
	margin: 0 auto;
	font-size: 2rem;
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Desktop step rail — view.js adds .is-wizard above 720px; without it (mobile,
   no JS, the block editor preview) the rail and nav stay hidden and the page
   keeps the stacked reveal-as-you-go flow.
   --------------------------------------------------------------------------- */
.moongate-pb__rail,
.moongate-pb__wnav {
	display: none;
}

.moongate-pb.is-wizard .moongate-pb__rail {
	display: flex;
	border: 1px solid var( --mgp-line );
	border-radius: 999px;
	overflow: hidden;
}

.moongate-pb.is-wizard button.moongate-pb__rail-step {
	--_bg: var( --mgp-surface-2 );
	--_fg: var( --mgp-muted );
	flex: 1;
	border: 0 !important;
	border-radius: 0;
	padding: 0.55rem 0.6rem;
	font-weight: 600;
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
}

.moongate-pb.is-wizard button.moongate-pb__rail-step + button.moongate-pb__rail-step {
	border-left: 1px solid var( --mgp-line ) !important;
}

.moongate-pb__rail-n {
	display: inline-grid;
	place-items: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 50%;
	background: var( --mgp-surface );
	font-size: 0.72rem;
	font-variant-numeric: tabular-nums;
}

.moongate-pb.is-wizard button.moongate-pb__rail-step:disabled {
	cursor: default;
	opacity: 0.6;
}

.moongate-pb.is-wizard button.moongate-pb__rail-step.is-done {
	--_fg: var( --mgp-text );
	opacity: 1;
}

.moongate-pb.is-wizard button.moongate-pb__rail-step.is-done .moongate-pb__rail-n {
	background: var( --mgp-ok );
	color: #04140a;
}

.moongate-pb.is-wizard button.moongate-pb__rail-step.is-now {
	--_bg: var( --mgp-surface );
	--_fg: var( --mgp-text );
	opacity: 1;
}

.moongate-pb.is-wizard button.moongate-pb__rail-step.is-now .moongate-pb__rail-n {
	background: var( --mgp-brand );
	color: var( --mgp-brand-ink );
}

.moongate-pb.is-wizard .moongate-pb__wnav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.moongate-pb.is-wizard .moongate-pb__wnav .moongate-pb__btn {
	width: auto;
	padding-left: 1.6rem;
	padding-right: 1.6rem;
}

/* Wizard steps sit in cards, as in the approved mockup: the calendar, the times and the form
   each get the panel treatment (mobile keeps the open stacked layout). */
.moongate-pb.is-wizard [data-step="date"],
.moongate-pb.is-wizard [data-step="time"],
.moongate-pb.is-wizard [data-step="details"],
.moongate-pb.is-wizard [data-step="pay"] {
	background: var( --mgp-surface );
	border: 1px solid var( --mgp-line );
	border-radius: var( --mgp-radius );
	padding: 1rem 1.1rem;
	align-content: start;
}

/* Inside a carded step, the charge breakdown doesn't need its own box within the box. */
.moongate-pb.is-wizard [data-step="pay"] .moongate-pb__lines {
	background: transparent;
	border: 0;
	padding: 0.2rem 0;
}

/* Step 2: calendar and times side by side. Everything else in the flow spans both columns. */
.moongate-pb.is-wizard[data-wstep="2"] .moongate-pb__flow {
	grid-template-columns: minmax( 0, 8fr ) minmax( 0, 7fr );
}

.moongate-pb.is-wizard[data-wstep="2"] .moongate-pb__flow > * {
	grid-column: 1 / -1;
}

.moongate-pb.is-wizard[data-wstep="2"] .moongate-pb__flow > [data-step="date"] {
	grid-column: 1;
}

.moongate-pb.is-wizard[data-wstep="2"] .moongate-pb__flow > [data-step="time"] {
	grid-column: 2;
}

/* The wizard nav is the mover; the summary keeps the numbers but drops its button. */
.moongate-pb.is-wizard .moongate-pb__aside .moongate-pb__btn {
	display: none;
}

/* ---------------------------------------------------------------------------
   Summary — sticky aside on desktop, bottom bar on mobile
   --------------------------------------------------------------------------- */
/* Sticky is the no-JS fallback only: view.js pins the panel itself on desktop, because sticky
   can't leave its container and the widget is short until the details form opens. */
.moongate-pb__aside {
	position: sticky;
	top: var( --mgp-sticky-top );
	z-index: 2;
}

.moongate-pb__summary {
	display: grid;
	gap: 0.8rem;
}

.moongate-pb__summary-title {
	font-size: 1.3rem;
	letter-spacing: 0.03em;
}

.moongate-pb__rows {
	display: grid;
	gap: 0.35rem;
	font-size: 0.95rem;
}

.moongate-pb__rows > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.moongate-pb__rows span:first-child {
	color: var( --mgp-muted );
}

.moongate-pb__rows span:last-child {
	font-weight: 600;
	text-align: right;
}

.moongate-pb__hint {
	font-size: 0.85rem;
	color: var( --mgp-muted );
	margin: 0;
}

.moongate-pb__due {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-top: 1px solid var( --mgp-line );
	padding-top: 0.6rem;
}

.moongate-pb__due b {
	font-size: 1.3rem;
	font-variant-numeric: tabular-nums;
}

.moongate-pb__bar {
	display: none;
}

@media ( max-width: 720px ) {
	.moongate-pb {
		grid-template-columns: 1fr;
		padding-bottom: 7.5rem;
	}

	.moongate-pb__aside {
		display: none;
	}

	.moongate-pb__bar {
		display: block;
		position: sticky;
		bottom: 0;
		z-index: 5;
		margin: 0 0 -7.5rem;
		background: var( --mgp-surface );
		border-top: 1px solid var( --mgp-line );
		padding: 0.75rem 1rem calc( 0.9rem + env( safe-area-inset-bottom ) );
		box-shadow: 0 -10px 30px rgba( 0, 0, 0, 0.25 );
	}

	.moongate-pb button.moongate-pb__bar-row {
		--_fg: var( --mgp-text );
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 1rem;
		width: 100%;
		padding: 0;
		margin-bottom: 0.6rem;
		text-align: left;
	}

	.moongate-pb__bar-row b {
		font-size: 1.15rem;
		font-variant-numeric: tabular-nums;
	}

	.moongate-pb__bar-row small {
		display: block;
		color: var( --mgp-muted );
		font-size: 0.85rem;
	}

	.moongate-pb__bar-detail {
		display: none;
		font-size: 0.9rem;
		margin-bottom: 0.6rem;
	}

	.moongate-pb__bar.is-open .moongate-pb__bar-detail {
		display: grid;
		gap: 0.25rem;
	}

	.moongate-pb__form {
		grid-template-columns: 1fr;
	}

	.moongate-pb__slots {
		grid-template-columns: 1fr 1fr;
	}

	.moongate-pb__cal-grid {
		gap: 0.3rem;
	}

	.moongate-pb button.moongate-pb__day {
		border-radius: 8px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.moongate-pb button,
	.moongate-pb button:hover {
		transition: none;
		transform: none;
	}
}
