/* ==========================================================================
   STERLING PLASTIC SURGERY - BEVERLY HILLS
   QUIET LUXURY DESIGN SYSTEM (ANTI-AI-SLOP / EDITORIAL RESTRAINT)
   Brand Colors:
   - Text: #2C3138 (Deep Charcoal Slate)
   - Background: #ECECE9 (Warm Alabaster / Architectural Ivory)
   - Primary: #DFE2E6 (Refined Platinum Surface)
   - Secondary: #AEB4BC (Cool Mineral Slate)
   - Accent: #C4A676 (Brushed Champagne Gold)
   ========================================================================== */

:root {
  --color-text: #2c3138;
  --color-text-muted: #606875;
  --color-text-light: #8e95a0;
  
  --color-bg: #ecece9;
  --color-bg-subtle: #f6f6f4;
  
  --color-primary: #dfe2e6;
  --color-primary-light: #f1f3f5;
  
  --color-secondary: #aeb4bc;
  --color-secondary-dark: #7a828e;
  
  --color-accent: #c4a676;
  --color-accent-hover: #b59562;
  --color-accent-light: #f8f5ee;
  --color-accent-glow: rgba(196, 166, 118, 0.22);
  --color-accent-border: rgba(196, 166, 118, 0.4);
  
  --color-surface-card: rgba(255, 255, 255, 0.94);
  --color-border: #dbe0e6;
  --color-border-subtle: rgba(174, 180, 188, 0.3);
  
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  --shadow-card: 0 16px 36px -10px rgba(44, 49, 56, 0.08), 0 0 1px rgba(44, 49, 56, 0.1);
  --shadow-accent: 0 8px 20px -4px rgba(196, 166, 118, 0.35);

  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base reset & zero-scroll viewport lock */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

body {
  background: 
    radial-gradient(circle at 12% 18%, rgba(196, 166, 118, 0.06) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(174, 180, 188, 0.09) 0%, transparent 48%),
    linear-gradient(150deg, #f3f3f0 0%, #ecece9 55%, #e6e7e4 100%);
  display: flex;
  flex-direction: column;
}

/* Viewport Constraint: zero scroll on standard displays */
.app-viewport {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
  height: 100dvh;
  padding: 0.85rem 1.75rem 0.75rem;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  overflow: hidden;
}

@media (max-height: 680px), (max-width: 768px) {
  .app-viewport {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
    padding: 0.85rem 1rem 1.25rem;
  }
}

/* ==========================================================================
   1. BRAND HEADER (MINIMALIST & CONFIDENT)
   ========================================================================== */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}

.brand-emblem {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: #2c3138;
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-text);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 1px;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.confidential-pill {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
}

.clinic-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.clinic-phone:hover {
  color: var(--color-accent);
}

@media (max-width: 480px) {
  .brand-header {
    padding: 0.4rem 0 0.6rem;
    gap: 0.75rem;
  }

  .brand-identity {
    gap: 0.6rem;
    min-width: 0;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-tagline {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }

  .confidential-pill {
    display: none;
  }

  .clinic-phone {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ==========================================================================
   2. MAIN EDITORIAL HERO STAGE
   ========================================================================== */
.main-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.25rem;
  align-items: center;
  min-height: 0;
}

/* Where the page scrolls, the stage takes its content's height rather than squeezing
   into the viewport (which made the card overlap the hero and the header). */
@media (max-height: 680px), (max-width: 768px) {
  .main-stage {
    flex: none;
  }
}

@media (max-width: 960px) {
  .main-stage {
    grid-template-columns: minmax(0, 1fr);  /* never wider than the screen */
    gap: 1.25rem;
  }

  /* Stacked layout: once past step 1 the hero has been read, so the card (and on
     step 3 the whole photo step) gets the screen. intake.js sets data-step. */
  body[data-step]:not([data-step="1"]) .hero-narrative {
    display: none;
  }
}

.hero-narrative {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 0.5rem;
}

.surgeon-credential-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.65rem;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.hero-heading em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent-hover);
}

.hero-description {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 460px;
}

/* Minimalist accreditations list */
.hero-credentials-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 1.1rem;
}

.credential-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--color-text);
  font-weight: 500;
}

.cred-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-accent);
  flex-shrink: 0;
}

/* ==========================================================================
   3. INTAKE CARD (QUIET LUXURY)
   ========================================================================== */
.intake-card-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.intake-card {
  background: var(--color-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.6rem 2rem 1.35rem;
  position: relative;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 600px) {
  .intake-card {
    padding: 1.25rem 1.15rem 1rem;
  }
}

.intake-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #aeb4bc 0%, #c4a676 50%, #dfe2e6 100%);
}

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.step-pill {
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-border);
}

.step-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.progress-track {
  width: 90px;
  height: 4px;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

@media (max-width: 480px) {
  .wizard-header {
    gap: 0.75rem;
    margin-bottom: 0.9rem;
  }

  .progress-track {
    width: 56px;
    flex-shrink: 0;
  }
}

.progress-fill {
  height: 100%;
  width: 50%;
  background: var(--color-accent);
  transition: width var(--transition-normal);
}

.flow-step {
  display: none;
  animation: fadeInStep 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flow-step.active {
  display: block;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
}

/* Fields */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 480px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.field-group {
  margin-bottom: 0.85rem;
}

/* Optional calls & texts consent, under the phone number */
.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.1rem 0 1rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  cursor: pointer;
}

.consent-option input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.1rem 0 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.field-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

/* Custom Dropdown */
.select-wrapper {
  position: relative;
}

.form-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.65rem 2.2rem 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
  cursor: pointer;
  line-height: 1.4;
}

.form-select:hover {
  border-color: var(--color-secondary);
}

.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.select-chevron {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--color-accent);
  display: flex;
  align-items: center;
}

/* Minimalist Timeline Selector Buttons (No Slop) */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.timeline-card {
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
}

.timeline-card:hover {
  border-color: var(--color-accent);
  background: #fdfdfc;
}

.timeline-card.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  box-shadow: 0 2px 8px var(--color-accent-glow);
}

.timeline-label {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.timeline-card.selected .timeline-label {
  color: #8c6a32;
  font-weight: 700;
}

/* ==========================================================================
   FREE-FORM SURGICAL QUALIFICATION (MATCHING REQUESTED SCREENSHOT)
   ========================================================================== */
.freeform-qual-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
  margin-bottom: 0.65rem;
}

.freeform-field-group {
  width: 100%;
}

.freeform-input {
  width: 100%;
  padding: 0.7rem 0.95rem;
  background: #ffffff;
  border: 1.5px solid #2c3138;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.35;
  transition: all var(--transition-fast);
  outline: none;
}

.freeform-input::placeholder {
  color: #6c7380;
  font-weight: 400;
  opacity: 1;
}

.freeform-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-glow);
}

.freeform-textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  background: #ffffff;
  border: 1.5px solid #2c3138;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.45;
  min-height: 85px;
  max-height: 120px;
  resize: vertical;
  transition: all var(--transition-fast);
  outline: none;
}

.freeform-textarea::placeholder {
  color: #6c7380;
  font-weight: 400;
  opacity: 1;
}

.freeform-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-glow);
}

/* Step 2 Yes/No Qualification Questions */
.qual-question {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.qual-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.qual-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
}

.freeform-field-group > .qual-label {
  margin-bottom: 0.35rem;
}

.yesno-toggle {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
}

.yesno-option {
  position: relative;
  cursor: pointer;
}

.yesno-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.yesno-option span {
  display: inline-block;
  min-width: 3.1rem;
  padding: 0.38rem 0.7rem;
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
  transition: all var(--transition-fast);
  user-select: none;
}

.yesno-option:hover span {
  border-color: var(--color-accent);
}

.yesno-option input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.yesno-option input:checked + span {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: #8c6a32;
  box-shadow: 0 2px 8px var(--color-accent-glow);
}

.qual-question.is-invalid .yesno-option span {
  border-color: #dc2626;
}

.qual-detail {
  display: none;
  margin-top: 0.4rem;
}

.qual-question:has(input[value="yes"]:checked) .qual-detail {
  display: block;
}

.freeform-input.is-invalid,
.freeform-textarea.is-invalid {
  border-color: #dc2626;
  background-color: #fef2f2;
}

@media (max-width: 480px) {
  .qual-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* Inputs on Step 3 */
.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-secondary-dark);
  pointer-events: none;
}

.form-input {
  width: 100%;
  background: #ffffff;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.65rem 0.85rem 0.65rem 2.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.form-input:hover {
  border-color: var(--color-secondary);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-input.is-invalid {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.field-error-message {
  font-size: 0.72rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 0.25rem;
  display: none;
}

.field-error-message.visible {
  display: block;
}

/* Step 2 Recap Pill */
.selection-recap {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recap-details {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.recap-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
}

.recap-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
}

.recap-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-accent-hover);
  background: var(--color-accent-light);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-border);
}

/* Actions */
.flow-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #c4a676 0%, #b39462 100%);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.72rem 1.3rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #cbaf81 0%, #bc9c68 100%);
  transform: translateY(-1px);
}

.btn-primary[hidden] {
  display: none;
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-text);
}

/* Small phones: keep Back + Continue on one line, labels unwrapped */
@media (max-width: 480px) {
  .flow-actions {
    gap: 0.5rem;
    margin-top: 0.85rem;
  }

  .flow-actions .btn-primary {
    min-width: 0;
    white-space: nowrap;
    letter-spacing: 0;
    padding: 0.75rem 0.85rem;
  }

  .flow-actions .btn-secondary {
    flex-shrink: 0;
    min-width: 44px;
    justify-content: center;
    padding: 0.75rem 0.8rem;
  }

  /* Intake wizard: Back becomes its arrow alone; the word stays for screen readers */
  #intake-form .flow-actions .btn-secondary span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .flow-actions .btn-primary { white-space: normal; }
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-primary.loading .btn-spinner { display: inline-block; }
.btn-primary.loading .btn-text { display: none; }

.form-footer-guarantee {
  margin-top: 0.65rem;
  font-size: 0.7rem;
  color: var(--color-text-light);
  text-align: center;
}

/* Success Confirmation */
.success-stage {
  display: none;
  text-align: center;
  padding: 1.1rem 0.5rem;
  animation: fadeInStep 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-stage.active {
  display: block;
}

.success-emblem {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent-light);
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.success-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.success-subtitle {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  max-width: 420px;
  margin: 0 auto 1.1rem;
}

.success-card-receipt {
  background: var(--color-bg-subtle);
  border: 1px dashed var(--color-accent-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  max-width: 420px;
  margin: 0 auto 1.15rem;
  text-align: left;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.receipt-row:last-child {
  margin-bottom: 0;
}

.receipt-label {
  color: var(--color-text-muted);
}

.receipt-val {
  color: var(--color-text);
  font-weight: 700;
}

.receipt-code {
  color: var(--color-accent-hover);
  letter-spacing: 0.06em;
  font-family: monospace;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

/* Footer Dock (Quiet Single Line) */
.trust-dock {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--color-text-light);
}

.dock-left {
  display: flex;
  align-items: center;
}

.dock-locations {
  color: var(--color-secondary-dark);
}

@media (max-width: 768px) {
  .trust-dock {
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
  }
}

/* Spam honeypot field: kept off-screen rather than display:none, which some bots skip */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   THANK-YOU SCREEN: COORDINATOR CALL BOOKING (MONTH CALENDAR)
   ========================================================================== */
.success-stage.active {
  text-align: left;
  padding: 0.2rem 0 0;
}

.success-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.success-head .success-emblem {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  font-size: 1.1rem;
  margin: 0;
}

.success-head .success-title {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.success-head .success-subtitle {
  margin: 0;
  max-width: none;
}

.booking [hidden] {
  display: none !important;
}

.booking-status {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.25rem;
}

/* Month grid */
.booking-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.booking-month-label {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-text);
}

.booking-nav {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.booking-nav:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: #8c6a32;
}

.booking-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.booking-weekdays,
.booking-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.booking-weekdays span {
  text-align: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  padding: 0.2rem 0;
}

.booking-date {
  position: relative;
  aspect-ratio: 1;
  max-height: 2.4rem;
  width: 100%;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-date.is-available {
  background: var(--color-accent-light);
  color: #8c6a32;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.booking-date.is-available:hover {
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}

.booking-date[aria-pressed="true"] {
  background: linear-gradient(135deg, #c4a676 0%, #b39462 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--color-accent-glow);
}

.booking-date.is-today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.booking-date:focus-visible,
.booking-slot:focus-visible,
.booking-nav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* Times for the selected day */
.booking-times {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.booking-times-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0.3rem 0 0.6rem;
}

.booking-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 0.4rem;
  max-height: 14.5rem;
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-width: thin;
}

.booking-slot {
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.3rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.booking-slot:hover {
  border-color: var(--color-accent);
}

.booking-slot[aria-checked="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: #8c6a32;
  box-shadow: 0 2px 8px var(--color-accent-glow);
}

.booking-tz {
  font-size: 0.72rem;
  color: var(--color-text-light);
  margin: 0.6rem 0 0.2rem;
}

#btn-book {
  width: 100%;
  margin-top: 0.55rem;
}

.booking-confirmed {
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.booking-confirmed-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c6a32;
}

.booking-confirmed-time {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0.2rem 0 0.35rem;
}

.booking-fallback-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #8c6a32;
}

@media (max-width: 600px) {
  .booking-layout {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .booking-slots {
    grid-template-columns: repeat(3, 1fr);
    max-height: 9.5rem;
  }
}

/* Booking page (/book/): contact details step after choosing a time */
.booking-details .selection-recap {
  margin-bottom: 0.8rem;
}

.booking-details .form-row-2col {
  margin-bottom: 0.75rem;
}

.booking-details .form-input {
  padding-left: 0.85rem;  /* no leading icon here */
}

/* Most visitors arrive from a text message on a phone: calendar first once stacked */
@media (max-width: 960px) {
  .book-page .intake-card-container {
    order: -1;
  }
}

/* Website chat bubble (GHL widget) sits bottom-right: on phones, leave room so the
   last button on the page can always scroll clear of it */
@media (max-height: 680px), (max-width: 768px) {
  .has-chat .app-viewport {
    padding-bottom: 5.5rem;
  }
}

/* ...but on a small phone the photo step must fit the screen without scrolling, and
   the bubble and its greeting would cover the photo buttons: hide it on that step. */
@media (max-width: 480px) {
  body[data-step="3"] chat-widget {
    display: none !important;
  }
}

/* ==========================================================================
   STEP 3: GUIDED PHOTO ASSESSMENT
   The section on the card is this page's own; the capture tool itself runs in
   a same-origin iframe (#photo-capture-overlay) with its own stylesheet.
   ========================================================================== */
.optional-tag {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary-dark);
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.5rem;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.photo-step .step-heading { margin-bottom: 0.5rem; }

.photo-blurb,
.photo-done-detail {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.photo-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0;
}

.photo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.photo-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-caption {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.25;
  min-height: 2.5em;  /* two lines, so the Retake row stays level when one caption wraps */
}

.photo-note,
.photo-hint {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-bottom: 0.6rem;
}

.photo-note span { margin-right: 0.3rem; }

.photo-hint {
  color: var(--color-text-light);
  text-align: center;
  margin-top: 0.5rem;
}

.btn-primary.photo-start {
  width: 100%;
  flex: none;
}

.photo-done-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.photo-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #e6f4ea;
  color: #137333;
  font-size: 0.8rem;
}

/* 44px tap target around small text; the negative margin keeps the layout unchanged */
.photo-retake-one {
  background: none;
  border: none;
  color: var(--color-accent-hover);
  font-family: var(--font-sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: underline;
  cursor: pointer;
  padding: 16px 8px;
  margin: -16px -8px;
}

.photo-retake-one:hover,
.photo-retake-one:focus-visible { color: var(--color-text); }

.btn-secondary.photo-retake-all { width: 100%; justify-content: center; }

.photo-unavailable {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  line-height: 1.5;
}

/* TEMPORARY testing aid (DEBUG only): small and plainly marked as such */
.photo-demo {
  display: block;
  margin: 0 auto 0.5rem;
  padding: 0.3rem 0.7rem;
  background: none;
  border: 1px dashed var(--color-secondary);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
}

.photo-demo:disabled { opacity: 0.5; cursor: default; }

/* The capture tool, full screen while the camera is up */
.photo-capture-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;  /* above the chat widget */
  background: #000000;
}

.photo-capture-overlay[hidden] { display: none; }

.photo-capture-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

html.photo-capture-open,
html.photo-capture-open body { overflow: hidden; }

@media (max-width: 480px) {
  .photo-grid { gap: 0.35rem; margin-bottom: 0.6rem; }
  .photo-caption { font-size: 0.6rem; }

  /* Fit the whole photo step on a small phone screen without scrolling: the
     recap of step 1 is already on steps 2 and 4, so it gives way here. */
  #step-3 .selection-recap { display: none; }
  .photo-blurb,
  .photo-done-detail { margin-bottom: 0.6rem; }
  .photo-note,
  .photo-hint { margin-bottom: 0.45rem; }
  .photo-hint { margin-top: 0.4rem; }
}
