/* Beauty N the Braids — client booking flow.
   Loaded only by book.html, after styles.css. Every selector here is either
   prefixed `bk-` or scoped inside `.booking`, so nothing collides with the
   shared stylesheet. Palette, type and spacing come from the tokens in
   styles.css: black, true white, restrained warm gold. Mobile first. */

/* ---------- Utility ---------- */
.bk-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Every interactive thing in the flow gets a visible focus ring. */
.booking :focus-visible,
.booking [tabindex]:focus-visible,
.booking summary:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Stepper ---------- */
.booking .steps { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.booking .steps .step[hidden] { display: none; }
.booking .steps .step .bk-step-label { white-space: nowrap; }

@media (max-width: 620px) {
  .booking .steps { gap: .35rem; margin-bottom: 1.6rem; }
  .booking .steps .sep { width: 12px; }
  .booking .steps .step .bk-step-label { display: none; }
  .booking .steps .step.active .bk-step-label { display: inline; }
}

/* ---------- Service list: detail disclosure under each row ---------- */
.bk-svc-entry { border-bottom: 1px solid var(--line); }
.bk-svc-entry .svc-row { border-bottom: 0; }
/* The booking card is narrow at every viewport width, so the shared desktop
   grid cannot fit inside it -- a viewport media query never fires here because
   the window is wide even when the card is not. Wrapping flex keeps every cell
   inside the card. */
.bk-svc-entry .svc-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem;
  min-height: 0; padding: 1.2rem .2rem;
}
.bk-svc-entry .svc-row > .svc-row__info { flex: 1 1 150px; min-width: 0; }
.bk-svc-entry .svc-row > .svc-row__meta { flex: 0 0 auto; }
.bk-svc-entry .svc-row > .svc-row__cta { flex: 0 0 auto; margin-left: auto; }
.bk-svc-entry .svc-row[aria-pressed="true"] { background: #f4f4f4; }

.bk-disclose { margin: 0 0 .9rem; padding: 0 .4rem; }
.bk-disclose > summary {
  cursor: pointer; list-style: none;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 500; color: var(--gold-dark);
  padding: .45rem 0; display: inline-flex; align-items: center; gap: .45rem;
  min-height: 32px;
}
.bk-disclose > summary::-webkit-details-marker { display: none; }
.bk-disclose > summary::after { content: "+"; font-size: 1rem; line-height: 1; }
.bk-disclose[open] > summary::after { content: "–"; }
.bk-disclose > summary:hover { color: var(--ink); }
.bk-disclose__body { padding: .2rem 0 1rem; font-size: .93rem; color: var(--ink-soft); }
.bk-disclose__body p:last-child { margin-bottom: 0; }

/* ---------- Generic cards / notices inside the panel ---------- */
.bk-block { margin: 0 0 1.6rem; }
.bk-block:last-child { margin-bottom: 0; }

.bk-h { font-family: var(--serif); font-size: 1.22rem; margin: 0 0 .5rem; }

.bk-note {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.2rem; margin: 0 0 1rem; font-size: .93rem; background: var(--paper);
}
.bk-note > :last-child { margin-bottom: 0; }
.bk-note--gold { border-color: var(--gold); }
.bk-note--ink { border-color: var(--ink); }
.bk-note__k {
  display: block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: .35rem; font-weight: 500;
}

/* Preparation instructions keep the owner's line breaks without a wall of text. */
.bk-prep { white-space: pre-wrap; margin: 0; font-size: .93rem; line-height: 1.65; }

.bk-facts { list-style: none; margin: 0; padding: 0; }

.bk-facts li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .93rem;
}
.bk-facts li:last-child { border-bottom: 0; }
.bk-facts .bk-facts__k { color: var(--muted); }
.bk-facts .bk-facts__v { text-align: right; font-weight: 500; }

/* Up-front surcharge disclosure on the date step. */
.bk-why { margin: 0 0 .7rem; padding-left: 1.1rem; }
.bk-why li { margin: 0 0 .45rem; line-height: 1.6; }
.bk-why li:last-child { margin-bottom: 0; }

/* ---------- Stylist picker ---------- */
.bk-stylists { display: grid; gap: .7rem; margin: 0 0 .4rem; }
.bk-stylist {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 1rem; align-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  padding: .9rem 1.1rem; cursor: pointer; transition: border-color .2s, background .2s;
}
.bk-stylist:hover { border-color: var(--gold); }
.bk-stylist.selected { border-color: var(--ink); background: #fafafa; }
.bk-stylist__avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.15rem;
}
.bk-stylist__avatar img { width: 100%; height: 100%; object-fit: cover; }
.bk-stylist__name { font-weight: 600; display: block; }
.bk-stylist__sub { color: var(--muted); font-size: .86rem; display: block; }
.bk-stylist__meta { text-align: right; font-size: .9rem; white-space: nowrap; }
.bk-stylist__meta small { display: block; color: var(--muted); font-size: .76rem; }
.bk-stylist input[type="radio"] { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }

@media (max-width: 560px) {
  .bk-stylist { grid-template-columns: 44px minmax(0, 1fr); }
  .bk-stylist__avatar { width: 44px; height: 44px; }
  .bk-stylist__meta { grid-column: 1 / -1; text-align: left; }
}

/* A chosen-stylist reminder line above the calendar. */
.bk-chosen {
  font-size: .86rem; color: var(--muted);
  margin: 0 0 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line);
}
.bk-chosen strong { color: var(--ink); }

/* ---------- Requirement collection ---------- */
.bk-req { display: grid; gap: 1rem; }
.bk-upload {
  border: 1px dashed var(--line); border-radius: 12px; padding: 1rem 1.2rem;
}
.bk-upload.is-done { border-style: solid; border-color: var(--gold); }
.bk-upload input[type="file"] { font: inherit; font-size: .88rem; max-width: 100%; }
.bk-upload__hint { font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.bk-upload__status { font-size: .86rem; margin: .5rem 0 0; }
.bk-upload__status.is-error { color: #a3342b; }
.bk-upload__status.is-ok { color: var(--gold-dark); }

.booking .field select {
  width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); font: inherit; color: var(--ink); min-height: 44px;
}
.booking .field select:focus { outline: none; border-color: var(--gold); }
.booking .field--req > label::after { content: " *"; color: var(--gold-dark); }

/* Checkbox rows: generous tap target, label genuinely clickable. */
.bk-check {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .7rem 0; font-size: .95rem; cursor: pointer;
}
.bk-check input[type="checkbox"] {
  width: 22px; height: 22px; margin: .1rem 0 0; flex: 0 0 auto; accent-color: var(--ink);
}
.bk-check span { line-height: 1.5; }

/* ---------- Review & confirm ---------- */
.bk-credit-grid { display: grid; gap: 0 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .bk-credit-grid { grid-template-columns: 1fr 1fr; } }

.booking .summary .row.bk-credit span:last-child { color: var(--gold-dark); }
.booking .summary .row.bk-sub { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .7rem; }

.bk-due {
  border: 1px solid var(--ink); border-radius: 12px;
  padding: 1.2rem 1.3rem; margin: 0 0 1.4rem; background: var(--paper);
}
.bk-due__amount {
  font-family: var(--serif); font-size: 2.1rem; line-height: 1.1; display: block; margin: .1rem 0 .5rem;
}
.bk-due__head { font-size: 1.02rem; font-weight: 600; margin: 0 0 .3rem; }
.bk-due__body { font-size: .93rem; color: var(--ink-soft); margin: 0; }
.bk-due__rest { font-size: .9rem; color: var(--muted); margin: .7rem 0 0; }

.bk-surcharge { border: 1px solid var(--gold); border-radius: 12px; padding: 1.1rem 1.2rem; margin: 0 0 1.4rem; }
.bk-surcharge h4 { font-family: var(--sans); font-size: 1rem; margin: 0 0 .5rem; }
.bk-surcharge__item { border-top: 1px solid var(--line); padding: .7rem 0; font-size: .93rem; }
.bk-surcharge__item:first-of-type { border-top: 0; padding-top: 0; }
.bk-surcharge__amt { font-weight: 600; }
.bk-surcharge__why { color: var(--muted); font-size: .86rem; margin: .2rem 0 0; }

.bk-policy { border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; margin: 0 0 1.4rem; }
.bk-policy h4 { font-family: var(--sans); font-size: 1rem; margin: 0 0 .6rem; }
.bk-policy dl { margin: 0 0 .4rem; font-size: .92rem; }
.bk-policy dt {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-dark); margin-top: .9rem; font-weight: 500;
}
.bk-policy dt:first-child { margin-top: 0; }
.bk-policy dd { margin: .25rem 0 0; color: var(--ink-soft); line-height: 1.6; }
.bk-policy .bk-check { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }

.bk-stale {
  border: 1px solid var(--ink); border-left-width: 4px; border-radius: 10px;
  padding: .9rem 1.1rem; margin: 0 0 1rem; font-size: .93rem; background: #fafafa;
}

/* ---------- Empty / error states ---------- */
.bk-empty { text-align: center; padding: 2rem .5rem; }
.bk-empty h3 { margin-bottom: .6rem; }
.bk-empty p { color: var(--muted); max-width: 48ch; margin-left: auto; margin-right: auto; }
.bk-empty__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.bk-empty__actions a, .bk-empty__actions button { text-decoration: none; }

.bk-inline-error { color: #a3342b; font-size: .9rem; margin: .6rem 0 0; }

/* ---------- Flow nav on small screens ---------- */
@media (max-width: 480px) {
  .booking .flow-nav { flex-direction: column-reverse; }
  .booking .flow-nav .btn { width: 100%; }
  .bk-due__amount { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .booking *, .booking *::before, .booking *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important;
  }
}
