/* Blue Hour Booking – app-like booking flow. Follows the theme's light / night tokens when present. @author Mohammed Zaki */
.bh-app {
	--bh-ink: #1E1B4B;
	--bh-mint: #2DD4BF;
	--bh-mint-d: #14B8A6;
	--bh-peach: #FDBA74;
	--bh-bg: var(--bg, #0F0C29);
	--bh-surface: var(--surface, rgba(255, 255, 255, .06));
	--bh-solid: var(--surface-solid, #1E1B4B);
	--bh-line: var(--line, rgba(199, 210, 254, .16));
	--bh-text: var(--text, #E6E8FF);
	--bh-muted: var(--muted, #B3B7DE);
	--bh-head: var(--heading, #fff);
	--bh-chip: var(--chip, rgba(255, 255, 255, .08));
	--bh-input: var(--input, rgba(255, 255, 255, .07));
	--bh-link: var(--link, #5EEAD4);
	--bh-mint-text: var(--mint-text, #2DD4BF);
	--bh-spring: cubic-bezier(.34, 1.56, .64, 1);
	--bh-ease: cubic-bezier(.22, 1, .36, 1);
	--bh-f-head: var(--f-head, "Outfit", system-ui, sans-serif);
	color: var(--bh-text);
	font-family: var(--f-body, "Inter", system-ui, sans-serif);
}
html[lang^="ar"] .bh-app, html[lang^="ar"] .bh-app h1, html[lang^="ar"] .bh-app h2, html[lang^="ar"] .bh-app button, html[lang^="ar"] .bh-app input, html[lang^="ar"] .bh-app textarea { font-family: "Almarai", system-ui, sans-serif; }

/* full-screen page */
body.bh-fullscreen { margin: 0; min-height: 100vh; background: radial-gradient(900px 500px at 100% -10%, rgba(45, 212, 191, .16), transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(253, 186, 116, .14), transparent 60%), var(--bg, #0F0C29); background-attachment: fixed; color: var(--text, #E6E8FF); }
.bh-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)); background: var(--head-bg, rgba(15, 12, 41, .72)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line, rgba(199, 210, 254, .16)); }
.admin-bar .bh-top { top: 32px; }
.bh-top .bh-logo { color: var(--head-text, #fff); text-decoration: none; font-weight: 800; }
.bh-top-end { display: flex; align-items: center; gap: 8px; }
.bh-close { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--chip, rgba(255, 255, 255, .1)); color: var(--head-text, #fff); text-decoration: none; font-size: 26px; line-height: 1; transition: transform .35s var(--spring, ease); }
.bh-close:hover { transform: rotate(90deg); color: var(--head-text, #fff); }
.bh-main { padding: 0 16px; }

/* shell */
.bh-shell { max-width: 780px; margin: 0 auto; padding: 22px 0 130px; }
.bh-kicker { margin: 0 0 6px; color: var(--bh-mint-text); font: 700 12px/1 var(--bh-f-head); letter-spacing: .14em; text-transform: uppercase; }
html[lang^="ar"] .bh-kicker { letter-spacing: 0; }
.bh-title { margin: 0 0 14px; font: 800 clamp(1.6rem, 4vw, 2.3rem)/1.15 var(--bh-f-head); color: var(--bh-head); }
.bh-progress { height: 8px; border-radius: 99px; background: var(--bh-chip); overflow: hidden; }
.bh-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--bh-mint), var(--bh-peach)); transition: width .7s var(--bh-spring); }
html[dir="rtl"] .bh-progress span { margin-inline-start: auto; background: linear-gradient(270deg, var(--bh-mint), var(--bh-peach)); }
.bh-stepno { margin: 8px 0 0; font-size: 13.5px; color: var(--bh-muted); font-weight: 600; }
.bh-step { margin-top: 22px; }
.bh-step h2 { margin: 0 0 18px; font: 800 clamp(1.4rem, 3.4vw, 1.9rem)/1.2 var(--bh-f-head); color: var(--bh-head); outline: none; }
.bh-in-fwd { animation: bh-in-fwd .55s var(--bh-ease) both; }
.bh-in-back { animation: bh-in-back .55s var(--bh-ease) both; }
@keyframes bh-in-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes bh-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
html[dir="rtl"] .bh-in-fwd { animation-name: bh-in-back; }
html[dir="rtl"] .bh-in-back { animation-name: bh-in-fwd; }
.bh-sr, .bh-tiles legend, .bh-yachts legend { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bh-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset.bh-tiles, fieldset.bh-yachts, fieldset.bh-field { border: 0; padding: 0; margin: 0; min-width: 0; }

/* radio/checkbox cards */
.bh-tile input, .bh-yacht input, .bh-chip input, .bh-extra input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bh-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bh-tile, .bh-yacht, .bh-extra { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: var(--bh-surface); border: 2px solid var(--bh-line); cursor: pointer; transition: transform .4s var(--bh-spring), border-color .2s, background-color .2s, box-shadow .3s; }
.bh-tile:hover, .bh-yacht:hover, .bh-extra:hover { transform: translateY(-3px); }
.bh-tile:active, .bh-yacht:active, .bh-extra:active { transform: scale(.97); }
.bh-tile:has(input:checked), .bh-yacht:has(input:checked), .bh-extra:has(input:checked) { border-color: var(--bh-mint); background: color-mix(in srgb, var(--bh-mint) 12%, var(--bh-solid)); box-shadow: 0 12px 30px rgba(45, 212, 191, .18); }
.bh-tile:focus-within, .bh-yacht:focus-within, .bh-extra:focus-within, .bh-chip:focus-within span { outline: 3px solid var(--bh-mint); outline-offset: 3px; }
.bh-tile:has(input:focus:not(:focus-visible)), .bh-yacht:has(input:focus:not(:focus-visible)), .bh-extra:has(input:focus:not(:focus-visible)) { outline: none; }
.bh-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; flex: none; background: #CCFBF1; color: var(--bh-ink); transition: transform .5s var(--bh-spring); }
.bh-tile:has(input:checked) .bh-ic { transform: rotate(-10deg) scale(1.08); }
.bh-occ-birthday .bh-ic { background: #FFEDD5; }
.bh-occ-sunset .bh-ic { background: #FDE68A; }
.bh-occ-proposal .bh-ic { background: #FCE7F3; }
.bh-occ-corporate .bh-ic { background: #E0E7FF; }
.bh-occ-cruising .bh-ic { background: #DCFCE7; }
.bh-app svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bh-tile-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bh-tile-t b, .bh-ybody b { font: 700 1.05rem/1.25 var(--bh-f-head); color: var(--bh-head); }
.bh-tile-t small, .bh-ybody small { color: var(--bh-muted); font-size: 13.5px; }
.bh-tick { position: absolute; top: 10px; inset-inline-end: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bh-mint); color: var(--bh-ink); transform: scale(0); transition: transform .45s var(--bh-spring); }
.bh-tick svg { width: 16px; height: 16px; stroke-width: 2.6; }
.bh-tile:has(input:checked) .bh-tick, .bh-yacht:has(input:checked) .bh-tick { transform: scale(1); }

/* yacht list */
.bh-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; padding: 12px 14px; border-radius: 18px; background: var(--bh-chip); }
.bh-group-l { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--bh-head); }
.bh-group-n { margin-inline-start: auto; font-size: 13.5px; color: var(--bh-muted); }
.bh-yachts { display: grid; gap: 12px; }
.bh-yacht { padding: 10px; align-items: stretch; }
.bh-yimg { position: relative; flex: none; width: 132px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--bh-chip); }
.bh-yimg img { width: 100%; height: 100%; object-fit: cover; }
.bh-rec { position: absolute; top: 6px; inset-inline-start: 6px; padding: 4px 8px; border-radius: 99px; background: var(--bh-peach); color: var(--bh-ink); font: 800 11px/1 var(--bh-f-head); font-style: normal; }
.bh-ybody { display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; flex: 1; padding-inline-end: 30px; }
.bh-ymeta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 4px; font-size: 13.5px; color: var(--bh-muted); }
.bh-ymeta span { display: inline-flex; align-items: center; gap: 5px; }
.bh-ymeta svg { width: 16px; height: 16px; }
.bh-ymeta strong { font: 800 1.05rem/1 var(--bh-f-head); color: var(--bh-head); }
.bh-ymeta strong i { font: 500 12px var(--f-body, sans-serif); font-style: normal; color: var(--bh-muted); margin-inline-start: 2px; }
.bh-yacht.is-off { opacity: .45; cursor: not-allowed; }
.bh-yacht.is-off:hover { transform: none; }
.bh-ynote { font-size: 12.5px; color: var(--bh-peach); font-weight: 600; }

/* fields */
.bh-field { margin: 0 0 20px; }
.bh-label { display: block; margin: 0 0 8px; font: 700 14.5px/1.3 var(--bh-f-head); color: var(--bh-head); }
.bh-input { width: 100%; box-sizing: border-box; min-height: 52px; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--bh-line); background: var(--bh-input); color: var(--bh-head); font: 500 16px/1.4 inherit; transition: border-color .2s, box-shadow .2s; }
.bh-input:focus { outline: none; border-color: var(--bh-mint); box-shadow: 0 0 0 4px rgba(45, 212, 191, .2); }
textarea.bh-input { min-height: 96px; resize: vertical; }
.bh-date { color-scheme: inherit; max-width: 320px; }
.bh-hint { margin: 8px 0 0; font-size: 13.5px; color: var(--bh-muted); }
.bh-hint a { color: var(--bh-link); }
.bh-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bh-chip { position: relative; cursor: pointer; }
.bh-chip span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 8px 10px; border-radius: 14px; background: var(--bh-chip); border: 2px solid transparent; font: 700 15px/1.2 var(--bh-f-head); color: var(--bh-head); transition: transform .35s var(--bh-spring), background-color .2s, border-color .2s; }
.bh-chip:hover span { transform: translateY(-2px); }
.bh-chip input:checked + span { background: var(--bh-mint); color: var(--bh-ink); transform: scale(1.04); }
.bh-deco { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bh-chip-lg span { flex-direction: column; min-height: 92px; text-align: center; border-color: var(--bh-line); }
.bh-chip-lg span small { font: 600 12.5px/1.2 var(--f-body, sans-serif); opacity: .8; }
.bh-chip-lg svg { width: 22px; height: 22px; }

/* stepper */
.bh-stepper { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: var(--bh-solid); border: 1px solid var(--bh-line); }
.bh-stepper button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--bh-mint); color: var(--bh-ink); font: 800 22px/1 var(--bh-f-head); cursor: pointer; transition: transform .35s var(--bh-spring); }
.bh-stepper button:active { transform: scale(.85); }
.bh-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.bh-stepper input { width: 58px; text-align: center; border: 0; background: transparent; color: var(--bh-head); font: 800 20px/1 var(--bh-f-head); -moz-appearance: textfield; appearance: textfield; }
.bh-stepper input::-webkit-outer-spin-button, .bh-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bh-big { text-align: center; padding: 26px 16px; border-radius: 24px; background: var(--bh-surface); border: 1px solid var(--bh-line); }
.bh-big .bh-stepper button { width: 58px; height: 58px; font-size: 28px; }
.bh-big .bh-stepper input { width: 90px; font-size: 34px; }
.bh-callout { display: flex; gap: 12px; align-items: center; margin: 16px 0 0; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--bh-peach) 16%, transparent); color: var(--bh-head); font-size: 14.5px; }
.bh-callout svg { flex: none; color: var(--bh-peach); }

/* extras */
.bh-extras { display: grid; gap: 12px; margin-bottom: 20px; }
.bh-extra .bh-ic { background: #FFEDD5; }
.bh-switch { margin-inline-start: auto; flex: none; width: 50px; height: 30px; border-radius: 99px; background: var(--bh-chip); border: 1px solid var(--bh-line); position: relative; transition: background-color .25s; }
.bh-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .4s var(--bh-spring); }
.bh-extra input:checked ~ .bh-switch { background: var(--bh-mint); }
.bh-extra input:checked ~ .bh-switch::after { transform: translateX(20px); }
html[dir="rtl"] .bh-extra input:checked ~ .bh-switch::after { transform: translateX(-20px); }

/* summary */
.bh-sum { margin: 0 0 16px; border-radius: 22px; background: var(--bh-surface); border: 1px solid var(--bh-line); overflow: hidden; }
.bh-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--bh-line); }
.bh-row:first-child { border-top: 0; }
.bh-row dt { flex: 0 0 34%; color: var(--bh-muted); font-size: 14px; }
.bh-row dd { margin: 0; flex: 1; color: var(--bh-head); font-weight: 600; font-size: 15px; }
.bh-edit { flex: none; width: 36px; height: 36px; border-radius: 12px; border: 0; background: var(--bh-chip); color: var(--bh-head); display: grid; place-items: center; cursor: pointer; transition: transform .35s var(--bh-spring); }
.bh-edit:hover { transform: rotate(-12deg) scale(1.08); }
.bh-edit svg { width: 18px; height: 18px; }
.bh-bill { padding: 16px 18px; border-radius: 22px; background: #fff; color: var(--bh-ink); box-shadow: 0 16px 40px rgba(15, 12, 41, .2); }
.bh-bill p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 0; font-size: 14.5px; color: #3B3880; }
.bh-bill b { color: var(--bh-ink); white-space: nowrap; }
.bh-bill .bh-bill-total { margin-top: 6px; padding-top: 12px; border-top: 2px dashed #E1DFF5; font: 800 1.25rem/1.2 var(--bh-f-head); color: var(--bh-ink); }
.bh-bill-tabby { font-size: 13.5px !important; }
.bh-tabby { display: inline-block; padding: 2px 6px; border-radius: 5px; background: #3BFFC1; color: #0B0B2A; font: 800 11.5px/1.3 var(--bh-f-head); font-style: normal; }
.bh-legal { font-size: 12.5px; }
.bh-error { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(251, 113, 133, .15); border: 1px solid rgba(251, 113, 133, .45); color: var(--bh-head); font-weight: 600; font-size: 14.5px; }
.bh-shake { animation: bh-shake .45s; }
@keyframes bh-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* bottom bar */
.bh-bar { position: fixed; z-index: 40; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); translate: -50% 0; width: min(780px, calc(100% - 24px)); box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 24px; background: rgba(30, 27, 75, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(199, 210, 254, .16); box-shadow: 0 18px 44px rgba(4, 3, 20, .45); }
.bh-total { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; text-align: center; min-width: 0; }
.bh-total b { font: 800 1.2rem/1 var(--bh-f-head); }
.bh-total small { font-size: 12px; color: #C7CBF2; }
.bh-pop b { animation: bh-pop .5s var(--bh-spring); }
@keyframes bh-pop { 40% { transform: scale(1.14); } }
.bh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 18px; border: 0; font: 800 15.5px/1 var(--bh-f-head); cursor: pointer; text-decoration: none; transition: transform .35s var(--bh-spring), box-shadow .3s, opacity .2s; }
.bh-btn:hover { transform: translateY(-2px) scale(1.03); }
.bh-btn:active { transform: scale(.94); }
.bh-btn:focus-visible { outline: 3px solid var(--bh-peach); outline-offset: 3px; }
.bh-btn-back { background: rgba(255, 255, 255, .1); color: #fff; }
.bh-btn-next { background: var(--bh-mint); color: var(--bh-ink); box-shadow: 0 10px 24px rgba(45, 212, 191, .35); }
.bh-btn-send { background: linear-gradient(135deg, var(--bh-mint), var(--bh-peach)); }
.bh-btn.is-loading { opacity: .75; cursor: progress; }
.bh-btn[hidden], .bh-bar[hidden] { display: none; }
.bh-btn-wa { width: 100%; background: #25D366; color: #06321A; box-shadow: 0 12px 28px rgba(37, 211, 102, .35); min-height: 56px; font-size: 16.5px; }
.bh-btn-wa svg { width: 22px; height: 22px; }

/* done */
.bh-done { text-align: center; }
.bh-burst { display: grid; place-items: center; width: 92px; height: 92px; margin: 10px auto 18px; border-radius: 50%; background: linear-gradient(135deg, var(--bh-mint), var(--bh-mint-d)); color: var(--bh-ink); box-shadow: 0 0 0 12px rgba(45, 212, 191, .15), 0 0 0 26px rgba(45, 212, 191, .07); animation: bh-burst .8s var(--bh-spring) both; }
.bh-burst svg { width: 46px; height: 46px; stroke-width: 2.6; stroke-dasharray: 30; stroke-dashoffset: 30; animation: bh-draw .6s .35s var(--bh-ease) forwards; }
@keyframes bh-burst { from { transform: scale(0) rotate(-30deg); } }
@keyframes bh-draw { to { stroke-dashoffset: 0; } }
.bh-ref { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 12px 10px 18px; border-radius: 18px; background: var(--bh-chip); }
.bh-ref span { color: var(--bh-muted); font-size: 13.5px; }
.bh-ref b { font: 800 1.25rem/1 var(--bh-f-head); letter-spacing: .06em; color: var(--bh-head); direction: ltr; }
.bh-copy { width: 36px; height: 36px; border-radius: 12px; border: 0; background: var(--bh-solid); color: var(--bh-head); display: grid; place-items: center; cursor: pointer; }
.bh-copy svg { width: 18px; height: 18px; }
.bh-copy.is-done { background: var(--bh-mint); color: var(--bh-ink); }
.bh-lead { max-width: 52ch; margin: 0 auto 18px; color: var(--bh-text); font-size: 1.02rem; }
.bh-sum-done { margin-top: 18px; text-align: start; }
.bh-sum-done .bh-row dt { flex-basis: 28%; }
.bh-link { color: var(--bh-link); font-weight: 600; }
.bh-confetti { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.bh-boot { padding: 40px 0; }

@media (max-width: 560px) {
	.bh-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
	.bh-tile { flex-direction: column; align-items: flex-start; padding: 14px; gap: 10px; }
	.bh-tile-t small { font-size: 12.5px; }
	.bh-yimg { width: 104px; }
	.bh-deco { grid-template-columns: 1fr; }
	.bh-chip-lg span { min-height: 56px; flex-direction: row; justify-content: flex-start; padding: 10px 14px; }
	.bh-row { flex-wrap: wrap; }
	.bh-row dt { flex-basis: 100%; }
	.bh-btn { padding: 0 16px; }
	.bh-top .rya-word small { display: none; }
}

@media (max-width: 420px) {
	.bh-top { gap: 6px; padding-inline: 12px; }
	.bh-top-end { gap: 6px; }
	.bh-top .rya-mark { width: 32px; height: 32px; }
	.bh-top .rya-word b { font-size: 13.5px; letter-spacing: .05em; }
	.bh-top .rya-theme-btn, .bh-top .rya-lsel-btn, .bh-close { width: 38px; height: 38px; padding: 0; justify-content: center; }
}

/* light mode tweaks (theme tokens handle colours; the floating bar stays night-blue) */
:root[data-theme="light"] .bh-tile:has(input:checked), :root[data-theme="light"] .bh-yacht:has(input:checked), :root[data-theme="light"] .bh-extra:has(input:checked) { background: #ECFDF9; }
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) .bh-tile:has(input:checked), :root:not([data-theme="dark"]) .bh-yacht:has(input:checked), :root:not([data-theme="dark"]) .bh-extra:has(input:checked) { background: #ECFDF9; }
}

@media (prefers-reduced-motion: reduce) {
	.bh-app *, .bh-app *::before, .bh-app *::after { animation: none !important; transition: none !important; }
	.bh-burst svg { stroke-dashoffset: 0; }
}
