/* =========================================================
   booking.css: calendar page (calendar.html) and booking flow (book.html)
   Load after base.css and components.css.
   ========================================================= */

/* ---------- Page header ---------- */
.cal-hero { padding-top: clamp(48px, 7vw, 72px); padding-bottom: 24px; }
.cal-hero .container { display: flex; flex-direction: column; gap: 16px; }
.cal-hero__title { font-size: clamp(38px, 5.4vw, 64px); }
.cal-hero__lead { max-width: 640px; font-size: 18px; color: var(--text-soft); }

.cal-section { padding-top: 16px; }
.cal-section .container { display: flex; flex-direction: column; gap: 28px; }

.cal-notice {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--gold);
  background: rgba(201, 162, 75, 0.1);
  color: var(--cream);
  font-size: 14px;
}

/* ---------- Step labels ---------- */
.cal-step { display: flex; flex-direction: column; gap: 14px; }
.cal-step__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.cal-step__label span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0;
}

/* ---------- Service chips ---------- */
.service-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.chip-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 72px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--green-panel);
  color: var(--cream);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.chip-btn:hover { border-color: var(--line-strong); }
.chip-btn[aria-checked="true"] { border: 1.5px solid var(--gold); background: rgba(201, 162, 75, 0.14); }
.chip-btn__name { font-weight: 600; font-size: 16px; }
.chip-btn__meta { font-size: 13px; color: var(--text-soft); }

/* ---------- Two-column layout ---------- */
.cal-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cal-card {
  flex: 1.3 1 440px;
  min-width: 0;
  background: var(--green-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cal-card--slots { flex: 1 1 340px; }

/* ---------- Month calendar ---------- */
.month { display: flex; flex-direction: column; gap: 10px; }
.month__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.month__title { font-size: 24px; }
.month__nav {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.month__nav:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.month__nav:disabled { opacity: 0.35; cursor: not-allowed; }

.month__weekdays,
.month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month__weekdays span { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-soft); padding: 4px 0; }
.month__grid[aria-busy="true"] { opacity: 0.5; }

.day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--green);
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.day--blank { border: 0; background: transparent; cursor: default; }
.day:hover:not(:disabled) { border-color: var(--gold); }
.day__num { font-size: 16px; line-height: 1; }
.day__dot { width: 6px; height: 6px; border-radius: 50%; }
.day--open .day__dot { background: #7FB59A; }
.day--few .day__dot { background: var(--gold); }
.day--full,
.day--past { background: transparent; border-style: dashed; color: var(--text-mute); cursor: not-allowed; }
.day--past { border-color: transparent; }
.day--full .day__num { text-decoration: line-through; }
.day--today { box-shadow: inset 0 0 0 1px var(--cream); }
.day.is-selected { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.day.is-selected .day__dot { background: var(--on-gold); }

.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-soft); }
.cal-legend li { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--open { background: #7FB59A; }
.dot--few { background: var(--gold); }
.dot--full { border: 1px dashed var(--text-mute); }

/* ---------- Time slots ---------- */
.slots__date { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.slots { display: flex; flex-direction: column; gap: 18px; }
.slots__empty { color: var(--text-soft); }
.slots__note { margin: 0; font-size: 13px; color: var(--text-mute); }
.slot-group { display: flex; flex-direction: column; gap: 10px; }
.slot-group__label { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-soft); }
.slot-group__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--green);
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.slot:hover:not(:disabled) { border-color: var(--gold); }
.slot.is-selected { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.slot--booked { background: transparent; border-style: dashed; border-color: var(--line); color: var(--text-mute); text-decoration: line-through; cursor: not-allowed; }

/* ---------- Summary ---------- */
.cal-summary {
  padding: 18px;
  border-radius: 12px;
  border: 1.5px solid var(--gold);
  background: var(--green);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cal-summary dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-summary dl div { display: flex; justify-content: space-between; gap: 12px; }
.cal-summary dt { color: var(--text-soft); }
.cal-summary dd { margin: 0; font-weight: 600; text-align: right; }
.cal-summary__cta { width: 100%; }

/* =========================================================
   BOOKING FLOW (book.html)
   ========================================================= */
.bk { padding-top: clamp(32px, 5vw, 56px); }
.bk__inner { display: flex; flex-direction: column; gap: 24px; }

.bk-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.bk-head__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bk-head__title { font-size: clamp(32px, 4.4vw, 48px); }
.bk-head__title:focus { outline: none; }

/* ---------- Stepper ---------- */
.stepper { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.stepper__item { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-mute); }
.stepper__item::before { content: ""; height: 4px; border-radius: 999px; background: var(--line); }
.stepper__item.is-done::before { background: #8C7434; }
.stepper__item.is-current::before { background: var(--gold); }
.stepper__item.is-done { color: var(--text-soft); }
.stepper__item.is-current { color: var(--gold); font-weight: 700; }
.stepper__item button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Layout ---------- */
.bk-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.bk-main { flex: 999 1 540px; min-width: 0; }
.bk-main .cal-card { flex: none; }

/* ---------- Service cards ---------- */
.bk-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.svc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--green-panel);
  color: var(--cream);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.svc-card:hover { border-color: var(--line-strong); }
.svc-card[aria-checked="true"] { border: 1.5px solid var(--gold); background: rgba(201, 162, 75, 0.14); }
.svc-card__tag { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.svc-card__name { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; }
.svc-card__desc { color: var(--text-soft); font-size: 15px; }
.svc-card__price { margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--gold); }

/* ---------- Form hint ---------- */
.field__hint { margin: 0; font-size: 13px; color: var(--text-mute); }

/* ---------- Review ---------- */
.bk-card-title { font-size: 24px; }
.bk-card-title--sm { font-size: 20px; }
.review, .modal__rows { margin: 0; display: flex; flex-direction: column; }
.review div, .modal__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.review div:last-child { border-bottom: 0; font-size: 18px; }
.review dt { color: var(--text-soft); flex: none; }
.review dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pay-box { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.pay-box__hold { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(201, 162, 75, 0.12); border: 1px solid var(--gold); font-weight: 600; font-size: 14px; }
.bk-policy { margin: 0; font-size: 13px; color: var(--text-mute); }

/* ---------- Summary ---------- */
.bk-summary {
  flex: 1 1 300px;
  min-width: 0;
  position: sticky;
  top: 100px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gold);
  background: var(--green-panel);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bk-summary__title { font-size: 22px; }
.bk-summary__list { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.bk-summary__list div { display: flex; justify-content: space-between; gap: 12px; }
.bk-summary__list dt { color: var(--text-soft); }
.bk-summary__list dd { margin: 0; font-weight: 600; text-align: right; }
.bk-summary__list dd.is-empty { color: var(--text-mute); font-weight: 500; }
.bk-summary__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; }
.bk-summary__total strong { font-family: var(--font-display); font-size: 28px; color: var(--gold); }
.bk-summary__cta { width: 100%; }
.bk-summary__cta:disabled { background: var(--line); color: var(--text-soft); cursor: not-allowed; }
.bk-summary__note { margin: 0; font-size: 13px; color: var(--text-mute); }

@media (max-width: 860px) {
  .bk-summary { position: static; }
}

/* ---------- Modals (test payment, booked popup) ---------- */
body.has-modal { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  background: rgba(5, 12, 9, 0.8);
  overflow-y: auto;
}
.modal__box {
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding: 32px 26px 24px;
  border-radius: 20px;
  background: var(--cream);
  color: var(--on-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.modal__tag { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #6B5414; }
.modal__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--gold); color: var(--on-gold); display: flex; align-items: center; justify-content: center; }
.modal__title { font-size: 28px; color: var(--on-gold); }
.modal__title:focus { outline: none; }
.modal__text { margin: 0; color: #3E4A42; }
.modal__rows { width: 100%; padding: 4px 16px; border-radius: 14px; background: #FFFFFF; border: 1px solid #E2D9C3; text-align: left; font-size: 15px; }
.modal__rows div { border-bottom-color: #ECE4D0; }
.modal__rows div:last-child { border-bottom: 0; }
.modal__rows dt { color: #5A6159; }
.modal__rows dd { margin: 0; font-weight: 700; text-align: right; }
.modal__wa { width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #E3F1E6; color: #1F3A2A; text-align: left; font-size: 14px; }
.modal__wa svg { flex: none; color: #1F7A45; margin-top: 1px; }
.modal__actions { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.modal__link { padding: 8px; border: 0; background: none; color: #6B5414; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.modal__link:hover { color: var(--on-gold); }