/* Catalogue and booking UI only. Shared layout lives in style.css, responsive.css, and homepage.css. */
.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;
}

.modal-open {
  overflow: hidden;
}

/* ==========================================================================
   CATALOGUE DIALOG (PRESERVED)
   ========================================================================== */
.catalogue-dialog {
  width: min(100%, 100vw);
  height: min(100%, 100vh);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: var(--ps-ivory);
  color: var(--ps-text);
}
.catalogue-dialog::backdrop {
  background: rgba(43, 43, 40, .45);
}
.dialog-close {
  position: absolute;
  z-index: 2;
  top: 1.5rem;
  right: 2rem;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--ps-border);
  border-radius: 50%;
  background: var(--ps-ivory);
  font-size: 1.6rem;
  cursor: pointer;
}
.catalogue {
  position: relative;
  min-height: 100%;
  padding: clamp(5rem, 9vw, 8rem) 5vw 3rem;
}
.catalogue__head {
  max-width: 46rem;
}
.catalogue__head h2 {
  margin-bottom: .7rem;
}
.catalogue__head label {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: 1.8rem;
  padding: .9rem 1rem;
  border: 1px solid var(--ps-border);
  background: var(--ps-white);
}
.catalogue input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  outline: 0;
}
.catalogue__body {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 3rem;
  margin-top: 3rem;
}
.catalogue__body nav {
  border-top: 1px solid var(--ps-border);
}
.catalogue__body nav button {
  display: flex;
  width: 100%;
  gap: .7rem;
  padding: .75rem 0;
  border: 0;
  border-bottom: 1px solid var(--ps-border);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.catalogue__body nav button.is-active {
  color: var(--ps-sage-dark);
  font-weight: 600;
}
.catalogue__count {
  color: var(--ps-text-muted);
  font-size: .8rem;
}
.catalogue__results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.catalogue__results button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .2rem;
  padding: 1rem;
  border: 1px solid var(--ps-border);
  background: var(--ps-white);
  text-align: left;
  cursor: pointer;
}
.catalogue__results small {
  grid-column: 1;
  color: var(--ps-text-muted);
}
.catalogue__results b {
  grid-row: 1;
  grid-column: 2;
}

/* ==========================================================================
   BOOKING MODAL DIALOG (REDESIGNED COMPACT MODAL)
   ========================================================================== */
.booking-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: 960px;
  width: calc(100% - 48px);
  max-height: 85vh;
  height: auto;
  padding: 0;
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  background: var(--ps-white);
  color: var(--ps-text);
  box-shadow: 0 24px 60px -12px rgba(30, 30, 28, 0.28);
  overflow: hidden;
  box-sizing: border-box;
}

.booking-dialog::backdrop {
  background: rgba(30, 30, 28, 0.44);
  backdrop-filter: blur(4px);
  animation: psBackdropFade 0.24s ease forwards;
}

.booking-dialog[open] {
  animation: psModalRise 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes psModalRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes psBackdropFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.booking {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 85vh;
  background: var(--ps-white);
  color: var(--ps-text);
  font-family: var(--font-body, 'Inter', sans-serif);
}

/* Modal Header */
.booking__header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 1.75rem;
  border-bottom: 1px solid var(--ps-border);
  background: var(--ps-white);
}

.booking__header-title h2 {
  margin: 0;
  font-family: var(--font-display, 'Newsreader', Georgia, serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.2;
  color: var(--ps-charcoal);
}

.booking__header-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}

.booking__step-indicator {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ps-text-muted);
  white-space: nowrap;
}

.booking__progress-bar {
  width: 80px;
  height: 4px;
  background: var(--ps-sand);
  border-radius: 2px;
  overflow: hidden;
}

.booking__progress-fill {
  height: 100%;
  background: var(--ps-sage-dark);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.booking__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid var(--ps-border);
  border-radius: 50%;
  background: var(--ps-ivory);
  color: var(--ps-charcoal);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.booking__close:hover {
  background: var(--ps-cream);
  border-color: var(--ps-charcoal);
}

/* Modal Scrollable Content Area */
.booking__content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.75rem 2rem;
  overscroll-behavior: contain;
}

/* Step Pane Fade-in */
.booking__step-pane {
  animation: psStepFade 0.2s ease-out;
}

@keyframes psStepFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.booking__step-header {
  margin-bottom: 1.2rem;
}

.booking__step-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display, 'Newsreader', Georgia, serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.2;
  color: var(--ps-charcoal);
}

.booking__step-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ps-text-muted);
}

/* Modal Sticky Footer */
.booking__footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--ps-border);
  background: var(--ps-white);
}

.booking__footer-left,
.booking__footer-right {
  display: flex;
  align-items: center;
}

/* ==========================================================================
   STEP 1: TREATMENT SELECTION
   ========================================================================== */
.booking__search-wrap {
  margin-bottom: 0.9rem;
}

.booking__search-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-white);
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.booking__search-box:focus-within {
  border-color: var(--ps-charcoal);
}

.booking__search-box i {
  color: var(--ps-text-muted);
  font-size: 0.88rem;
}

.booking__search-box input {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ps-text);
  outline: none;
}

/* Category Chips */
.booking__chips-bar {
  display: flex;
  gap: 0.45rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.1rem;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.booking-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--ps-border);
  border-radius: 20px;
  background: var(--ps-ivory);
  color: var(--ps-charcoal);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.booking-chip:hover {
  border-color: var(--ps-charcoal);
  background: var(--ps-cream);
}

.booking-chip.is-active {
  border-color: var(--ps-sage-dark);
  background: var(--ps-sage-dark);
  color: var(--ps-white);
}

/* Treatments List */
.booking__treatment-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem 0.75rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.booking-treatment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 54px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-white);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.booking-treatment-item:hover {
  border-color: var(--ps-sage);
  background: #fbfbf9;
}

.booking-treatment-item.is-selected {
  border-color: var(--ps-sage-dark);
  background: var(--ps-sage-light);
}

.booking-treatment-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.booking-treatment-item__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ps-charcoal);
  line-height: 1.25;
}

.booking-treatment-item__cat {
  font-size: 0.74rem;
  color: var(--ps-text-muted);
  text-transform: capitalize;
}

.booking-treatment-item__radio {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 1.5px solid var(--ps-border);
  border-radius: 50%;
  background: var(--ps-white);
  color: transparent;
  font-size: 0.65rem;
  transition: all 0.15s ease;
}

.booking-treatment-item.is-selected .booking-treatment-item__radio {
  border-color: var(--ps-sage-dark);
  background: var(--ps-sage-dark);
  color: var(--ps-white);
}

.booking__empty-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ps-text-muted);
  border: 1px dashed var(--ps-border);
  border-radius: 4px;
}

.booking__empty-results i {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  display: block;
}

.booking__empty-results p {
  margin: 0;
  font-size: 0.88rem;
}

/* ==========================================================================
   STEP 2: DATE & TIME (+ SPECIALIST PREFERENCE)
   ========================================================================== */
.booking__specialist-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-ivory);
}

.booking__specialist-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.booking__specialist-sub {
  font-size: 0.74rem;
  color: var(--ps-text-muted);
}

.booking__subheading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ps-charcoal);
}

.booking__subheading i {
  color: var(--ps-sage-dark);
}

.booking__select {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-white);
  color: var(--ps-text);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.booking__select:focus {
  border-color: var(--ps-charcoal);
}

.booking__datetime-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.booking__col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.prototype-note-inline {
  font-size: 0.72rem;
  color: var(--ps-sage-dark);
  background: var(--ps-sage-light);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  font-weight: 500;
}

.booking__date-preview {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ps-charcoal);
}

.calendar {
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-white);
}

.calendar__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--ps-border);
}

.calendar__bar button {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  color: var(--ps-charcoal);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

.calendar__bar button:hover:not(:disabled) {
  background: var(--ps-ivory);
}

.calendar__month-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ps-charcoal);
}

.calendar__dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0.6rem;
}

.calendar__dates button {
  min-height: 3.4rem;
  padding: 0.25rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.calendar__dates button small {
  display: block;
  font-size: 0.65rem;
  color: var(--ps-text-muted);
}

.calendar__dates button span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ps-charcoal);
}

.calendar__dates button:hover:not(:disabled):not(.is-selected) {
  background: var(--ps-ivory);
  border-color: var(--ps-border);
}

.calendar__dates button.is-selected {
  background: var(--ps-charcoal);
  color: var(--ps-white);
  border-color: var(--ps-charcoal);
}

.calendar__dates button.is-selected small,
.calendar__dates button.is-selected span {
  color: var(--ps-white);
}

.calendar__dates button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.time-slots button {
  height: 44px;
  padding: 0.5rem;
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-white);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ps-charcoal);
  cursor: pointer;
  transition: all 0.15s ease;
}

.time-slots button:hover {
  border-color: var(--ps-charcoal);
  background: var(--ps-cream);
}

.time-slots button.is-selected {
  border-color: var(--ps-charcoal);
  background: var(--ps-charcoal);
  color: var(--ps-white);
}

.time-slots-empty {
  padding: 2.75rem 1rem;
  text-align: center;
  border: 1px dashed var(--ps-border);
  border-radius: 4px;
  color: var(--ps-text-muted);
}

.time-slots-empty i {
  font-size: 1.8rem;
  margin-bottom: 0.65rem;
  display: block;
}

.time-slots-empty p {
  margin: 0;
  font-size: 0.84rem;
}

/* ==========================================================================
   STEP 3: YOUR DETAILS
   ========================================================================== */
.booking__form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.booking__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.booking__field--full {
  grid-column: 1 / -1;
}

.booking__field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ps-charcoal);
}

.booking__optional {
  font-weight: 400;
  color: var(--ps-text-muted);
  font-size: 0.78rem;
}

.booking__field input,
.booking__field textarea {
  width: 100%;
  height: 48px;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-white);
  color: var(--ps-text);
  font: inherit;
  font-size: 0.88rem;
  transition: border-color 0.15s ease;
  outline: none;
  box-sizing: border-box;
}

.booking__field textarea {
  height: auto;
  min-height: 80px;
  resize: vertical;
}

.booking__field input:focus,
.booking__field textarea:focus {
  border-color: var(--ps-charcoal);
}

.check-field {
  display: flex !important;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.25rem;
  cursor: pointer;
}

.check-field input[type="checkbox"] {
  width: 1.15rem !important;
  height: 1.15rem !important;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--ps-sage-dark);
  cursor: pointer;
}

.check-field span {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ps-text-muted);
  line-height: 1.45;
}

.form-error {
  margin-top: 0.85rem;
  color: #b33927;
  font-size: 0.84rem;
  font-weight: 500;
}

/* ==========================================================================
   STEP 4: REVIEW & CONFIRM
   ========================================================================== */
.booking__review-card {
  border: 1px solid var(--ps-border);
  border-radius: 6px;
  background: var(--ps-white);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.booking__review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--ps-border);
}

.booking__review-row:last-child {
  border-bottom: none;
}

.booking__review-item dt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ps-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.booking__review-item dt i {
  color: var(--ps-sage-dark);
}

.booking__review-item dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ps-charcoal);
  line-height: 1.4;
}

.booking__review-notes {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--ps-text-muted);
}

.booking__edit-btn {
  border: 1px solid var(--ps-border);
  border-radius: 4px;
  background: var(--ps-ivory);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ps-charcoal);
  cursor: pointer;
  transition: all 0.15s ease;
}

.booking__edit-btn:hover {
  background: var(--ps-cream);
  border-color: var(--ps-charcoal);
}

.prototype-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--ps-sage);
  background: var(--ps-sage-soft);
  font-size: 0.82rem;
  color: var(--ps-charcoal);
  border-radius: 0 4px 4px 0;
}

.prototype-note i {
  color: var(--ps-sage-dark);
  flex-shrink: 0;
}

/* ==========================================================================
   PROTOTYPE CONFIRMATION SCREEN
   ========================================================================== */
.booking-confirm {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.booking-confirm__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  color: var(--ps-sage-dark);
  font-size: 3.5rem;
}

.booking-confirm h2 {
  font-family: var(--font-display, 'Newsreader', Georgia, serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--ps-charcoal);
}

.booking-confirm__summary {
  font-size: 0.92rem;
  color: var(--ps-text-muted);
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.booking-confirm__card {
  max-width: 420px;
  margin: 0 auto 1.5rem;
  border: 1px solid var(--ps-border);
  border-radius: 6px;
  background: var(--ps-ivory);
  padding: 1rem 1.25rem;
  text-align: left;
}

.booking-confirm__row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--ps-border);
  font-size: 0.85rem;
}

.booking-confirm__row:last-child {
  border-bottom: none;
}

.booking-confirm__row span {
  color: var(--ps-text-muted);
}

.booking-confirm__row strong {
  color: var(--ps-charcoal);
}

.booking-confirm__action {
  margin-top: 1.5rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE BEHAVIOR
   ========================================================================== */
@media (max-width: 900px) {
  .catalogue__results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .booking-dialog {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border: none;
    border-radius: 0;
  }

  .booking {
    max-height: 100dvh;
    height: 100dvh;
  }

  .booking__header {
    padding: 0.9rem 1.15rem;
  }

  .booking__header-title h2 {
    font-size: 1.2rem;
  }

  .booking__content {
    padding: 1.15rem;
  }

  .booking__footer {
    padding: 0.9rem 1.15rem;
  }

  .booking__treatment-list {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .booking__specialist-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .booking__select {
    width: 100%;
  }

  .booking__datetime-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .time-slots {
    grid-template-columns: repeat(3, 1fr);
  }

  .booking__form-grid {
    grid-template-columns: 1fr;
  }

  .booking__review-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .booking__edit-btn {
    align-self: flex-start;
  }
}

@media (max-width: 620px) {
  .catalogue {
    padding: 5rem 1.25rem 2rem;
  }
  .catalogue__body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .catalogue__body nav {
    display: flex;
    overflow: auto;
    gap: .75rem;
  }
  .catalogue__body nav button {
    width: max-content;
    white-space: nowrap;
    border-top: 1px solid var(--ps-border);
    padding: .65rem;
  }
  .catalogue__results {
    grid-template-columns: 1fr;
  }
  .dialog-close {
    top: 1rem;
    right: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-dialog[open],
  .booking-dialog::backdrop,
  .booking__step-pane {
    animation: none !important;
    transition: none !important;
  }
}
