/* ============================================================
   D' Payano — booking + confirmation styles (loaded with site.css)
   Uses the brand tokens defined in css/site.css :root.
   ============================================================ */

/* ---------- Page hero band ---------- */
.booking-hero {
  background:
    linear-gradient(rgba(17, 26, 34, .85), rgba(17, 26, 34, .92)),
    url("../img/bg.jpg") center 30% / cover no-repeat,
    var(--navy-dark);
  color: #fff;
  padding: 9.5rem 0 4rem;
}
.booking-hero-slim { padding: 8.5rem 0 3rem; }
.booking-hero h1 { margin: .4rem 0 .8rem; }
.booking-hero p { color: rgba(255, 255, 255, .78); max-width: 40rem; line-height: 1.7; margin: 0; }
.booking-hero a { color: var(--red-light); font-weight: 700; }
.booking-body { padding-top: 3.5rem; }
.booking-shell { max-width: 720px; }

/* ---------- Steps indicator ---------- */
.bk-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  list-style: none;
  margin: 0 0 2.2rem;
  padding: 0;
}
.bk-step {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem .7rem;
  background: #fff;
  cursor: default;
  transition: border-color .2s ease, color .2s ease;
  white-space: nowrap;
  overflow: hidden;
}
.bk-step span {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--paper-darker);
  color: var(--muted);
  font-size: .72rem;
  flex: none;
}
.bk-step.current { border-color: var(--red); color: var(--red-deep); }
.bk-step.current span { background: var(--red); color: #fff; }
.bk-step.done { color: var(--navy); cursor: pointer; }
.bk-step.done span { background: var(--navy); color: #fff; }
@media (max-width: 640px) {
  .bk-steps { grid-template-columns: repeat(2, 1fr); }
  .bk-step:nth-child(3), .bk-step:nth-child(4) { order: 2; }
}

/* ---------- Layout ---------- */
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 991px) {
  .booking-layout { grid-template-columns: 1fr; }
}

/* ---------- Panels / fieldsets ---------- */
.bk-panel {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.bk-panel legend {
  padding: 0;
  margin-bottom: 1.4rem;
}
.bk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .9rem;
  margin-top: 1.8rem;
}
.bk-actions .btn-red { margin-left: auto; }

/* ---------- Option cards (services / barbers) ---------- */
.bk-cards { display: grid; gap: .8rem; }
.bk-card {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.bk-card:hover { border-color: rgba(127, 33, 47, .45); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
/* 1px-sized but still focusable (keyboard :focus-visible rings depend on it);
   unsized abspos radios compute ~1400px wide and blow the page out sideways */
.bk-card input, .bk-slot input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bk-card input:focus-visible ~ .bk-card-main { outline: 3px solid var(--red); outline-offset: 3px; }
.bk-card:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 3px rgba(127, 33, 47, .14); }
.bk-card.selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(127, 33, 47, .14); }
.bk-card.selected::before, .bk-card:has(input:checked)::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  display: grid;
  place-items: center;
  align-self: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: .75rem;
  flex: none;
}
.bk-card-main { display: flex; flex-direction: column; gap: .3rem; min-width: 0; flex: 1; }
.bk-card-name { font-weight: 800; font-size: .98rem; color: var(--ink); }
.bk-card-desc { font-size: .84rem; color: var(--muted); line-height: 1.55; }
/* Barber working hours (from /admin → Barbers) */
.bk-card-hours {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red-dark);
}
.bk-card-hours i { margin-right: .25rem; }
/* Barber busy at the chosen time — card is grayed + not selectable */
.bk-barber-busy { font-size: .76rem; font-weight: 700; color: #b3261e; }
.bk-card.disabled {
  border-style: dashed;
  cursor: not-allowed;
  opacity: .62;
  filter: grayscale(.5);
}
.bk-card.disabled:hover { border-color: var(--line); transform: none; box-shadow: none; }
.bk-card.disabled .bk-avatar { background: var(--paper-darker); color: var(--muted); }
/* Barber bio — whitelist-only rich text from the admin Lexical editor */
.bk-card-bio { font-size: .8rem; color: var(--muted); line-height: 1.5; margin-top: .15rem; overflow-wrap: anywhere; }
.bk-card-bio p { margin: 0 0 .25rem; }
.bk-card-bio p:last-child { margin: 0; }
.bk-card-bio strong, .bk-card-bio em, .bk-card-bio u { color: var(--ink); }
.bk-card-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex: none;
  align-self: center;
  text-align: right;
}
.bk-price { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .04em; color: var(--red-deep); }
.bk-duration { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bk-duration i { color: var(--red-dark); margin-right: .25rem; }

.bk-card-barber { align-items: center; }
.bk-avatar {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--red-light);
  font-size: 1.2rem;
  flex: none;
}
.bk-card-barber input:checked ~ .bk-avatar, .bk-card-barber.selected .bk-avatar { background: var(--red); color: #fff; }
@media (max-width: 575px) {
  .bk-card { flex-wrap: wrap; }
  .bk-card-meta { width: 100%; justify-content: space-between; text-align: left; }
}

/* ---------- Date & slots ---------- */
.bk-datetime { display: grid; gap: 1.6rem; }
.bk-field { display: flex; flex-direction: column; gap: .4rem; }
.bk-field label, .bk-label {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy);
}
.bk-field input, .bk-field textarea {
  box-sizing: border-box; /* inputs carry border+padding — without this they're wider than their cell and overlap the next field */
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: .85rem 1rem;
  transition: border-color .15s ease;
  width: 100%;
}
.bk-field input[type="date"] { max-width: 260px; }
.bk-field input:focus, .bk-field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(127, 33, 47, .12);
}
.bk-help { font-size: .8rem; color: var(--muted); margin: 0; }

.bk-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: .6rem;
}
.bk-loading { color: var(--muted); font-size: .9rem; margin: .4rem 0; }
.bk-slot {
  display: block;
  text-align: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: .7rem .5rem;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.bk-slot input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bk-slot:hover { border-color: var(--red); color: var(--red-deep); }
.bk-slot:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
.bk-slot.selected { background: var(--red); border-color: var(--red); color: #fff; }
/* Time on the grid but with no barber free — visible, not pickable */
.bk-slot.taken {
  border-style: dashed;
  color: var(--muted);
  background: var(--paper);
  cursor: not-allowed;
}
.bk-slot.taken:hover { border-color: var(--line); color: var(--muted); }
.bk-slot-message {
  grid-column: 1 / -1;
  color: var(--muted);
  background: var(--paper-darker);
  border-radius: 8px;
  padding: 1rem;
  font-size: .9rem;
  margin: 0;
}

/* ---------- Fields grid (step 4) ---------- */
.bk-grid-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
.bk-grid-fields .bk-field:first-child { grid-column: 1 / -1; }
.bk-grid-fields .bk-field:last-child { grid-column: 1 / -1; }
.bk-optional { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
.bk-field label [aria-hidden] { color: var(--red); } /* required asterisks */
/* phones: primary CTA full-width on top, Back below it */
@media (max-width: 575px) {
  .bk-actions { flex-direction: column-reverse; }
  .bk-actions .btn { width: 100%; }
}
@media (max-width: 575px) { .bk-grid-fields { grid-template-columns: 1fr; } }

.bk-error {
  color: #b3261e;
  font-size: .82rem;
  font-weight: 600;
  margin: 0;
}
.bk-form-error {
  background: #fdecec;
  border: 1px solid #f5b5b1;
  color: #7a1f18;
  border-radius: 8px;
  padding: .85rem 1rem;
  font-size: .9rem;
  font-weight: 600;
}

/* ---------- Summary aside ---------- */
.bk-summary {
  background: var(--navy-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.8rem;
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-md);
}
.bk-summary h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: .1em;
  margin: 0 0 1.2rem;
}
.bk-summary dl { margin: 0; }
.bk-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .16);
}
.bk-summary dt { color: rgba(255, 255, 255, .6); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.bk-summary dd { margin: 0; font-weight: 700; font-size: .9rem; text-align: right; }
.bk-summary .sum-total dd { color: var(--red-light); font-family: var(--font-display); font-size: 1.3rem; }
.bk-summary-note {
  margin: 1.2rem 0 0;
  font-size: .8rem;
  color: rgba(255, 255, 255, .6);
  line-height: 1.6;
}
.bk-summary-note i { color: var(--red-light); margin-right: .3rem; }
.bk-summary-note a { color: var(--red-light); font-weight: 700; }
@media (max-width: 991px) { .bk-summary { position: static; } }

/* ---------- Confirmation card ---------- */
.bk-confirm, .bk-lookup {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.6rem 2.2rem;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.bk-confirm-icon {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 1.9rem;
  margin: 0 auto 1.4rem;
  box-shadow: 0 12px 30px rgba(127, 33, 47, .4);
}
.bk-confirm-icon.cancelled {
  background: var(--navy-dark);
  box-shadow: 0 12px 30px rgba(17, 26, 34, .35);
}
.bk-confirm-id { color: var(--muted); margin: .6rem 0 1.8rem; }
.bk-confirm-id strong { color: var(--red-deep); font-size: 1.05rem; letter-spacing: .04em; }
.bk-confirm-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .9rem;
  text-align: left;
  margin-bottom: 1.8rem;
}
.bk-confirm-details > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem 1rem;
}
.bk-confirm-details span {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
}
.bk-confirm-details strong { font-size: .92rem; color: var(--ink); }
.bk-confirm-note { color: var(--muted); font-size: .92rem; line-height: 1.7; margin: 0 0 1.6rem; }
.bk-confirm-note a { color: var(--red-dark); font-weight: 700; }

/* ---------- Notices / lookup ---------- */
.bk-notice {
  background: #fdf6ec;
  border: 1px solid #eed9b8;
  color: #6b4d1c;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  font-size: .93rem;
  line-height: 1.6;
}
.bk-notice i { color: #b07d24; margin-right: .35rem; }
.bk-notice a { color: var(--red-dark); font-weight: 700; }

/* ---------- Modal dialogs (booking wizard alerts + ajax-forms.js fallback
   dialogs; admin's own .adm-modal styling lives in admin.css) ---------- */
.bk-modal {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0;
  width: min(92vw, 420px);
  background: #fff;
  color: var(--ink);
}
.bk-modal::backdrop { background: rgba(17, 26, 34, .6); }
.bk-modal-body { padding: 1.6rem 1.5rem 1.4rem; }
.bk-modal-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: .05em;
  color: var(--navy);
  margin: 0 0 .7rem;
}
.bk-modal-body p { color: var(--muted); font-size: .92rem; line-height: 1.65; margin: 0; }
.bk-modal-actions { display: flex; justify-content: flex-end; gap: .7rem; padding: 0 1.5rem 1.5rem; }
.bk-modal-actions .btn { min-width: 128px; }
.bk-lookup-form { display: grid; gap: 1.1rem; margin-top: 1.6rem; text-align: left; }
