/* Booking page styles — derived from _mockups/master-dispatch/book.html */
* { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #fbfbfb;
  color: #16252B;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
.container {
  max-width: 1120px;
  margin: 24px auto;
  padding: 0 16px;
}
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(26,38,55,0.06), 0 4px 24px rgba(26,38,55,0.08);
  position: relative;
}

/* Step 1: 3-column grid */
.step1 {
  display: grid;
  grid-template-columns: 320px 1fr 240px;
  min-height: 580px;
}
.step1.no-date { grid-template-columns: 320px 1fr; }
.step1.no-date .slots-col { display: none; }

/* Step 2: 2-column */
.step2 {
  display: none;
  grid-template-columns: 320px 1fr;
  min-height: 580px;
}
.grid.show-step2 .step1 { display: none; }
.grid.show-step2 .step2 { display: grid; }

/* Left meta panel */
.meta {
  padding: 28px 24px;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}
.meta-logo-block {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 18px;
  position: relative;
}
.back-arrow {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #006BFF;
  cursor: pointer;
  text-decoration: none;
  font-size: 18px;
}
.back-arrow:hover { background: #E5F0FB; }
.brand-logo {
  max-width: 140px;
  max-height: 64px;
  width: auto;
  height: auto;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
.brand-wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #16252B;
  text-align: center;
  padding: 18px 0;
}
.meta .org {
  color: #6b7280;
  font-size: 13px;
  margin: 0 0 4px;
}
.meta h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #16252B;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.meta-icon-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #16252B;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 500;
}
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #16252B;
  margin-top: 2px;
}
.meta-icon-row a { color: #006BFF; text-decoration: none; word-break: break-all; }
.meta-description {
  color: #16252B;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 10px;
}
.meta-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  gap: 20px;
}
.meta-footer a {
  color: #006BFF;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

/* Calendar column */
.cal-col {
  padding: 28px 24px;
  min-width: 0;
}
.cal-col h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 22px;
  color: #16252B;
  letter-spacing: -0.015em;
}
.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.cal-nav .month {
  font-weight: 600;
  font-size: 15px;
  flex: 1;
  text-align: center;
}
.cal-nav button {
  background: #E5F0FB;
  border: none;
  cursor: pointer;
  color: #006BFF;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-nav button:hover { background: #D0E0F5; }
.cal-nav button:disabled { background: transparent; color: #d1d5db; cursor: not-allowed; }
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 420px;
  margin: 0 auto;
}
.cal-dow {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-align: center;
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #E5F0FB;
  color: #006BFF;
  border: none;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.cal-day:hover { background: #006BFF; color: #fff; }
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.past, .cal-day.unavailable {
  background: transparent;
  color: #C5CAD0;
  cursor: not-allowed;
  font-weight: 400;
}
.cal-day.past:hover, .cal-day.unavailable:hover { background: transparent; color: #C5CAD0; }
.cal-day.selected {
  background: #16252B;
  color: #fff;
}
.cal-day.selected:hover { background: #16252B; color: #fff; }
.cal-day.today { position: relative; }
.cal-day.today::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.timezone-section {
  margin-top: 24px;
  padding-top: 16px;
}
.timezone-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #16252B;
}
.timezone-select {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #16252B;
  font-size: 14px;
}
.timezone-select select {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  color: #16252B;
  cursor: pointer;
}
.timezone-select select:focus {
  outline: none;
  border-color: #006BFF;
  box-shadow: 0 0 0 3px rgba(0,107,255,0.15);
}

/* Slot column */
.slots-col {
  padding: 28px 20px 28px 0;
  min-width: 0;
}
.slots-date {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-top: 4px;
  color: #16252B;
  letter-spacing: -0.01em;
}
.slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.slot {
  padding: 14px 12px;
  border: 1.5px solid #006BFF;
  border-radius: 8px;
  background: #fff;
  color: #006BFF;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  font-size: 15px;
  letter-spacing: -0.005em;
  font-family: inherit;
}
.slot:hover { background: #fff; border-color: #16252B; color: #16252B; }
.slot.selected {
  padding: 0;
  border: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.slot.selected .picked {
  background: #16252B;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
}
.slot.selected .next {
  background: #006BFF;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  border: none;
  font-size: 15px;
  font-family: inherit;
}
.slot.selected .next:hover { background: #0058CC; }
.slots-empty {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  padding: 24px 8px;
}

/* Step 2 form */
.form-col {
  padding: 28px 28px;
  min-width: 0;
}
.form-col h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  color: #16252B;
  letter-spacing: -0.015em;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #16252B;
}
.field .req { color: #16252B; font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #16252B;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  color: #16252B;
  background: #fff;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: #006BFF;
  box-shadow: 0 0 0 3px rgba(0,107,255,0.15);
}
.field input.invalid, .field textarea.invalid {
  border-color: #B22234;
}
.field-error {
  color: #B22234;
  font-size: 12px;
  margin: 6px 0 0;
  font-weight: 500;
}
.phone-input {
  display: flex;
  align-items: center;
  border: 1px solid #16252B;
  border-radius: 6px;
  overflow: hidden;
}
.phone-flag {
  padding: 11px 14px;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #16252B;
  white-space: nowrap;
  flex: 0 0 auto;
}
.us-flag {
  display: inline-block;
  width: 22px;
  height: 14px;
  background: linear-gradient(to bottom, #B22234 0, #B22234 16.66%, #fff 16.66%, #fff 33.33%, #B22234 33.33%, #B22234 50%, #fff 50%, #fff 66.66%, #B22234 66.66%, #B22234 83.33%, #fff 83.33%, #fff 100%);
  position: relative;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 2px;
  flex: 0 0 auto;
}
.us-flag::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 9px;
  height: 7px;
  background: #3C3B6E;
}
.phone-input input { border: none; padding: 11px 14px; }
.phone-input input:focus { box-shadow: none; }

.legal {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
  margin: 14px 0;
}
.legal a { color: #006BFF; font-weight: 600; }

.form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  font-weight: 500;
}

.submit-btn {
  background: #006BFF;
  color: #fff;
  border: none;
  padding: 13px 36px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  letter-spacing: -0.005em;
  font-family: inherit;
}
.submit-btn:hover { background: #0058CC; }
.submit-btn:disabled { background: #93BFFF; cursor: not-allowed; }

/* Loading + error states */
.page-loading {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  z-index: 10;
}
.page-loading.hidden { display: none; }
.page-error {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 8px;
  z-index: 11;
  padding: 24px;
  text-align: center;
}
.page-error[hidden] { display: none; }

/* Reschedule banner — sits above the card when guest arrives via email link */
.reschedule-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
.reschedule-banner[hidden] { display: none; }
.reschedule-banner-icon {
  font-size: 18px;
  font-weight: 700;
}

/* Reschedule email-verification gate (reuses .page-error sizing) */
.reschedule-gate {
  flex-direction: column;
  text-align: center;
  z-index: 12;
}
.reschedule-gate[hidden] { display: none; }
.reschedule-gate h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #16252B;
}
.reschedule-gate-hint {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 16px;
  max-width: 380px;
}
.reschedule-gate-hint span {
  font-weight: 600;
  color: #16252B;
}
.reschedule-gate-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}
.reschedule-gate-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #16252B;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.reschedule-gate-form button {
  background: #006BFF;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.reschedule-gate-error {
  color: #B22234;
  font-size: 13px;
  margin: 10px 0 0;
  font-weight: 500;
}
.reschedule-gate-error[hidden] { display: none; }
.page-error button {
  background: #006BFF;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Responsive */
@media (max-width: 980px) {
  .step1 { grid-template-columns: 280px 1fr; }
  .step1 .slots-col {
    grid-column: 1 / -1;
    border-top: 1px solid #e5e7eb;
    padding: 18px 24px 24px;
    margin-top: 0;
  }
  .step1 .slots { max-height: none; }
}
@media (max-width: 720px) {
  .step1, .step2 { grid-template-columns: 1fr; }
  .meta { border-right: none; border-bottom: 1px solid #e5e7eb; }
}
@media (max-width: 480px) {
  .container { padding: 0 8px; }
  .meta, .cal-col, .form-col, .slots-col { padding: 18px 16px; }
}
