/* ==========================================================================
   Rovelo — booking page (book.html). Builds on site.css tokens and the
   .bk-side / .agenda / .bk-progress styles from the old booking modal.
   ========================================================================== */

.page-book { background: var(--paper); }
.book { position: relative; isolation: isolate; overflow-x: clip; padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 8vw, 104px); }
.book::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -120px; width: min(1100px, 120vw); height: 620px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 82, 255, .1), transparent 72%);
}

.book-card {
  display: grid; grid-template-columns: 360px minmax(0, 1fr);
  min-height: 640px; border-radius: 26px; overflow: hidden;
  background: var(--white);
  box-shadow: 0 40px 100px -40px rgba(6, 10, 31, .35), 0 0 0 1px var(--line);
  animation: book-in .8s var(--ease) both;
}
@keyframes book-in { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }

/* Side panel ------------------------------------------------------------- */
.book-side { padding: 34px 32px 30px; }
.book-side h1 { font-size: 32px; line-height: 1.08; letter-spacing: -.032em; font-weight: 440; margin: 30px 0 0; }
.book-side h1 span { color: var(--night-ink-3); }
.book-side > p { color: var(--night-ink-2); font-size: 15px; margin: 14px 0 0; line-height: 1.6; }
.book-meta { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; }
.book-meta li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--night-ink); }
.book-meta .i { width: 16px; height: 16px; color: var(--sky); }

/* Main panel ------------------------------------------------------------- */
.book-main { position: relative; padding: 34px clamp(22px, 3.4vw, 44px) 36px; min-width: 0; }
.book-view { animation: view-in .5s var(--ease) both; }
.book-view[hidden] { display: none; }
@keyframes view-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.book-main h2 { font-size: 26px; line-height: 1.15; letter-spacing: -.025em; font-weight: 480; margin: 0; }
.book-sub { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-3); }

.book-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tz { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); box-shadow: var(--shadow-sm); color: var(--ink-2); max-width: 100%; transition: border-color .2s; }
.tz:hover, .tz:focus-within { border-color: rgba(10, 17, 56, .3); }
.tz .i { width: 15px; height: 15px; }
.tz select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: 13.5px; color: var(--ink); padding-right: 18px; max-width: 230px; cursor: pointer; outline: none; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%230a1138' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; }

/* Days strip */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 26px; }
.day {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 74px; padding: 13px 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: var(--card);
  transition: border-color .2s, background .2s, box-shadow .25s, transform .2s var(--ease);
}
.day:hover { border-color: rgba(0, 82, 255, .35); background: #fff; }
.day__wd { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.day__num { font-size: 26px; font-weight: 480; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }
.day__num small { font-size: 13px; font-weight: 450; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.day[aria-selected="true"] { background: var(--ink); border-color: var(--ink); box-shadow: 0 14px 30px -14px rgba(10, 17, 56, .6); }
.day[aria-selected="true"] .day__wd, .day[aria-selected="true"] .day__num small { color: rgba(238, 242, 255, .6); }
.day[aria-selected="true"] .day__num { color: #fff; }

/* Time grid */
.times { margin-top: 26px; min-height: 220px; }
.slot-group + .slot-group { margin-top: 20px; }
.slot-label { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.slot-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot {
  height: 44px; border-radius: 11px; border: 1px solid rgba(0, 82, 255, .22); background: #fff;
  font-size: 14.5px; font-weight: 500; color: var(--blue); font-variant-numeric: tabular-nums;
  transition: background .18s, color .18s, border-color .18s, transform .18s var(--ease), box-shadow .2s;
}
.slot:hover { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 10px 22px -12px rgba(0, 82, 255, .8); transform: translateY(-1px); }
.slot:active { transform: translateY(0) scale(.98); }
.slots-in .slot { animation: slot-in .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
@keyframes slot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.book-note { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--amber-wash); color: #6b4708; font-size: 14px; line-height: 1.5; }
.book-note--info { background: var(--blue-wash); color: #0b2f86; }
.empty { display: grid; place-items: center; text-align: center; min-height: 260px; color: var(--ink-3); font-size: 15px; }
.empty b { display: block; color: var(--ink); font-weight: 500; font-size: 17px; margin-bottom: 6px; }

/* Skeletons */
.sk { position: relative; overflow: hidden; background: rgba(10, 17, 56, .05) !important; border-color: transparent !important; pointer-events: none; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: shimmer 1.3s infinite; }
.sk-line { width: 90px; height: 12px; border-radius: 6px; background: rgba(10, 17, 56, .05); }
.sk-line::after { display: none; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Details step ------------------------------------------------------------ */
.back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; margin: -6px 0 14px -6px; border: 0; border-radius: 8px; background: none; font-size: 14px; color: var(--ink-3); transition: color .2s, background .2s; }
.back:hover { color: var(--ink); background: rgba(10, 17, 56, .045); }
.back .i { width: 15px; height: 15px; transform: rotate(180deg); }
.picked { display: flex; align-items: center; gap: 14px; margin: 18px 0 24px; padding: 14px 16px; border-radius: 14px; background: var(--blue-wash); border: 1px solid rgba(0, 82, 255, .14); }
.picked__icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.picked__icon .i { width: 18px; height: 18px; }
.picked b { display: block; font-weight: 520; font-size: 15.5px; letter-spacing: -.01em; }
.picked span span { font-size: 14px; color: var(--ink-2); }
.picked__change { margin-left: auto; border: 0; background: none; color: var(--blue); font-size: 14px; font-weight: 500; padding: 6px 4px; }
.picked__change:hover { text-decoration: underline; text-underline-offset: 3px; }

#book-form { display: grid; gap: 16px; max-width: 620px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fld { display: grid; gap: 7px; }
.fld > span { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.fld small { font-weight: 400; color: var(--ink-4); font-size: 12.5px; }
.fld input, .fld textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 11px; background: #fff;
  padding: 12px 14px; font-size: 15px; line-height: 1.45; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; outline: none;
}
.fld input { height: 46px; }
.fld textarea { resize: vertical; min-height: 92px; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--ink-4); }
.fld input:focus, .fld textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 82, 255, .12); }
.fld.is-invalid input { border-color: #d64545; box-shadow: 0 0 0 4px rgba(214, 69, 69, .1); }
.fld__err { font-style: normal; font-size: 12.5px; color: #c13737; min-height: 0; }
.fld__err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; padding: 12px 14px; border-radius: 11px; background: #fdecec; color: #9b2424; font-size: 14px; }
.submit { justify-self: start; min-width: 200px; position: relative; }
.submit .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.submit.is-busy { pointer-events: none; opacity: .92; }
.submit.is-busy .spinner { display: block; }
.submit.is-busy .submit__label { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { margin: 0; font-size: 13px; color: var(--ink-3); }
.fine a { color: var(--blue); }

/* Confirmation & manage --------------------------------------------------- */
.done { max-width: 560px; margin: 0 auto; padding-top: clamp(8px, 3vw, 28px); text-align: center; }
.tick { width: 62px; height: 62px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--green); box-shadow: 0 0 0 8px var(--green-wash), 0 16px 30px -12px rgba(18, 164, 107, .7); animation: pop .6s var(--ease) both; }
.tick svg { width: 28px; height: 28px; }
.tick--neutral { background: var(--blue); box-shadow: 0 0 0 8px var(--blue-wash), 0 16px 30px -12px rgba(0, 82, 255, .6); }
.tick--muted { background: var(--ink-3); box-shadow: 0 0 0 8px rgba(10, 17, 56, .06); }
.tick .i { width: 26px; height: 26px; stroke-width: 2; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: none; } }
.done h2 { font-size: 30px; }
.summary { margin: 26px 0 0; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.summary:empty { display: none; }
.summary > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 14px 18px; font-size: 15px; }
.summary > div + div { border-top: 1px solid var(--line); }
.summary dt, .summary .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.summary .v { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.summary .v small { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.summary a { color: var(--blue); }
.done__ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.done__ctas:empty { display: none; }
.done .fine { margin-top: 18px; }
.btn--danger { background: #fff; border-color: rgba(214, 69, 69, .35); color: #b22a2a; box-shadow: var(--shadow-sm); }
.btn--danger:hover { background: #fdf1f1; border-color: rgba(214, 69, 69, .6); }
.manage-confirm { margin-top: 22px; padding: 16px; border-radius: 14px; background: #fdf3f3; border: 1px solid rgba(214, 69, 69, .2); }
.manage-confirm p { margin: 0 0 12px; font-size: 14.5px; color: #7a2323; }
.manage-confirm .done__ctas { margin-top: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--green-wash); color: #0c7a4f; }
.status-pill--off { background: rgba(10, 17, 56, .06); color: var(--ink-3); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 980px) {
  .book-card { grid-template-columns: 1fr; min-height: 0; border-radius: 22px; }
  .book-side { padding: 26px 24px 24px; }
  .book-side h1 { font-size: 27px; margin-top: 20px; }
  .book-side .agenda, .book-side .bk-trust { display: none; }
  .book-side .bk-progress { padding-top: 22px; }
  .book-meta { grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 18px; }
}
@media (max-width: 640px) {
  .book { padding-top: 16px; }
  .book .wrap { padding: 0 12px; }
  .book-card { border-radius: 20px; }
  .book-side > p { display: none; }
  .book-meta { grid-template-columns: 1fr; gap: 7px; }
  .book-main { padding: 24px 18px 28px; }
  .book-main h2 { font-size: 23px; }
  .tz { width: 100%; }
  .tz select { max-width: none; flex: 1; }
  .days { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 20px -18px 0; padding: 2px 18px 6px; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: 0 0 96px; min-height: 70px; scroll-snap-align: start; }
  .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fields { grid-template-columns: 1fr; }
  .submit { justify-self: stretch; }
  .summary > div { grid-template-columns: 1fr; gap: 4px; }
  .done__ctas .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .book-card, .book-view, .slots-in .slot, .tick { animation: none !important; }
  .sk::after { animation: none; }
}
