/* ============================================================
   Q HUB site — booking wizard and the live summary ticket
   ============================================================ */

#book { background: radial-gradient(80% 70% at 100% 0%, rgba(108, 188, 201, 0.2), transparent 60%), var(--bg); scroll-margin-top: 20px; }
[dir="ltr"] #book { background: radial-gradient(80% 70% at 0% 0%, rgba(108, 188, 201, 0.2), transparent 60%), var(--bg); }
.bk { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr); gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.bk-form { display: grid; gap: var(--s-5); padding: clamp(1.2rem, 2.6vw, 2.2rem); border-radius: var(--r-xl); background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow-md); }

/* step indicator */
.bk-steps { display: flex; align-items: center; gap: 10px; }
.bk-steps li { display: flex; align-items: center; gap: 0.6rem; flex: 1; font-family: var(--f-head); font-size: var(--fs-sm); font-weight: 500; color: var(--mut); transition: color var(--t-med) ease; }
.bk-steps li::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--line-2); background-image: linear-gradient(90deg, var(--teal), var(--teal)); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 0.6s var(--ease-out); }
[dir="rtl"] .bk-steps li::after { background-position: right; }
.bk-steps li:last-child { flex: none; } .bk-steps li:last-child::after { display: none; }
.bk-steps i { font-style: normal; font-family: var(--f-num); font-weight: 600; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; transition: background-color var(--t-med) ease, border-color var(--t-med) ease, color var(--t-med) ease, transform 0.5s var(--ease-spring); }
.bk-steps li.now { color: var(--ink); } .bk-steps li.now i { border-color: var(--teal); color: var(--teal-hi); transform: scale(1.1); }
.bk-steps li.done { color: var(--ink-2); } .bk-steps li.done i { background: var(--teal); border-color: var(--teal); color: #0f1a22; }
.bk-steps li.done::after { background-size: 100% 100%; }

/* panes */
.bk-panes { position: relative; min-height: 22rem; }
.bk-pane { display: grid; gap: var(--s-4); align-content: start; }
.bk-pane[hidden] { display: none; }
.bk-pane.enter { animation: pane-in 0.55s var(--ease-out) both; }
.bk-pane.enter.back { animation-name: pane-in-back; }
[dir="ltr"] .bk-pane { --dir: 1; } [dir="rtl"] .bk-pane { --dir: -1; }
@keyframes pane-in { from { opacity: 0; transform: translateX(calc(var(--dir) * 36px)); } }
@keyframes pane-in-back { from { opacity: 0; transform: translateX(calc(var(--dir) * -36px)); } }
.bk-pane legend, .bk-sub { font-family: var(--f-head); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.2rem; padding: 0; }
.bk-sub { margin-top: var(--s-4); }

/* option tiles (spaces, days, slots) are real radios, styled as tiles */
.bk-spaces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt > span { display: grid; gap: 0.35rem; height: 100%; padding: 0.7rem; border-radius: var(--r-md); border: 1.5px solid var(--line-2); background: rgba(255, 255, 255, 0.03); transition: border-color var(--t-med) ease, background-color var(--t-med) ease, transform 0.4s var(--ease-spring); }
.opt:hover > span { border-color: var(--teal-line); background: rgba(108, 188, 201, 0.07); }
.opt input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.opt input:checked + span { border-color: var(--teal); background: var(--teal-soft); transform: translateY(-2px); }
.opt-sp img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.opt-sp b { font-family: var(--f-head); font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; }
.opt-sp small { color: var(--mut); font-size: var(--fs-xs); }
.opt-sp > span::after { content: ""; position: absolute; top: 14px; inset-inline-end: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1a22' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.5l4 4 8-9'/></svg>") center / 13px no-repeat; transform: scale(0); transition: transform 0.45s var(--ease-spring); }
.opt-sp input:checked + span::after { transform: scale(1); }

.bk-days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); padding-inline: 14px; }
.opt-day { flex: none; width: 76px; scroll-snap-align: start; }
.opt-day > span { justify-items: center; text-align: center; gap: 0; padding: 0.6rem 0.3rem; }
.opt-day small { font-size: 0.75rem; color: var(--mut); }
.opt-day b { font-family: var(--f-num); font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
.opt-day em { font-style: normal; font-size: 0.6875rem; color: var(--teal-ink); }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.opt-slot > span { place-items: center; min-height: 48px; padding: 0.4rem; font-family: var(--f-num); font-weight: 600; font-size: 1rem; direction: ltr; }

/* fields */
.bk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.fld { display: grid; gap: 0.35rem; align-content: start; }
.fld.wide { grid-column: 1 / -1; }
.fld label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.fld input, .fld select { width: 100%; min-height: 52px; padding: 0.6rem 1rem; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--ink); font-size: 1rem; transition: border-color var(--t-med) ease, box-shadow var(--t-med) ease, background-color var(--t-med) ease; }
.fld select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236cbcc9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-size: 16px; background-position: left 1rem center; }
[dir="ltr"] .fld select { background-position: right 1rem center; }
.fld select option { color: #161b28; background: #fff; }
.fld input::placeholder { color: var(--mut); opacity: 0.7; }
.fld input:hover, .fld select:hover { border-color: var(--teal-line); }
.fld input:focus, .fld select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(108, 188, 201, 0.22); background-color: rgba(255, 255, 255, 0.07); }
.fld input[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: var(--fs-xs); min-height: 0; }
.err:empty { display: none; }
.bk-err { color: var(--danger); font-size: var(--fs-sm); font-weight: 500; }
.bk-err:empty { display: none; }
.bk-err.shake { animation: shake 0.4s var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.bk-privacy { color: var(--mut); font-size: var(--fs-xs); }
.bk-privacy a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }
.bk-actions { display: flex; justify-content: space-between; gap: 12px; }
.bk-actions .btn-p { margin-inline-start: auto; min-width: 9.5rem; }
.bk-actions .btn-p.send { background: #1faa59; color: #fff; box-shadow: 0 12px 30px -12px rgba(31, 170, 89, 0.9); }
.bk-actions .btn-p.send:hover { background: #24bd65; }
.bk-actions .btn-p.send .arr { background: rgba(255, 255, 255, 0.2); }

/* done */
.bk-done { justify-items: center; text-align: center; padding-block: 1.5rem; gap: var(--s-4); }
.bk-burst { width: 92px; }
.bk-done.enter .ql-beam { animation: burst 0.9s var(--ease-spring) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes burst { from { opacity: 0; transform: scale(0.2) rotate(-90deg) translateY(-60px); } }
.bk-done h3 { font-family: var(--f-head); font-size: 1.6rem; font-weight: 600; }
.bk-done p { color: var(--ink-2); max-width: 28rem; }
.bk-done-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ticket */
.ticket { position: sticky; top: 104px; display: grid; gap: var(--s-4); padding: 1.3rem; border-radius: var(--r-xl); background: #f6f8fa; color: #161b28; box-shadow: var(--shadow-lg); --ink: #161b28; --mut: #5d6779; --line-2: rgba(22, 27, 40, 0.16); }
.ticket-top { display: flex; align-items: center; gap: 0.6rem; font-family: var(--f-head); font-weight: 600; }
.ticket-mark { width: 26px; }
.ticket-img { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 9; background: #dfe6ec; }
.ticket-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease, transform 0.9s var(--ease-out); }
.ticket-img img.swap { opacity: 0; transform: scale(1.08); }
.ticket-rows { display: grid; gap: 0; }
.ticket-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid rgba(22, 27, 40, 0.08); }
.ticket-rows dt { color: var(--mut); font-size: var(--fs-xs); }
.ticket-rows dd { font-family: var(--f-head); font-weight: 600; font-size: var(--fs-sm); text-align: end; }
.ticket-rows dd.flip { animation: flip 0.5s var(--ease-out); }
@keyframes flip { from { opacity: 0; transform: translateY(10px); } }
.ticket-cut { position: relative; height: 1px; margin-inline: -1.3rem; border-top: 2px dashed rgba(22, 27, 40, 0.18); }
.ticket-cut::before, .ticket-cut::after { content: ""; position: absolute; top: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy-900); }
.ticket-cut::before { inset-inline-start: -12px; } .ticket-cut::after { inset-inline-end: -12px; }
.ticket-price { font-size: var(--fs-sm); color: var(--mut); min-height: 1.6em; }
.ticket-price b { font-family: var(--f-num); font-size: 1.5rem; font-weight: 600; color: #161b28; direction: ltr; unicode-bidi: isolate; }

@media (max-width: 1024px) {
  .bk { grid-template-columns: 1fr; }
  .ticket { position: static; order: 1; grid-template-columns: 1fr; }
  .ticket-img { display: none; }
}
@media (max-width: 620px) {
  .bk-spaces { grid-template-columns: 1fr 1fr; }
  .bk-fields { grid-template-columns: 1fr; }
  .bk-steps li span { display: none; }
  .bk-steps li.now span { display: inline; }
  .bk-actions .btn { flex: 1; }
}
