/* Element: Palatio Booking Panel — premium, mobile-first
   Presentation only. Class/ID names are unchanged (JS depends on them).
   Layout reacts to the PANEL's own width via container queries (v1.1.1),
   so it stays cleanly stacked inside a narrow WooCommerce product column.
   Recolour the whole panel by editing the tokens in .palatio-booking. */

.palatio-booking {
	/* Brand tokens — override these to match your palette */
	--pal-bg: #ffffff;
	--pal-soft: #f9f7f6;
	--pal-ink: #292921;
	--pal-muted: #68685f;
	--pal-line: #ded8cf;
	--pal-line-strong: #cdc6bb;
	--pal-accent: #292921;
	--pal-accent-hover: #0f0e0d;
	--pal-accent-ink: #ffffff;
	--pal-focus: #9f8055;
	--pal-gold: #b99a6b;
	--pal-danger: #8a1c1c;
	--pal-radius: 16px;
	--pal-radius-sm: 11px;
	--pal-shadow: 0 1px 2px rgba(20,18,16,.04), 0 8px 24px -12px rgba(20,18,16,.14);
	--pal-shadow-cta: 0 8px 20px -8px rgba(20,18,16,.5);
	/* Elegant editorial serif for display text; system-only = zero extra requests */
	--pal-serif: "Luxo Orea", Georgia, "Times New Roman", serif;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 24px 0 0;
	color: var(--pal-ink);
	font-family: inherit;
	container-type: inline-size;
	container-name: palatio;
	-webkit-font-smoothing: antialiased;
}

.palatio-booking *,
.palatio-booking *::before,
.palatio-booking *::after { box-sizing: border-box; }
.palatio-booking [hidden] { display: none !important; }

.palatio-booking ::selection { background: var(--pal-focus); color: #fff; }

.palatio-booking__eyebrow {
	margin: 0 0 7px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .17em;
	text-transform: uppercase;
	color: #755d3f;
}

/* Title — editorial serif */
.palatio-booking__title {
	margin: 0 0 8px;
	font-family: var(--pal-serif);
	font-size: 30px;
	line-height: 1.1;
	font-weight: 600;
	letter-spacing: -0.01em;
}
.palatio-booking__intro {
	max-width: 660px;
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--pal-muted);
}

.palatio-booking__progress {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	max-width: 520px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}
.palatio-booking__progress li {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--pal-muted);
}
.palatio-booking__progress li::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	margin-left: 2px;
	background: var(--pal-line);
}
.palatio-booking__progress li:last-child::after { display: none; }
.palatio-booking__progress span {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	border: 1px solid var(--pal-line-strong);
	border-radius: 50%;
	font-variant-numeric: tabular-nums;
	background: #fff;
}
.palatio-booking__progress .is-current { color: var(--pal-ink); }
.palatio-booking__progress .is-current span {
	color: #fff;
	background: var(--pal-ink);
	border-color: var(--pal-ink);
}
.palatio-booking__progress .is-complete span {
	color: var(--pal-ink);
	background: #fff;
	border-color: var(--pal-gold);
}

/* Panel: single column by default (safe at any container width) */
.palatio-booking__panel {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.palatio-booking__main,
.palatio-booking__summary {
	min-width: 0;
	background: var(--pal-bg);
	border: 1px solid var(--pal-line);
	border-radius: var(--pal-radius);
	padding: 22px;
	box-shadow: var(--pal-shadow);
}

/* Steps */
.palatio-booking__step { margin: 0 0 24px; }
.palatio-booking__step:last-child { margin-bottom: 0; }
.palatio-booking__step--inline { display: flex; flex-wrap: wrap; gap: 14px; }
.palatio-booking__field { flex: 0 0 auto; }
.palatio-booking__field--grow { flex: 1 1 160px; min-width: 0; }

.palatio-booking__step-num {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #755d3f;
}

.palatio-booking__label {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pal-ink);
}

/* Inputs */
.palatio-booking__date,
.palatio-booking__people,
.palatio-booking__notes {
	width: 100%;
	min-height: 50px;
	padding: 13px 15px;
	font-size: 16px; /* prevents iOS zoom */
	color: var(--pal-ink);
	background: #fff;
	border: 1px solid var(--pal-line-strong);
	border-radius: var(--pal-radius-sm);
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.palatio-booking__date:hover,
.palatio-booking__notes:hover { border-color: var(--pal-ink); }
.palatio-booking__people { max-width: 96px; text-align: center; }
.palatio-booking__people[readonly] { background: #f3f0eb; cursor: default; }
.palatio-booking__field-note { display: block; margin-top: 6px; color: var(--pal-muted); font-size: 12px; line-height: 1.4; }

/* Focus states */
.palatio-booking__date:focus-visible,
.palatio-booking__people:focus-visible,
.palatio-booking__notes:focus-visible,
.palatio-booking__time:focus-visible,
.palatio-booking__cta:focus-visible {
	outline: none;
	border-color: var(--pal-focus);
	box-shadow: 0 0 0 3px rgba(185,154,107,.3);
}

/* Time slots */
.palatio-booking__times {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 9px;
}
.palatio-booking__times[aria-busy="true"] { opacity: .5; }

.palatio-booking__hint {
	grid-column: 1 / -1;
	margin: 0;
	padding: 4px 0;
	font-size: 14px;
	color: var(--pal-muted);
}

.palatio-booking button.palatio-booking__time {
	min-height: 48px; /* >= 44px tap target */
	padding: 11px 8px;
	font-size: 15px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: var(--pal-ink);
	background: #fff;
	border: 1px solid var(--pal-line-strong);
	border-radius: var(--pal-radius-sm);
	cursor: pointer;
	transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.palatio-booking button.palatio-booking__time:hover:not(:disabled) { border-color: var(--pal-ink); transform: translateY(-1px); }
.palatio-booking button.palatio-booking__time:disabled { cursor: wait; opacity: .55; }
.palatio-booking button.palatio-booking__time.is-selected {
	background: var(--pal-accent);
	color: var(--pal-accent-ink);
	border-color: var(--pal-accent);
	box-shadow: var(--pal-shadow-cta);
}

/* Summary card — premium sticky panel with a hairline accent */
.palatio-booking__summary {
	background: var(--pal-soft);
	position: relative;
	overflow: hidden;
}
.palatio-booking__summary::before {
	content: "";
	position: absolute; inset: 0 0 auto 0;
	height: 3px;
	background: linear-gradient(90deg, var(--pal-focus), transparent 70%);
}
.palatio-booking__summary-package {
	margin: 0 0 4px;
	font-family: var(--pal-serif);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.15;
}
.palatio-booking__summary-meta { margin: 0 0 16px; font-size: 13px; color: var(--pal-muted); }

.palatio-booking__summary-slot {
	margin: 0 0 14px;
	padding: 13px 15px;
	font-size: 15px;
	font-weight: 600;
	background: #fff;
	border: 1px dashed var(--pal-line-strong);
	border-radius: var(--pal-radius-sm);
	color: var(--pal-muted);
	transition: border-color .15s ease, color .15s ease;
}
.palatio-booking__summary-slot.is-active {
	color: var(--pal-ink);
	border-style: solid;
	border-color: var(--pal-focus);
	background: #fff;
}

.palatio-booking__summary-price {
	margin: 0 0 18px;
	font-family: var(--pal-serif);
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.palatio-booking__summary-price .amount,
.palatio-booking__summary-price bdi { font-variant-numeric: tabular-nums; }

.palatio-booking__reservation {
	margin: -6px 0 14px;
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.4;
	color: #4b4b43;
	background: #fff;
	border-left: 3px solid var(--pal-gold);
	border-radius: 0 8px 8px 0;
}

/* Error */
.palatio-booking__error {
	margin: 0 0 14px;
	padding: 11px 15px;
	font-size: 14px;
	color: var(--pal-danger);
	background: #fdf0f0;
	border: 1px solid #f1c9c9;
	border-radius: var(--pal-radius-sm);
}

/* CTA */
.palatio-booking button.palatio-booking__cta {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 56px;
	padding: 15px 20px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--pal-accent-ink);
	background: var(--pal-accent);
	border: none;
	border-radius: var(--pal-radius-sm);
	cursor: pointer;
	box-shadow: var(--pal-shadow-cta);
	transition: background .15s ease, transform .12s ease, box-shadow .15s ease, opacity .15s ease;
}
.palatio-booking button.palatio-booking__cta:hover:not(:disabled) { background: var(--pal-accent-hover); transform: translateY(-1px); }
.palatio-booking button.palatio-booking__cta:active:not(:disabled) { transform: translateY(0); }
.palatio-booking button.palatio-booking__cta:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.palatio-booking button.palatio-booking__cta.is-loading { cursor: progress; color: transparent; }
.palatio-booking button.palatio-booking__cta.is-loading::after {
	content: "";
	position: absolute;
	width: 20px; height: 20px;
	border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: palatio-spin .7s linear infinite;
}
@keyframes palatio-spin { to { transform: rotate(360deg); } }

.palatio-booking__trust {
	margin: 14px 0 0;
	font-size: 12px;
	text-align: center;
	letter-spacing: .01em;
	color: var(--pal-muted);
}

/* Two-column ONLY when the panel itself is wide enough (>= 760px). */
@container palatio (min-width: 760px) {
	.palatio-booking__panel { flex-direction: row; align-items: flex-start; gap: 20px; }
	.palatio-booking__main { flex: 1 1 auto; min-width: 0; padding: 30px; }
	.palatio-booking__summary { flex: 0 0 320px; position: sticky; top: 24px; padding: 26px; }
}

/* Disclosures — cancellation policy + good to know */
.palatio-booking__policy {
	margin: 12px 0 0;
	padding: 12px 15px;
	background: #fff;
	border: 1px solid var(--pal-line);
	border-radius: var(--pal-radius-sm);
	font-size: 13px;
	color: var(--pal-muted);
}
.palatio-booking__policy summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--pal-ink);
	min-height: 24px;
	list-style: none;
	position: relative;
	padding-right: 20px;
}
.palatio-booking__policy summary::-webkit-details-marker { display: none; }
.palatio-booking__policy summary::after {
	content: "+";
	position: absolute; right: 2px; top: -1px;
	font-size: 16px; line-height: 1;
	color: var(--pal-muted);
}
.palatio-booking__policy[open] summary::after { content: "–"; }
.palatio-booking__policy p { margin: 8px 0 0; }
.palatio-booking__gtk ul { margin: 8px 0 0; padding-left: 18px; }
.palatio-booking__gtk li { margin: 0 0 5px; font-size: 13px; color: var(--pal-ink); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.palatio-booking__time,
	.palatio-booking__cta,
	.palatio-booking__date,
	.palatio-booking__notes { transition: none; }
	.palatio-booking__time:hover,
	.palatio-booking__cta:hover:not(:disabled) { transform: none; }
	.palatio-booking__cta.is-loading::after { animation: none; }
}
