/* ============================================
   AURA — Pilates booking UI (public)
   Loaded only on pilates.php after style.css
   Mobile-first. Owns all book-* / booking-* /
   pkg-item / date-strip / timetable / modal rules
   for the booking flow so they cannot conflict
   with the main stylesheet.
   ============================================ */

/* ---- Hard-hide modals unless explicitly open ---- */
.class-modal,
.booking-confirm-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.class-modal.is-open,
.booking-confirm-modal.is-open {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}

.class-modal-backdrop,
.booking-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 30, 0.52);
}

.class-modal-card,
.booking-confirm-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: min(90vh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 0.9rem;
  padding: 1.5rem 1.25rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .class-modal-card,
  .booking-confirm-card {
    padding: 1.75rem 1.5rem 1.5rem;
  }
}

.class-modal-close,
.booking-confirm-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  color: #333;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.booking-confirm-card .eyebrow {
  display: block;
  margin-bottom: 0.25rem;
}

.booking-confirm-card h3,
.class-modal-card h3 {
  margin: 0.35rem 2rem 0.75rem 0;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
}

.booking-confirm-card p,
.class-modal-card p {
  margin: 0;
  color: #555;
  line-height: 1.55;
  font-size: 0.92rem;
}

.booking-confirm-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.booking-confirm-actions .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-align: center;
}

@media (min-width: 480px) {
  .booking-confirm-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
  .booking-confirm-actions .btn {
    width: auto;
    min-width: 9rem;
  }
}

.class-modal-meta {
  margin: 1rem 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #444;
}
.class-modal-meta li {
  margin-bottom: 0.35rem;
}

/* ---- Section shell ---- */
.section-book {
  background: #f7f4ef;
  padding: 1.25rem 0 2.5rem;
}

#packages {
  padding-bottom: 0.5rem;
}

/* ---- Booking process steps ---- */
.booking-process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 1.15rem 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 30px -18px rgba(20, 32, 30, 0.28);
  width: 100%;
  box-sizing: border-box;
}

.booking-process-head {
  max-width: none;
}

.booking-process-head h2 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.15rem, 3.2vw, 1.35rem);
  line-height: 1.2;
  font-weight: 600;
  color: #1a1a1a;
}

.booking-process-head p {
  margin: 0;
  color: #5a5a5a;
  font-size: 0.86rem;
  line-height: 1.45;
}

.booking-process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0;
}

.booking-process-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border-radius: 0.6rem;
  background: rgba(31, 92, 86, 0.05);
  border-left: none;
}

.booking-process-step > span {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1f5c56;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.booking-process-step strong {
  display: block;
  margin: 0 0 0.12rem;
  color: #1f1f1f;
  font-size: 0.86rem;
  line-height: 1.25;
}

.booking-process-step small {
  display: block;
  color: #6a6a6a;
  font-size: 0.74rem;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .booking-process {
    padding: 1.25rem 1.35rem;
  }
  .booking-process-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .booking-process-step {
    background: transparent;
    padding: 0 0 0 0.85rem;
    border-left: 1px solid rgba(31, 92, 86, 0.16);
    border-radius: 0;
  }
}

@media (min-width: 900px) {
  .booking-process {
    grid-template-columns: minmax(200px, 0.9fr) minmax(0, 2fr);
    align-items: center;
    gap: 1.75rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.35rem;
  }
  .booking-process-head {
    max-width: 22rem;
  }
}

/* ---- Book grid: packages + calendar ---- */
.book-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem;
  width: 100%;
  min-height: 0;
  background: transparent;
  border: none;
}

@media (min-width: 768px) {
  .book-grid {
    grid-template-columns: minmax(240px, 36%) minmax(0, 1fr) !important;
    gap: 1.35rem;
    min-height: 420px;
  }
}

.book-col {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 30px -18px rgba(20, 32, 30, 0.28);
  border: none;
  padding: 1.1rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .book-col {
    padding: 1.25rem 1.25rem 1.4rem;
  }
}

.book-col-title {
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: #1a1a1a;
}

.book-col-sub,
.book-muted,
.book-rule {
  font-size: 0.82rem;
  color: #5a5a5a;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

/* Category nav */
.pkg-cat-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.pkg-cat-arrow,
.date-strip-arrow {
  width: 32px;
  height: 32px;
  border: 1px solid #2b2b2b;
  background: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pkg-cat-label {
  font-weight: 700;
  font-size: 0.92rem;
  min-width: 0;
  flex: 1;
  text-align: center;
}

@media (max-width: 400px) {
  .pkg-cat-arrow,
  .date-strip-arrow {
    width: 28px;
    height: 28px;
  }
  .pkg-cat-label {
    font-size: 0.85rem;
  }
}

/* Package list */
.pkg-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: visible;
  max-height: none;
}

@media (min-width: 768px) {
  .pkg-items {
    overflow-y: auto;
    max-height: min(52vh, 440px);
    -webkit-overflow-scrolling: touch;
  }
}

.pkg-item {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(43, 58, 56, 0.12);
  background: #fafaf8;
  padding: 0.8rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
  box-sizing: border-box;
}

.pkg-item.is-selected {
  border-color: #1f7a4c;
  background: #eef8f1;
  box-shadow: inset 3px 0 0 #1f7a4c;
}

.pkg-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.pkg-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: break-word;
}

.pkg-item-price {
  font-weight: 700;
  color: #7a3e2e;
  white-space: nowrap;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.pkg-item-desc {
  display: block;
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.25rem;
}

.pkg-item-valid {
  display: block;
  font-size: 0.75rem;
  color: #5a5a5a;
  margin-top: 0.3rem;
}

/* Date strip */
.date-strip-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.date-strip {
  display: flex;
  flex: 1;
  gap: 0.3rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.date-strip::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex: 1 0 auto;
  min-width: 2.9rem;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  border-radius: 4px;
}

.date-pill.is-active {
  border-color: #7a3e2e;
  background: #faf6f2;
}

.date-pill-dow {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  color: #6a6a6a;
  letter-spacing: 0.04em;
}
.date-pill-day {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}
.date-pill-mon {
  display: block;
  font-size: 0.62rem;
  color: #6a6a6a;
}

/* Day sheet + timetable */
.day-sheet {
  border: none;
  background: transparent;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.day-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid rgba(43, 58, 56, 0.08);
  border-radius: 0.5rem 0.5rem 0 0;
  flex-wrap: wrap;
}

.day-sheet-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.btn-today {
  border: 1px solid #2b2b2b;
  background: #fff;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border-radius: 4px;
}

.timetable {
  flex: 1;
  max-height: min(48vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .timetable {
    max-height: min(52vh, 420px);
  }
}

.tt-row {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid rgba(43, 58, 56, 0.06);
  background: #fff;
}

.tt-row.is-selected {
  background: #eef8f1;
}
.tt-row.is-dim {
  opacity: 0.5;
}

.tt-time strong {
  display: block;
  font-size: 0.85rem;
}
.tt-time span {
  font-size: 0.7rem;
  color: #7a7a7a;
}
.tt-name {
  font-weight: 700;
  font-size: 0.88rem;
}
.tt-sub {
  font-size: 0.74rem;
  color: #444;
}
.tt-meta {
  font-size: 0.72rem;
  color: #7a7a7a;
  margin-top: 0.1rem;
}

.tt-btn {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1.5px solid #1a1a1a;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  border-radius: 4px;
  box-sizing: border-box;
}

.tt-btn.is-on {
  background: #1f7a4c;
  border-color: #1f7a4c;
  color: #fff;
}

.tt-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #8a8a8a;
}

@media (min-width: 641px) {
  .tt-row {
    grid-template-columns: 5.25rem 1fr auto;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
  }
  .tt-btn {
    grid-column: auto;
    width: auto;
    min-width: 6.5rem;
  }
}

/* ---- Checkout bar (selection summary) ---- */
/* Hidden by default — only show when JS removes [hidden] after a real selection */
.book-checkout {
  margin-top: 1rem;
  background: #fff;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 30px -18px rgba(20, 32, 30, 0.28);
  padding: 1.1rem 1rem 1.2rem;
  width: 100%;
  box-sizing: border-box;
}

.book-checkout[hidden],
.book-checkout:not(.is-visible) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.book-checkout.is-visible:not([hidden]) {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.book-checkout-inner {
  max-width: 56rem;
  width: 100%;
}

.book-selection-bar {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f5c56;
  margin-bottom: 0.35rem;
}

.book-sel-list {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
  font-size: 0.85rem;
}

.book-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.book-checkout-actions .btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .book-checkout {
    padding: 1.15rem 1.35rem 1.25rem;
  }
  .book-checkout-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .book-checkout-actions .btn {
    width: auto;
    flex: 1 1 10rem;
  }
}

.book-footnote {
  font-size: 0.78rem;
  color: #6a6a6a;
  margin: 0.75rem 0 0;
  line-height: 1.4;
}

/* Pricing choice cards (above booking) */
.pricing-choice-card {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pricing-choice-card:hover {
  color: inherit;
  transform: translateY(-3px);
}
.pricing-choice-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--coral-600, #c85a35);
}

@media (max-width: 639px) {
  #packages .grid.grid-3 {
    gap: 1rem;
  }
  .pricing-choice-card .card-body {
    padding: 1.2rem 1.1rem;
  }
}
