/* =====================================================================
   IvyBridge · Booking wizard page styles
   ===================================================================== */

/* ── Page header ── */
.book-header {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 40px;
}
.book-header .eyebrow { color: var(--gold); }
.book-header h1 { font-size: clamp(38px, 5vw, 72px); margin-top: 14px; }
.book-header h1 em { font-style: italic; color: var(--ivy); }
.book-header .lede { margin-top: 14px; max-width: 640px; }

/* ── Sticky stepper ── */
.book-stepper-wrap {
  border-bottom: 1px solid var(--line);
  padding: 0;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.book-stepper {
  display: flex;
  align-items: stretch;
}
.book-stepper-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-right: 1px solid var(--line);
  background: transparent;
  border-top: none;
  border-bottom: none;
  border-left: none;
  text-align: left;
  cursor: default;
  transition: background 0.15s;
}
.book-stepper-step:last-child { border-right: none; }
.book-stepper-step.is-done { cursor: pointer; }
.book-stepper-step.is-done:hover { background: var(--paper-2); }
.book-stepper-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  font-weight: 500;
}
.book-stepper-step.is-active .book-stepper-num {
  background: var(--ivy);
  border-color: var(--ivy);
  color: var(--paper);
}
.book-stepper-step.is-done .book-stepper-num {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ivy-deep);
}
.book-stepper-label {
  font-family: var(--serif-display);
  font-size: 17px;
  color: var(--muted);
}
.book-stepper-step.is-active .book-stepper-label {
  color: var(--ivy);
  font-style: italic;
}
.book-stepper-step.is-done .book-stepper-label { color: var(--ink-2); }

/* ── Main 2-col layout ── */
.book-body {
  padding: 48px 0 96px;
}
.book-layout {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 56px;
  align-items: start;
}

/* ── Step panel ── */
.book-panel { display: none; }
.book-panel.is-active { display: block; }
.book-step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.book-step-head h2 { font-size: clamp(28px, 3.5vw, 48px); }
.book-step-head p { color: var(--muted); margin-top: 10px; font-size: 15px; }

.book-step-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ── Teacher card grid (step 1) ── */
.book-teachers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.book-teacher-card {
  display: block;
  padding: 22px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  width: 100%;
}
.book-teacher-card:hover { border-color: var(--ivy); }
.book-teacher-card.is-active {
  background: var(--ivy);
  color: var(--paper);
  border-color: var(--ivy-deep);
}
.book-teacher-card-subj {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
}
.book-teacher-card.is-active .book-teacher-card-subj { color: var(--gold-soft); }
.book-teacher-card-name {
  font-family: var(--serif-display);
  font-size: 24px;
  margin-top: 6px;
}
.book-teacher-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.book-teacher-card.is-active .book-teacher-card-meta { color: rgba(255,255,255,0.6); }
.book-teacher-card-footer-row {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.book-teacher-card.is-active .book-teacher-card-footer-row {
  border-top-color: rgba(255,255,255,0.14);
}
.book-teacher-card-style { font-family: var(--serif-display); font-style: italic; }
.book-teacher-card-price { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; }

/* ── Calendar grid (step 2) ── */
.book-calendar-wrap {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  overflow-x: auto;
}
.book-calendar-grid {
  display: grid;
  grid-template-columns: 108px repeat(7, 1fr);
  min-width: 640px;
}
.book-cal-header-cell {
  padding: 12px 8px;
  text-align: center;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.book-cal-header-cell:last-child { border-right: none; }
.book-cal-corner {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 12px 14px;
}
.book-cal-corner-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
.book-cal-corner-month {
  font-family: var(--serif-display);
  font-size: 17px;
  color: var(--ink);
  margin-top: 3px;
}
.book-cal-day-name {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
.book-cal-day-date {
  font-family: var(--serif-display);
  font-size: 22px;
  color: var(--ink);
  margin-top: 3px;
}
.book-cal-day-today { font-style: italic; color: var(--ivy); }
.book-cal-slot-row {
  display: contents;
}
.book-cal-time-cell {
  padding: 14px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-family: var(--serif-display);
  font-size: 14px;
  color: var(--ink-2);
}
.book-cal-slot {
  padding: 13px 4px;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ivy);
  border-top: none;
  border-left: none;
  transition: background 0.1s;
}
.book-cal-slot:last-child { border-right: none; }
.book-cal-slot:hover:not(:disabled) { background: var(--paper-2); }
.book-cal-slot.is-unavailable {
  background: var(--paper-2);
  color: var(--muted);
  cursor: not-allowed;
}
.book-cal-slot.is-selected {
  background: var(--ivy);
  color: var(--paper);
}
.book-cal-last-row .book-cal-slot,
.book-cal-last-row .book-cal-time-cell { border-bottom: none; }

.book-cal-legend {
  display: flex;
  gap: 24px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.book-cal-legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 1px;
}

/* ── Profile form (step 3) ── */
.book-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.book-field { display: flex; flex-direction: column; }
.book-field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.65;
  margin-bottom: 8px;
}
.book-field input,
.book-field select,
.book-field textarea {
  font-family: var(--serif-body);
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  resize: vertical;
}
.book-field input:focus,
.book-field select:focus,
.book-field textarea:focus { outline: 2px solid var(--ivy); outline-offset: -1px; }

/* ── Confirm step ── */
.book-confirm-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  margin-top: 24px;
}
.book-confirm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.book-confirm-field-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.book-confirm-field-val {
  font-family: var(--serif-display);
  font-size: 17px;
  color: var(--ink);
}
.book-pricing-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 28px;
  margin-top: 20px;
}

/* ── Success view ── */
.book-success {
  text-align: center;
  padding: 56px 0;
}
.book-success h2 {
  font-size: clamp(36px, 5vw, 64px);
  margin-top: 16px;
}
.book-success h2 em { font-style: italic; color: var(--ivy); }
.book-success-ref {
  display: inline-block;
  margin: 48px auto 0;
  padding: 22px 36px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  text-align: left;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 480px;
  line-height: 1.6;
}
.book-success-ref-code {
  color: var(--gold);
  font-family: var(--mono);
  font-style: normal;
  letter-spacing: 0.16em;
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

/* ── Summary aside ── */
.book-summary {
  position: sticky;
  top: 80px;
}
.book-summary-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px;
}
.book-summary-teacher-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}
.book-summary-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ivy);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--serif-display);
  font-size: 20px;
  flex-shrink: 0;
}
.book-summary-avatar.gold { background: var(--gold); color: var(--ivy-deep); }
.book-summary-teacher-name { font-family: var(--serif-display); font-size: 20px; }
.book-summary-teacher-subj {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 1px;
}
.book-summary-teacher-school { font-size: 12px; color: var(--muted); margin-top: 2px; }
.book-summary-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.book-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.book-summary-row .k { color: var(--muted); }
.book-summary-row .v { font-family: var(--serif-display); color: var(--ink); }
.book-summary-price-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.book-summary-price-label { font-family: var(--serif-display); font-size: 15px; color: var(--muted); }
.book-summary-price-val {
  font-family: var(--serif-display);
  font-size: 34px;
  color: var(--ivy);
  font-style: italic;
  line-height: 1;
}
.book-summary-price-note {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-align: right;
}
.book-summary-note {
  margin-top: 20px;
  padding: 20px;
  border: 1px dashed var(--line);
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  border-radius: 2px;
}

/* ── Mobile ── */
@media (max-width: 880px) {
  .book-layout { grid-template-columns: 1fr; }
  .book-summary { position: static; }
  .book-teachers-grid { grid-template-columns: 1fr; }
  .book-profile-grid { grid-template-columns: 1fr; }
  .book-confirm-grid { grid-template-columns: 1fr; }
  .book-stepper { flex-direction: column; }
  .book-stepper-step { border-right: none; border-bottom: 1px solid var(--line); }
  .book-stepper-step:last-child { border-bottom: none; }
  .book-cal-legend { flex-wrap: wrap; gap: 10px; }
}
