/* Endora — "Reserve Your Date" booking form */

.bk-layout {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.25fr);
	gap: clamp(2.5rem, 6vw, 6rem);
	align-items: start;
}
.bk-aside { position: sticky; top: 120px; }
.bk-aside .section-title { margin-bottom: 1.6rem; }
.bk-aside__content { margin-bottom: 1.6rem; color: var(--c-muted); }
.bk-how { list-style: none; margin: 0 0 2.4rem; padding: 0; counter-reset: bkhow; }
.bk-how li {
	position: relative;
	padding: 0 0 1.6rem 3.4rem;
	counter-increment: bkhow;
}
.bk-how li::before {
	content: "0" counter(bkhow);
	position: absolute;
	left: 0;
	top: -0.2rem;
	font-family: var(--f-serif);
	font-style: italic;
	font-size: 1.6rem;
	color: var(--c-gold);
}
.bk-how li::after {
	content: "";
	position: absolute;
	left: 0.85rem;
	top: 2.1rem;
	bottom: 0.4rem;
	width: 1px;
	background: var(--c-line);
}
.bk-how li:last-child::after { display: none; }
.bk-how strong { display: block; font-family: var(--f-serif); font-weight: 400; font-size: 1.35rem; color: var(--c-ivory); margin-bottom: 0.25rem; }
.bk-how span { color: var(--c-muted); font-size: 0.95rem; }
.bk-aside__help { padding-top: 1.6rem; border-top: 1px solid var(--c-line); }
.bk-aside__help p { margin: 0 0 0.8rem; color: var(--c-muted); font-size: 0.95rem; }

.bk-card {
	position: relative;
	padding: clamp(1.5rem, 4vw, 3rem);
	background: linear-gradient(160deg, rgba(245, 240, 232, 0.045), rgba(245, 240, 232, 0.01));
	border: 1px solid var(--c-line);
}
.bk-card::before {
	content: "";
	position: absolute;
	top: -1px;
	left: clamp(1.5rem, 4vw, 3rem);
	width: 64px;
	height: 2px;
	background: var(--c-gold);
}

/* Steps */
.bk-step + .bk-step { margin-top: 2.4rem; }
.bk-step__label {
	display: flex;
	align-items: baseline;
	gap: 0.8rem;
	margin: 0 0 1.2rem;
	font-family: var(--f-serif);
	font-size: 1.55rem;
	color: var(--c-ivory);
}
.bk-step__label span { font-style: italic; font-size: 1.1rem; color: var(--c-gold); }

/* Fields */
.bk-form .form-field > label,
.bk-form legend {
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--c-muted);
}
.bk-form input[type="time"] {
	width: 100%;
	min-height: 52px;
	padding: 0.85rem 1rem;
	background: rgba(245, 240, 232, 0.04);
	color: var(--c-ivory);
	border: 1px solid var(--c-line-strong);
	border-radius: var(--radius);
	font: inherit;
	color-scheme: dark;
}
.bk-form input[type="time"]:focus { outline: none; border-color: var(--c-gold); }
.bk-form .has-error input,
.bk-form .has-error select,
.bk-form .has-error textarea { border-color: #e79b8f !important; }
.bk-error { font-size: 0.85rem; color: #f1c3bb; }
.bk-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.bk-form legend { padding: 0; margin-bottom: 0.7rem; }

/* Chips (checkboxes / radios) */
.bk-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.bk-chip { position: relative; cursor: pointer; }
.bk-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-chip span {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0.5rem 1rem;
	border: 1px solid var(--c-line-strong);
	border-radius: 999px;
	font-size: 0.9rem;
	color: var(--c-text);
	transition: border-color 0.25s, background-color 0.25s, color 0.25s;
}
.bk-chip:hover span { border-color: var(--c-gold); }
.bk-chip input:checked + span { background: rgba(200, 169, 106, 0.16); border-color: var(--c-gold); color: var(--c-gold-soft); }
.bk-chip input:checked + span::before { content: "✓"; margin-right: 0.45rem; font-size: 0.8rem; }
.bk-chip input:focus-visible + span { outline: 2px solid var(--c-gold); outline-offset: 2px; }

/* Calendar */
.bk-date-wrap .form-field > label { margin-bottom: 0.2rem; }
.bk-cal {
	border: 1px solid var(--c-line-strong);
	background: rgba(11, 10, 9, 0.35);
	padding: clamp(0.9rem, 2.5vw, 1.4rem);
	user-select: none;
}
.bk-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.bk-cal__month { margin: 0; font-family: var(--f-serif); font-size: 1.45rem; color: var(--c-ivory); }
.bk-cal__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--c-line-strong);
	border-radius: 50%;
	color: var(--c-ivory);
	cursor: pointer;
	transition: border-color 0.25s, color 0.25s;
}
.bk-cal__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.bk-cal__nav:hover:not(:disabled) { border-color: var(--c-gold); color: var(--c-gold); }
.bk-cal__nav:disabled { opacity: 0.25; cursor: default; }
.bk-cal__dow,
.bk-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-cal__dow span {
	padding: 0.35rem 0;
	text-align: center;
	font-size: 0.65rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--c-faint);
}
.bk-day {
	position: relative;
	aspect-ratio: 1 / 0.86;
	min-height: 38px;
	padding: 0;
	background: transparent;
	border: 1px solid transparent;
	color: var(--c-ivory);
	font-family: var(--f-sans);
	font-size: 0.95rem;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.bk-day--pad { aspect-ratio: auto; min-height: 0; border: 0; }
.bk-day.is-free { background: rgba(245, 240, 232, 0.04); }
.bk-day.is-free:hover { border-color: var(--c-gold); color: var(--c-gold-soft); }
.bk-day.is-out { color: rgba(245, 240, 232, 0.16); cursor: default; }
.bk-day.is-taken {
	color: rgba(245, 240, 232, 0.3);
	background:
		linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(245, 240, 232, 0.2) 50%, transparent calc(50% + 0.5px)),
		rgba(245, 240, 232, 0.015);
	cursor: not-allowed;
}
.bk-day.is-selected { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-black); font-weight: 500; }
.bk-day:focus-visible { outline: 2px solid var(--c-gold-soft); outline-offset: 1px; z-index: 1; }
.bk-cal__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1.2rem;
	margin-top: 0.9rem;
	font-size: 0.8rem;
	color: var(--c-muted);
}
.bk-cal__key { display: inline-flex; align-items: center; gap: 0.45rem; }
.bk-cal__key::before { content: ""; width: 14px; height: 14px; border: 1px solid var(--c-line-strong); background: rgba(245, 240, 232, 0.06); }
.bk-cal__key--taken::before {
	background: linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(245, 240, 232, 0.35) 50%, transparent calc(50% + 0.5px));
}
.bk-cal__status { margin-left: auto; color: var(--c-faint); font-style: italic; }
.bk-cal__chosen {
	margin: 0.9rem 0 0;
	padding-top: 0.9rem;
	border-top: 1px solid var(--c-line);
	font-family: var(--f-serif);
	font-size: 1.35rem;
	color: var(--c-ivory);
}
.bk-cal__chosen span {
	display: block;
	font-family: var(--f-sans);
	font-size: 0.65rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--c-gold);
	margin-bottom: 0.2rem;
}
.bk-taken {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.8rem 1.2rem;
	margin-top: 0.9rem;
	padding: 1rem 1.2rem;
	border: 1px solid rgba(231, 155, 143, 0.55);
	background: rgba(231, 155, 143, 0.08);
}
.bk-taken p { margin: 0; flex: 1 1 260px; color: #f1c3bb; font-size: 0.95rem; }
.bk-taken .icon { width: 18px; height: 18px; }

/* Optional section */
.bk-more { margin-top: 2.4rem; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.bk-more summary {
	position: relative;
	display: block;
	padding: 1.25rem 3rem 1.25rem 0;
	cursor: pointer;
	list-style: none;
}
.bk-more summary::-webkit-details-marker { display: none; }
.bk-more__title { display: block; font-family: var(--f-serif); font-size: 1.4rem; color: var(--c-ivory); }
.bk-more__hint { display: block; font-size: 0.875rem; color: var(--c-faint); margin-top: 0.15rem; }
.bk-more__icon {
	position: absolute;
	right: 0.2rem;
	top: 50%;
	width: 34px;
	height: 34px;
	margin-top: -17px;
	border: 1px solid var(--c-line-strong);
	border-radius: 50%;
	transition: transform 0.35s var(--ease), border-color 0.25s;
}
.bk-more__icon::before,
.bk-more__icon::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 1px;
	margin: 0 0 0 -6px;
	background: var(--c-gold);
}
.bk-more__icon::after { transform: rotate(90deg); transition: transform 0.35s var(--ease); }
.bk-more[open] .bk-more__icon::after { transform: rotate(0deg); }
.bk-more summary:hover .bk-more__icon { border-color: var(--c-gold); }
.bk-more summary:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 4px; }
.bk-more__body { padding: 0.4rem 0 1.8rem; }

/* Consent */
.bk-consent { margin-top: 1.8rem !important; }
.bk-check { display: flex !important; align-items: flex-start; gap: 0.8rem; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-size: 0.975rem !important; color: var(--c-text) !important; }
.bk-check input {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0.1rem 0 0;
	accent-color: var(--c-gold);
	cursor: pointer;
}

.bk-form .form-submit { margin-top: 1.6rem; }
.bk-form button[type="submit"][disabled] { opacity: 0.7; cursor: progress; }

/* Thank you */
.bk-thanks { text-align: center; padding: clamp(1.5rem, 5vw, 3rem) 0; outline: none; animation: bkIn 0.8s var(--ease) both; }
.bk-thanks__icon svg { width: 72px; height: 72px; fill: none; stroke: var(--c-gold); stroke-width: 1.2; }
.bk-thanks__icon path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: bkTick 0.9s 0.35s var(--ease) forwards; }
.bk-thanks__title { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 1.2rem 0 0.8rem; }
.bk-thanks__text { max-width: 34rem; margin: 0 auto 1.4rem; color: var(--c-text); font-size: 1.05rem; }
.bk-thanks__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.6rem; margin: 0 0 1rem; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-gold); }
.bk-thanks__small { color: var(--c-faint); font-size: 0.875rem; margin: 0; }
@keyframes bkIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bkTick { to { stroke-dashoffset: 0; } }

@media (max-width: 960px) {
	.bk-layout { grid-template-columns: 1fr; }
	.bk-aside { position: static; }
	.bk-how { margin-bottom: 1.6rem; }
}
@media (max-width: 600px) {
	.bk-card { padding: 1.25rem 1rem 1.6rem; margin: 0 -0.25rem; }
	.bk-form .form-grid { grid-template-columns: 1fr; }
	.bk-cal { padding: 0.75rem 0.5rem; }
	.bk-cal__dow, .bk-cal__grid { gap: 3px; }
	.bk-day { min-height: 40px; font-size: 0.9rem; }
	.bk-cal__status { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.bk-thanks, .bk-thanks__icon path { animation: none; stroke-dashoffset: 0; }
}

/* Fixes */
.bk-form [hidden],
.bk-card [hidden] { display: none !important; }
.form-skin label.bk-chip,
.bk-chip { text-transform: none; letter-spacing: 0; font-size: inherit; font-weight: 400; color: inherit; }
.bk-chip span { text-transform: none; letter-spacing: 0.01em; }
.bk-thanks__icon { display: block; }
.bk-thanks__icon svg { display: block; margin: 0 auto; }

/* Packages from Perfex: one optional choice per group */
.bk-hint { margin: -0.3rem 0 0.9rem; font-size: 0.88rem; color: var(--c-text); opacity: 0.8; }
.bk-pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0.9rem 1.1rem; }
.bk-pkg { margin: 0; }
.bk-pkg select { width: 100%; }

/* Terms of Service: block on the form + reading dialog */
.bk-terms { margin-top: 2rem; padding: 1.2rem 1.3rem; border: 1px solid var(--c-line-strong); border-radius: var(--radius); background: rgba(245, 240, 232, 0.03); }
.bk-terms__lead { margin: 0 0 0.9rem; color: var(--c-text); font-size: 0.95rem; }
.bk-terms__open { margin-bottom: 1rem; }
.bk-terms__check input:disabled + span { opacity: 0.6; }
.bk-terms__inline { max-height: 320px; overflow: auto; margin-top: 1rem; padding-right: 0.5rem; font-size: 0.9rem; }
.bk-terms-lock { overflow: hidden; }
.bk-terms-dialog {
	width: min(760px, calc(100vw - 32px));
	max-height: min(86vh, 900px);
	padding: 0;
	border: 1px solid var(--c-line-strong);
	border-radius: var(--radius);
	background: var(--c-charcoal);
	color: var(--c-text);
	display: none;
	flex-direction: column;
}
.bk-terms-dialog[open] { display: flex; }
.bk-terms-dialog::backdrop { background: rgba(5, 4, 4, 0.78); backdrop-filter: blur(3px); }
.bk-terms-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--c-line); }
.bk-terms-dialog__head h2 { margin: 0; font-family: var(--f-serif); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--c-ivory); }
.bk-terms-dialog__close { width: 40px; height: 40px; border: 1px solid var(--c-line-strong); border-radius: 50%; background: none; color: var(--c-ivory); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.bk-terms-dialog__close:hover { border-color: var(--c-gold); color: var(--c-gold-soft); }
.bk-terms-dialog__body { flex: 1 1 auto; overflow-y: auto; padding: 1.2rem 1.4rem 1.6rem; font-size: 0.95rem; line-height: 1.65; overscroll-behavior: contain; }
.bk-terms-dialog__body:focus { outline: none; }
.bk-terms-dialog__body h3,
.bk-terms__inline h3 { margin: 1.4rem 0 0.5rem; font-family: var(--f-sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-gold-soft); }
.bk-terms-dialog__body h3:first-child { margin-top: 0; }
.bk-terms-dialog__body p,
.bk-terms-dialog__body ul { margin: 0 0 0.7rem; }
.bk-terms__thanks { text-align: center; margin-top: 1.6rem !important; color: var(--c-muted); }
.bk-terms-dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.4rem; border-top: 1px solid var(--c-line); }
.bk-terms-dialog__hint { font-size: 0.85rem; color: var(--c-muted); }
.bk-terms-dialog__foot .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
@media (max-width: 560px) {
	.bk-terms-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
	.bk-terms-dialog__foot .btn { width: 100%; }
}
