/* ============================================================
   Booking Flow Styles — Prime Medical Group
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Lato:wght@300;400;700&display=swap');

:root {
  --navy:    #0D2157;
  --cyan:    #00BCD4;
  --gray-bg: #f4f6fb;
  --gray-border: #dde1ea;
  --text:    #1a1a2e;
  --text-light: #6b7280;
  --error:   #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --radius:  10px;
  --shadow:  0 4px 24px rgba(13,33,87,0.10);
}

/* ── Shell ───────────────────────────────────────────────── */
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', sans-serif; background: var(--gray-bg); color: var(--text); }

.booking-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.booking-header {
  background: var(--navy);
  padding: 14px 28px;
  display: flex;
  align-items: center;
}

.booking-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
}

.booking-logo img {
  height: 38px;
  width: auto;
}

.booking-main {
  flex: 1;
  padding: 40px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.booking-container {
  width: 100%;
  max-width: 720px;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.booking-breadcrumb {
  margin-bottom: 20px;
}
.booking-breadcrumb a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.booking-breadcrumb a:hover { opacity: 1; }

/* ── Track Chooser ───────────────────────────────────────── */
.track-chooser {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.track-chooser h1 {
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.track-subtitle {
  color: var(--text-light);
  margin-bottom: 36px;
}
.track-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 580px) {
  .track-cards { grid-template-columns: 1fr; }
  .track-chooser h1 { font-size: 1.5rem; }
}

.track-card {
  background: #fff;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.track-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.track-icon {
  width: 52px;
  height: 52px;
  background: #e8f6fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--navy);
}
.track-card h2 { font-size: 1.2rem; color: var(--navy); margin: 0; }
.track-card p  { font-size: 0.92rem; color: var(--text-light); margin: 0; line-height: 1.6; }
.track-cta {
  margin-top: auto;
  font-weight: 600;
  color: var(--cyan);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Booking Card ────────────────────────────────────────── */
.booking-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.booking-card-header {
  background: var(--navy);
  color: #fff;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.booking-card-header > .fas {
  font-size: 1.6rem;
  color: var(--cyan);
  margin-top: 2px;
  flex-shrink: 0;
}
.booking-card-header h1 { font-size: 1.4rem; margin: 0 0 4px; }
.booking-card-header p  { margin: 0; opacity: 0.8; font-size: 0.9rem; }

/* ── Alert Banner ────────────────────────────────────────── */
.booking-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 24px;
  font-size: 0.9rem;
}
.booking-alert .fas { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.booking-alert p    { margin: 4px 0 0; }
.booking-alert-error {
  background: #fef2f2;
  border-left: 4px solid var(--error);
  color: #7f1d1d;
}

/* ── Fieldset / Step ─────────────────────────────────────── */
.booking-fieldset {
  border: none;
  margin: 0;
  padding: 28px;
}
.booking-fieldset legend {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 20px;
}
.booking-fieldset.hidden { display: none; }

/* ── Form Fields ─────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.req { color: var(--error); }

.booking-input {
  padding: 10px 14px;
  border: 1.5px solid var(--gray-border);
  border-radius: 7px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.booking-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,188,212,0.12);
}
select.booking-input { appearance: none; cursor: pointer; }

.booking-input-error {
  border-color: #dc2626 !important;
  background: #fff5f5 !important;
}

.field-error {
  color: var(--error);
  font-size: 0.8rem;
  display: block;
}
.field-error:empty { display: none; }

/* ── Consent Checkbox ────────────────────────────────────── */
.consent-group { margin-bottom: 0; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--navy);
  cursor: pointer;
}

/* ── Slot Picker ─────────────────────────────────────────── */
.slots-container label {
  font-size: 0.875rem;
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}
.slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.slot-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--gray-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.slot-btn:hover {
  border-color: var(--cyan);
  background: #e8f6fa;
}
.slot-btn.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.slots-loading, .slots-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-light);
  padding: 12px 0;
}
.slots-empty { color: var(--warning); }

/* ── Deposit Notice ──────────────────────────────────────── */
.deposit-notice {
  background: #f0fafe;
  border: 1px solid #b2e0eb;
  border-radius: 7px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: #0e4a5e;
  margin-bottom: 20px;
}
.deposit-notice .fas { color: var(--cyan); margin-top: 2px; flex-shrink: 0; }

/* ── Step Navigation ─────────────────────────────────────── */
.step-nav {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-border);
}

.btn-next, .btn-submit {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  width: auto;
}
.btn-next:hover, .btn-submit:hover { background: #1a3370; }

.btn-back {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid var(--gray-border);
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-back:hover { border-color: var(--text-light); color: var(--text); }

/* ── Confirm Card ────────────────────────────────────────── */
.confirm-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 36px;
  text-align: center;
}
.confirm-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 20px;
}
.confirm-card h1 { font-size: 1.8rem; color: var(--navy); margin-bottom: 10px; }
.confirm-subtitle { color: var(--text-light); margin-bottom: 28px; }

.confirm-ref {
  background: var(--gray-bg);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  padding: 18px 24px;
  margin-bottom: 24px;
  text-align: left;
}
.confirm-ref-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  display: block;
  margin-bottom: 6px;
}
.confirm-ref-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
  font-family: monospace;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.confirm-ref-hint { font-size: 0.8rem; color: var(--text-light); margin: 0; }

.confirm-policy {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  margin-bottom: 28px;
  font-size: 0.875rem;
}
.confirm-policy .fas { color: var(--warning); font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.confirm-policy p   { margin: 6px 0 0; }

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
  padding: 12px 28px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.btn-primary:hover { background: #1a3370; }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  padding: 11px 24px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(13,33,87,0.06); }

/* ── Cancel / Result pages ───────────────────────────────── */
.cancel-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  max-width: 560px;
  margin: 0 auto;
}
.cancel-card h1 { font-size: 1.5rem; color: var(--navy); margin-bottom: 8px; }

/* ============================================================
   Self-Pay Booking — multi-screen card UI
   ============================================================ */

body.sp-page { background: #0D2157; margin: 0; padding: 0; }

.sp-wrap {
  background: #0D2157;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 48px;
  position: relative;
  overflow-x: hidden;
  font-family: 'Lato', 'Inter', sans-serif;
}

/* Logo above the card on the navy background */
.sp-above-logo { display: flex; justify-content: center; padding-bottom: 18px; }
.sp-above-logo img { height: 72px; width: auto; filter: brightness(0) invert(1); }

.sp-card {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 390px;
  padding: 28px 28px 24px;
  box-shadow:
    0 0 0 1px rgba(77,184,200,0.15),
    0 8px 40px rgba(0,0,0,0.45),
    0 2px 12px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
  animation: spCardIn 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes spCardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Progress steps */
.sp-steps { display: flex; align-items: center; justify-content: center; margin: 16px 0 20px; }
.sp-step  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sp-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #d0d8e4; background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #9baabb; transition: all 0.3s;
}
.sp-step.active .sp-dot { background: #4db8c8; border-color: #4db8c8; color: white; box-shadow: 0 0 0 4px rgba(77,184,200,0.18); }
.sp-step.done   .sp-dot { background: #2a8fa0; border-color: #2a8fa0; color: white; }
.sp-step-label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.05em;
  color: #9baabb; text-transform: uppercase; white-space: nowrap;
}
.sp-step.active .sp-step-label,
.sp-step.done   .sp-step-label { color: #2a8fa0; }
.sp-line      { flex: 1; height: 2px; background: #e0e7ef; margin: 0 4px 18px; max-width: 36px; }
.sp-line.done { background: #2a8fa0; }

/* Heading */
.sp-heading { text-align: center; margin-bottom: 16px; }
.sp-heading h2 {
  font-family: 'Rajdhani', sans-serif; font-size: 24px; font-weight: 700;
  color: #0D2157; letter-spacing: 0.02em; margin: 0 0 5px;
}
.sp-heading p { font-size: 13px; color: #5a6a80; margin: 0; line-height: 1.5; }

/* Form fields */
.sp-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #5a6a80; margin-bottom: 7px;
}
.sp-input {
  width: 100%; padding: 13px 15px;
  border: 1.5px solid #d8e2ee; border-radius: 10px;
  font-size: 14px; font-family: 'Lato', 'Inter', sans-serif;
  color: #0D2157; background: #f8fafd; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.sp-input::placeholder { color: #b0bec8; }
.sp-input:focus {
  border-color: #4db8c8;
  box-shadow: 0 0 0 3px rgba(77,184,200,0.15);
  background: white;
}
select.sp-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239baabb' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
  cursor: pointer; padding-right: 36px;
}
.sp-field { margin-bottom: 12px; }
.sp-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.sp-field-err { font-size: 11px; color: #dc2626; display: block; margin-top: 3px; }

/* Checkbox */
.sp-check       { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; }
.sp-check input { width: 17px; height: 17px; margin-top: 2px; accent-color: #4db8c8; cursor: pointer; flex-shrink: 0; }
.sp-check span  { font-size: 12.5px; color: #5a6a80; line-height: 1.45; }
.sp-check a     { color: #2a8fa0; font-weight: 700; text-decoration: none; }

/* Buttons */
.sp-btn {
  width: 100%; padding: 14px; background: #4db8c8; color: white; border: none;
  border-radius: 10px; font-family: 'Rajdhani', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(77,184,200,0.35);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.sp-btn:hover    { background: #2a8fa0; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(77,184,200,0.45); }
.sp-btn:active   { transform: translateY(0); }
.sp-btn:disabled { background: #c8d6e0; box-shadow: none; cursor: not-allowed; transform: none; }
.sp-btn-gray {
  background: #eef1f6; color: #5a6a80; box-shadow: none;
  flex: 0 0 auto; width: auto; padding: 14px 20px; font-size: 13px;
}
.sp-btn-gray:hover { background: #e0e7ef; transform: none; box-shadow: none; }
.sp-btn-row             { display: flex; gap: 10px; margin-top: 8px; }
.sp-btn-row .sp-btn     { flex: 1; }

/* Screens */
.sp-screen        { display: none; }
.sp-screen.active { display: block; }

/* Slot grid — reskin booking.css .slot-btn inside sp-wrap */
.sp-wrap .slot-btn {
  padding: 9px 4px; border: 1.5px solid #d8e2ee; border-radius: 8px;
  text-align: center; font-size: 12px; font-weight: 600; color: #5a6a80;
  cursor: pointer; transition: all 0.18s; background: #f8fafd;
  font-family: 'Lato', 'Inter', sans-serif; width: 100%;
}
.sp-wrap .slot-btn:hover    { border-color: #4db8c8; color: #2a8fa0; background: rgba(77,184,200,0.06); }
.sp-wrap .slot-btn.selected { background: #4db8c8; border-color: #4db8c8; color: white; }

#slotGrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 8px; margin-bottom: 12px;
}

.sp-wrap .slots-loading,
.sp-wrap .slots-empty {
  font-size: 13px; color: #5a6a80; padding: 10px 0;
  display: flex; align-items: center; gap: 8px;
}
.sp-wrap .slots-empty { color: #d97706; }

/* Divider */
.sp-divider { height: 1px; background: #eef1f6; margin: 14px 0; }

/* Review table */
.sp-review { background: #f4f8fc; border-radius: 12px; padding: 16px; margin: 14px 0; }
.sp-review-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #e0e9f0; }
.sp-review-row:last-child { border-bottom: none; }
.sp-review-key { font-size: 11px; color: #9baabb; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; flex-shrink: 0; }
.sp-review-val { font-size: 12.5px; font-weight: 700; color: #0D2157; text-align: right; padding-left: 10px; }

/* Deposit info */
.sp-deposit-info {
  background: #f0fafe; border: 1px solid #b2e0eb; border-radius: 8px;
  padding: 12px 14px; display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: #0e4a5e; margin-bottom: 14px; line-height: 1.5;
}

/* Error banner */
.sp-alert   { background: #fef2f2; border-left: 4px solid #dc2626; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; font-size: 13px; color: #7f1d1d; }
.sp-alert p { margin: 2px 0; }

/* Language picker */
.sp-lang { margin-top: 14px; }

/* Mobile — full-bleed card on small phones */
@media (max-width: 480px) {
  .sp-wrap {
    padding: 0;
    align-items: flex-start;
  }
  .sp-card {
    border-radius: 0;
    min-height: 100vh;
    padding: 28px 20px 40px;
    max-width: 100%;
    box-shadow: none;
  }
  .sp-row { grid-template-columns: 1fr; gap: 0; }
  .sp-logo-name { font-size: 20px; }
}

/* iPhone safe-area bottom inset */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sp-card { padding-bottom: max(36px, calc(32px + env(safe-area-inset-bottom))); }
}
