:root {
  --scheduler-error: #ffb4a8;
  --scheduler-success: #b7f7da;
  --scheduler-warning: #ffd88a;
}

body {
  font-size: 18px;
}

.booking-layout {
  align-items: start;
}

.scheduler-shell {
  min-height: 680px;
}

.live-help-link {
  color: #dff9ef;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.scheduler-announcement {
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.scheduler-announcement:not(:empty) {
  margin: 18px 28px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 180, 168, .42);
  border-radius: 14px;
  background: rgba(83, 17, 17, .52);
  color: #fff4f1;
  font-weight: 700;
  line-height: 1.45;
}

.direct-note--urgent {
  border-color: rgba(255, 216, 138, .35);
  background: rgba(72, 46, 8, .42);
}

.direct-note a,
.booking-footer a {
  color: inherit;
  font-weight: 700;
}

.step-panel h2 {
  max-width: 760px;
}

.step-description {
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.65;
}

.action-button {
  min-height: 56px;
  padding: 15px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
}

.action-button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.action-button.is-busy {
  position: relative;
  pointer-events: none;
}

.action-button.is-busy::before {
  content: "";
  width: 17px;
  height: 17px;
  margin-right: 9px;
  display: inline-block;
  vertical-align: -3px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: scheduler-spin .8s linear infinite;
}

@keyframes scheduler-spin {
  to { transform: rotate(360deg); }
}

.service-option,
.window-option,
.date-option {
  min-height: 64px;
}

.service-option strong,
.window-option strong {
  font-size: 1.02rem;
}

.service-option small,
.window-option small {
  line-height: 1.5;
}

.date-option[disabled],
.window-option[disabled] {
  opacity: .42;
  cursor: not-allowed;
  filter: grayscale(.35);
}

.availability.is-limited {
  color: var(--scheduler-warning);
}

.availability.is-unavailable {
  color: var(--scheduler-error);
}

.loading-panel,
.error-panel {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
}

.loading-ring {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,.2);
  border-right-color: #dff9ef;
  border-radius: 50%;
  animation: scheduler-spin .8s linear infinite;
}

.error-panel {
  border: 1px solid rgba(255, 180, 168, .35);
  border-radius: 18px;
  padding: 28px;
  background: rgba(83, 17, 17, .28);
}

.field-grid {
  gap: 18px;
}

.field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-weight: 700;
}

.field label small {
  font-weight: 500;
  opacity: .72;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 15px;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.choice-button:focus-visible,
.action-button:focus-visible,
.service-option:focus-visible,
.window-option:focus-visible,
.date-option:focus-visible {
  outline: 3px solid rgba(196, 255, 228, .8);
  outline-offset: 3px;
}

.field .is-invalid,
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--scheduler-error);
  box-shadow: 0 0 0 2px rgba(255, 180, 168, .2);
}

.field-error {
  margin: 7px 0 0;
  color: var(--scheduler-error);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.4;
}

.field-help {
  margin: 7px 0 0;
  font-size: .86rem;
  line-height: 1.45;
  opacity: .76;
}

.choice-field {
  grid-column: 1 / -1;
}

.choice-field > span {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-button {
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(5, 18, 30, .72);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.choice-button.is-selected {
  border-color: rgba(196, 255, 228, .7);
  background: rgba(23, 89, 68, .62);
  box-shadow: inset 0 0 0 1px rgba(196, 255, 228, .22);
}

.consent-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(5, 18, 30, .48);
}

.consent-row input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: #b7f7da;
}

.consent-row label {
  line-height: 1.5;
  cursor: pointer;
}

.consent-row.is-invalid {
  border-color: var(--scheduler-error);
}

.no-payment-note,
.saved-progress-note,
.appointment-note {
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.55;
}

.no-payment-note {
  margin-top: 18px;
  border: 1px solid rgba(183, 247, 218, .3);
  background: rgba(22, 79, 59, .3);
  color: #eafff5;
}

.saved-progress-note {
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  font-size: .88rem;
  opacity: .86;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.review-card .review-row strong {
  overflow-wrap: anywhere;
}

.review-edit {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #dff9ef;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.review-row > span:first-child {
  min-width: 120px;
}

.success-panel {
  min-height: 540px;
}

.success-panel h2 {
  max-width: 620px;
}

.success-summary {
  width: 100%;
  max-width: 680px;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid rgba(183, 247, 218, .3);
  border-radius: 16px;
  background: rgba(22, 79, 59, .24);
}

.success-summary div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.success-summary div:last-child {
  border-bottom: 0;
}

.success-summary span {
  opacity: .72;
}

.success-summary strong {
  overflow-wrap: anywhere;
}

.success-code {
  user-select: all;
}

.success-actions {
  flex-wrap: wrap;
}

.confirmation-warning {
  max-width: 680px;
  margin-top: 18px;
  color: #fff5d8;
  line-height: 1.55;
}

@media (max-width: 900px) {
  body {
    font-size: 17px;
  }

  .scheduler-shell {
    min-height: 0;
  }

  .scheduler-topline {
    align-items: flex-start;
    gap: 12px;
  }

  .live-help-link {
    font-size: .88rem;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .booking-header nav .quiet-link {
    display: none;
  }

  .booking-header .phone-pill {
    padding-inline: 12px;
  }

  .scheduler-announcement:not(:empty) {
    margin-inline: 18px;
  }

  .progress button strong {
    font-size: .7rem;
  }

  .date-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .date-option {
    min-width: 0;
  }

  .window-options {
    grid-template-columns: 1fr;
  }

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

  .field,
  .field.full,
  .choice-field,
  .consent-row {
    grid-column: 1;
  }

  .step-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .step-actions .primary {
    order: -1;
  }

  .action-button {
    width: 100%;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .review-edit {
    margin-left: 0;
  }

  .success-summary div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-ring,
  .action-button.is-busy::before {
    animation-duration: 1.6s;
  }
}
