.booking-main {
  min-height: calc(100vh - 160px);
  padding: 86px 0 120px;
  overflow-x: clip;
}

.booking-intro {
  max-width: 1280px;
  margin-bottom: 64px;
}

.booking-intro h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.booking-intro > p:last-child {
  max-width: 650px;
  margin-top: 30px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.booking-flow {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: start;
}

.service-panel {
  grid-column: 1;
}

.availability-panel {
  grid-column: 1;
}

.booking-flow .booking-form {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.booking-panel,
.booking-form {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(23, 39, 47, 0.07);
  padding: clamp(26px, 4vw, 48px);
}

.booking-panel-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 34px;
}

.booking-panel-heading .eyebrow {
  margin-bottom: 7px;
}

.booking-panel-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 550;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.booking-step {
  padding-top: 4px;
  color: var(--accent-vivid);
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.booking-status {
  min-height: 26px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.slots-list {
  display: grid;
  gap: 12px;
}

.slot-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.slot-option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.slot-copy {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background-soft);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.slot-copy strong {
  font-size: 0.95rem;
  font-weight: 650;
}

.slot-copy span {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 750;
}

.slot-option:hover .slot-copy {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.slot-option input:focus-visible + .slot-copy {
  outline: 3px solid rgba(47, 93, 115, 0.24);
  outline-offset: 2px;
}

.slot-option input:checked + .slot-copy {
  border-color: var(--accent);
  background: #edf5f7;
  box-shadow: inset 4px 0 0 var(--accent);
}

.booking-form {
  display: block;
}

.service-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.service-option {
  position: relative;
  cursor: pointer;
}

.service-option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.service-option > span {
  display: grid;
  min-height: 132px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  transition: 160ms ease;
}

.service-option strong { font-size: 0.95rem; }
.service-option small { color: var(--text-secondary); }
.service-option b { align-self: end; color: var(--accent); font-size: 1.35rem; }
.service-option:hover > span { border-color: var(--accent); transform: translateY(-1px); }
.service-option input:focus-visible + span { outline: 3px solid rgba(47, 93, 115, 0.24); outline-offset: 2px; }
.service-option input:checked + span { border-color: var(--accent); background: #edf5f7; box-shadow: inset 4px 0 0 var(--accent); }

.service-fixed > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name price"
    "duration price";
  column-gap: 24px;
  row-gap: 8px;
  align-items: center;
  min-height: 116px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: #edf5f7;
  box-shadow: inset 4px 0 0 var(--accent);
  padding: 18px 20px;
}

.service-fixed strong { grid-area: name; font-size: 0.98rem; line-height: 1.35; }
.service-fixed small { grid-area: duration; color: var(--text-secondary); }
.service-fixed b { grid-area: price; color: var(--accent); font-size: 1.35rem; white-space: nowrap; }

.first-available {
  display: grid;
  gap: 8px;
  border-radius: 16px;
  background: var(--background-soft);
  padding: 16px;
}

.first-available[hidden] { display: none; }
.first-available > span { color: var(--text-secondary); font-size: 0.85rem; }

.first-slot-button {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font-weight: 750;
  cursor: pointer;
}

.first-slot-button:hover, .first-slot-button.is-selected { color: var(--accent); }

.text-button {
  margin-top: 16px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.calendar-section {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.calendar-toolbar h3 { text-align: center; font-size: 1rem; }
.calendar-nav { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: #fff; cursor: pointer; }
.calendar-nav:disabled { opacity: 0.28; cursor: default; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-weekdays { margin-bottom: 5px; color: var(--text-secondary); font-size: 0.72rem; font-weight: 700; text-align: center; }
.calendar-day, .calendar-empty { aspect-ratio: 1; }
.calendar-day { border: 0; border-radius: 10px; background: transparent; color: #aab2b6; }
.calendar-day.has-slots { background: var(--teal-soft); color: var(--text-primary); font-weight: 750; cursor: pointer; }
.calendar-day.has-slots:hover, .calendar-day.is-selected { background: var(--accent); color: #fff; }
.calendar-day:disabled { cursor: default; }

.day-times { margin-top: 22px; }
.day-times h4 { margin-bottom: 12px; font-size: 0.9rem; }
.time-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.time-option { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 9px 5px; color: var(--accent); font-weight: 700; cursor: pointer; }
.time-option:hover, .time-option.is-selected { border-color: var(--accent); background: var(--accent); color: #fff; }

.selection-summary {
  display: grid;
  gap: 2px;
  margin: -8px 0 28px;
  border-radius: 12px;
  background: var(--background-soft);
  padding: 14px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.selection-summary strong { color: var(--text-primary); }
.selection-summary span { color: var(--accent); font-weight: 700; }
.acceptances { display: grid; gap: 15px; margin: 6px 0 24px; }
.acceptances #new-patient-documents { display: grid; gap: 15px; }
#new-patient-documents[hidden],
#new-patient-signature[hidden],
#new-patient-information[hidden] { display: none !important; }
.patient-type-fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; border: 0; padding: 0; }
.patient-type-fieldset legend { grid-column: 1 / -1; margin-bottom: 4px; color: var(--text-primary); font-size: 0.95rem; font-weight: 750; }
.patient-type-option { position: relative; cursor: pointer; }
.patient-type-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.patient-type-option span { position: relative; display: grid; align-content: center; gap: 5px; min-height: 108px; border: 1px solid var(--border); border-radius: 16px; background: #fff; padding: 18px 18px 18px 52px; box-shadow: 0 8px 24px rgba(23, 39, 47, 0.04); transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.patient-type-option span::before { content: ""; position: absolute; top: 22px; left: 18px; width: 20px; height: 20px; border: 2px solid #9aabb3; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px #fff; transition: 160ms ease; }
.patient-type-option strong { color: var(--text-primary); font-size: 0.98rem; line-height: 1.3; }
.patient-type-option small { color: var(--text-secondary); line-height: 1.45; }
.patient-type-option:hover span { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(23, 39, 47, 0.08); }
.patient-type-option input:checked + span { border-color: var(--accent); background: #edf5f7; box-shadow: inset 4px 0 0 var(--accent), 0 12px 28px rgba(23, 39, 47, 0.07); }
.patient-type-option input:checked + span::before { border-color: var(--accent); background: var(--accent); }
.patient-type-option input:focus-visible + span { outline: 3px solid rgba(47, 93, 115, 0.24); outline-offset: 2px; }
.privacy-check a { color: var(--accent); font-weight: 650; }
.signature-field { margin-top: 26px; }
.signature-field .form-help { margin: 7px 0 0; }

.form-field {
  margin-bottom: 22px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text-primary);
  padding: 11px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 93, 115, 0.14);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-help {
  margin: -5px 0 24px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.privacy-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.89rem;
  line-height: 1.5;
}

.privacy-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.privacy-details {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.privacy-details summary {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 700;
}

.privacy-details p {
  margin-top: 12px;
}

.privacy-details a {
  color: var(--accent);
}

.form-message {
  min-height: 26px;
  margin-top: 20px;
  font-size: 0.92rem;
  font-weight: 650;
}

.form-message-error {
  color: #a43b32;
}

.form-message-success {
  border-radius: 10px;
  background: var(--sage-soft);
  color: #276446;
  padding: 13px 15px;
}

.booking-submit {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  border: 0;
  cursor: pointer;
}

.booking-submit:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

@media (max-width: 1120px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .booking-flow { grid-template-columns: 1fr; }
  .service-panel, .availability-panel, .booking-flow .booking-form { grid-column: 1; grid-row: auto; }
}

@media (max-width: 680px) {
  .booking-main {
    padding: 56px 0 80px;
  }

  .booking-intro {
    margin-bottom: 38px;
  }

  .booking-intro h1 {
    font-size: clamp(2.35rem, 13vw, 3.35rem);
  }

  .booking-panel,
  .booking-form {
    border-radius: 16px;
    padding: 24px 20px;
  }

  .booking-panel-heading {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .patient-type-fieldset {
    grid-template-columns: 1fr;
  }

  .slot-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .service-options { grid-template-columns: 1fr; }
  .service-option > span { min-height: 105px; }
  .service-fixed > span {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "duration" "price";
    gap: 7px;
  }
  .time-options { grid-template-columns: repeat(3, 1fr); }
}
