/* AI Health Intelligence Platform — Design system */
/* Dark premium theme • Outfit font • Unlimitr brand palette */

:root {
  /* Brand Primary Colors */
  --primary-indigo: #0D3256;
  --spanish-green: #008944;
  
  /* Brand Secondary Colors */
  --blue-gray: #0080DD;
  --earth-yellow: #FFC305;
  --almond: #F1DACC;
  --amaranth-pink: #FFA1E6;
  --sky-blue: #23D2FF;
  --dark-pastel-red: #FF0A0A;
  
  /* Dark Theme Palette (matches journey-ultra, offer-upgraded) */
  --bg: #040E1C;
  --bg-soft: #0A1628;
  --card-bg: rgba(15, 23, 42, 0.85);
  --card-border: rgba(0, 212, 255, 0.15);
  --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  
  /* Accent Colors */
  --accent: #00D4FF;
  --accent-secondary: var(--spanish-green);
  --accent-muted: rgba(0, 212, 255, 0.12);
  --accent-border: rgba(0, 212, 255, 0.2);
  
  /* Status Colors */
  --success: #00B87A;
  --success-dim: rgba(0, 184, 122, 0.12);
  --warning: var(--earth-yellow);
  --warning-dim: rgba(255, 195, 5, 0.12);
  --error: #FF3C3C;
  --error-dim: rgba(255, 60, 60, 0.12);
  --info: #00D4FF;
  --info-dim: rgba(0, 212, 255, 0.12);
  
  /* Text Colors */
  --text-main: #E2F0FF;
  --text-secondary: rgba(180, 200, 240, 0.8);
  --text-muted: rgba(180, 200, 240, 0.7);
  --text-dim: rgba(180, 200, 240, 0.5);
  
  /* Semantic */
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Outfit", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  color: var(--text-main);
  background: var(--bg);
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* App shell */
.app-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

@media (min-width: 640px) {
  .app-shell {
    padding: 32px 24px 48px;
  }
}

@media (min-width: 1024px) {
  .app-shell {
    padding: 40px 24px 60px;
  }
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 32px;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.hero .logo {
  height: 44px;
  margin-bottom: 0;
  display: block;
}

.hero .pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 639px) {
  .hero .pill {
    font-size: 11px;
    padding: 6px 14px;
  }
}

.hero h1 {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-main);
  line-height: 1.2;
}

@media (max-width: 639px) {
  .hero h1 {
    font-size: 24px;
    margin-bottom: 10px;
  }
}

.hero p {
  color: var(--text-secondary);
  font-size: clamp(14px, 2.5vw, 17px);
  margin: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

@media (max-width: 639px) {
  .hero p {
    font-size: 14px;
  }
}

/* Progress / stepper */
.step-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}

@media (max-width: 639px) {
  .step-label {
    font-size: 13px;
  }
}

.stepper {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.stepper .step {
  flex: 1;
  height: 6px;
  background: var(--accent-muted);
  border-radius: 999px;
  overflow: hidden;
}

@media (max-width: 639px) {
  .stepper .step {
    height: 5px;
  }
}

.stepper .step span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00B87A, #00D4FF);
  transition: width 0.4s ease;
}

/* Form step header — stepper + step label aligned */
.form-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 24px;
  flex-wrap: nowrap;
}

.form-step-header .stepper {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
  display: flex;
  align-items: center;
}

.form-step-header .step-label {
  margin-bottom: 0;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
  padding-left: 4px;
}

/* Glass card — Premium glass morphism (dark theme) */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s cubic-bezier(.2,.8,.2,1), background .4s ease;
}

@media (min-width: 640px) {
  .glass-card {
    padding: 32px;
  }
}

.glass-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 212, 255, 0.15);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
}

.glass-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent);
}

/* Form */
.form-label {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
  display: block;
  font-size: 15px;
}

.form-control,
.form-select,
textarea.form-control {
  background: rgba(10, 20, 45, 0.6);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 15px;
  transition: border-color .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s cubic-bezier(.2,.8,.2,1), background .3s cubic-bezier(.2,.8,.2,1), transform .2s ease;
}

@media (max-width: 639px) {
  .form-control,
  .form-select,
  textarea.form-control {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px 16px;
  }
}

/* Filled form controls - ensure proper visibility */
.form-control:not(:placeholder-shown),
.form-control[value]:not([value=""]),
.form-select:not([value=""]):not([value="Select"]),
textarea.form-control:not(:placeholder-shown) {
  background: rgba(10, 20, 45, 0.9) !important;
  /* border-color: rgba(0, 212, 255, 0.25); */
  color: var(--text-main) !important;
}

/* Ensure text is visible in filled inputs */
.form-control,
.form-select {
  color: var(--text-main) !important;
}

/* Select dropdown when option is selected */
.form-select option:checked,
.form-select option[selected] {
  background: var(--card-bg);
  color: var(--text-main);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  background: rgba(10, 20, 45, 0.9) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
  outline: none;
  color: var(--text-main) !important;
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* Select dropdown options - dark theme */
.form-select {
  color: var(--text-main) !important;
  background-color: rgba(10, 20, 45, 0.6) !important;
  position: relative;
  z-index: 1;
}

.form-select:focus {
  background-color: rgba(10, 20, 45, 0.9) !important;
  z-index: 10; /* Bring focused select to front */
}

.form-select option {
  background: var(--bg-soft);
  color: var(--text-main);
  padding: 8px;
}

/* Mobile dropdown fixes */
@media (max-width: 767px) {
  .form-select {
    font-size: 16px !important; /* Prevent iOS zoom */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300D4FF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 44px;
  }
  
  /* Ensure dropdowns don't get cut off */
  select.form-select {
    position: relative;
  }
  
  /* Fix for iOS Safari dropdown positioning */
  @supports (-webkit-touch-callout: none) {
    .form-select {
      transform: translateZ(0); /* Force hardware acceleration */
    }
  }
}

/* Ensure filled inputs have proper contrast */
.form-control[value]:not([value=""]),
.form-control:not(:placeholder-shown) {
  color: var(--text-main) !important;
}

/* Flatpickr input styling */
.premium-date {
  background: rgba(10, 20, 45, 0.6) !important;
  color: var(--text-main) !important;
  border-color: var(--card-border) !important;
}

.premium-date:focus {
  background: rgba(10, 20, 45, 0.9) !important;
  border-color: var(--accent) !important;
  color: var(--text-main) !important;
}

.form-range {
  color: var(--accent);
}

/* Buttons - Standardized across all pages */
.primary-btn,
.cta-btn,
.cta-btn-primary {
  background: linear-gradient(135deg, #00D4FF, #00B87A);
  color: #040E1C !important;
  border: none;
  border-radius: 16px;
  padding: 16px 32px;
  font-weight: 700;
  font-family: var(--font);
  font-size: 15px;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s cubic-bezier(.2,.8,.2,1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.35);
  min-height: 48px; /* Better touch target on mobile */
  gap: 8px;
  letter-spacing: 0.01em;
}

@media (max-width: 639px) {
  .primary-btn,
  .cta-btn,
  .cta-btn-primary {
    width: 100%;
    padding: 16px 28px;
    font-size: 15px;
  }
}

.primary-btn:hover,
.cta-btn:hover,
.cta-btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 212, 255, 0.5);
  color: #040E1C !important;
}

.btn-outline,
.cta-btn-secondary {
  background: transparent;
  color: var(--accent) !important;
  border: 1.5px solid var(--accent-border);
  border-radius: 16px;
  padding: 14px 28px;
  font-weight: 600;
  font-family: var(--font);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .3s cubic-bezier(.2,.8,.2,1), background .3s cubic-bezier(.2,.8,.2,1), transform .3s cubic-bezier(.2,.8,.2,1);
  min-height: 48px; /* Better touch target on mobile */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 8px;
}

@media (max-width: 639px) {
  .btn-outline,
  .cta-btn-secondary {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
  }
}

.btn-outline:hover,
.cta-btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--accent) !important;
  transform: translateY(-2px);
}

/* Muted text */
.muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* Step panels — Premium reveal animation */
.step-panel {
  display: none;
  opacity: 0;
  transform: translateY(32px) scale(.985);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}

.step-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(32px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

@media (max-width: 639px) {
  .step-title {
    font-size: 20px;
  }
}

.step-note {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

@media (max-width: 639px) {
  .step-note {
    font-size: 13px;
    margin-bottom: 16px;
  }
}

/* Info icon + click tooltip */
.field-wrap {
  position: relative;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: 12px;
  font-weight: 600;
  font-style: italic;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .info-icon {
    width: 22px;
    height: 22px;
    font-size: 13px;
  }
}

.info-icon:hover {
  transform: scale(1.1);
}

.field-wrap .form-label {
  display: inline-flex;
  align-items: center;
}

/* Info icon wrap — tooltip appears beside icon */
.info-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Tooltip bubble — appears beside i button on icon click */
.info-icon-wrap .info-tooltip {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
  min-width: 200px;
  max-width: 340px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: normal;
}

@media (max-width: 639px) {
  .info-icon-wrap .info-tooltip {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 20px;
    transform: none;
    max-width: none;
  }
}

.info-icon-wrap .info-tooltip::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid rgba(15, 23, 42, 0.95);
}

.info-icon-wrap.info-tooltip-open .info-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Validation states */
.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--spanish-green);
  box-shadow: 0 0 0 3px var(--success-dim);
}

.form-control.is-invalid,
.form-select.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--dark-pastel-red) !important;
  box-shadow: 0 0 0 3px var(--error-dim) !important;
  background-image: none !important;
}

/* Normalize select invalid to match input — Bootstrap adds extra padding-right on .form-select.is-invalid */
.form-select.is-invalid,
select.is-invalid {
  padding-right: 16px !important;
  background-position: right 16px center !important;
  background-size: 12px !important;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
  border-color: var(--dark-pastel-red) !important;
  box-shadow: 0 0 0 3px var(--error-dim) !important;
}

.field-wrap.is-invalid {
  animation: field-shake 0.5s ease;
}

@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.field-error {
  display: block;
  font-size: 12px;
  color: var(--dark-pastel-red);
  margin-top: 6px;
  min-height: 18px;
}

@media (max-width: 639px) {
  .field-error {
    font-size: 13px;
  }
}

/* Submit button disabled state */
.primary-btn--disabled,
.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.primary-btn:disabled:hover {
  opacity: 0.5;
}

/* Gauge */
.gauge-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.gauge-needle {
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Health Score card — premium, eye-pleasing */
.health-score-card {
  border-left: 4px solid var(--spanish-green);
  padding-left: 28px;
}

.health-score-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.health-score-card__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.health-score-card__badge {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--spanish-green);
  background: rgba(0, 137, 68, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
}

.health-score-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.health-score-gauge__svg {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.health-score-gauge__track {
  stroke: rgba(0, 212, 255, 0.08);
}

.health-score-gauge__fill {
  stroke: var(--spanish-green);
  transition: stroke-dasharray 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.health-score-gauge__needle {
  stroke: var(--accent);
}

.health-score-gauge__value {
  margin-top: 12px;
  text-align: center;
}

.health-score-gauge__number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.health-score-gauge__max {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.health-score-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.health-score-info__block {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(13, 50, 86, 0.06);
}

.health-score-info__block:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.health-score-info__heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--spanish-green);
  margin: 0 0 8px;
}

.health-score-info__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-main);
  margin: 0;
  font-weight: 500;
}

.health-score-info__text--muted {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 14px;
}

/* Countdown */
.countdown {
  font-weight: 700;
  color: var(--dark-pastel-red);
  font-size: 18px;
}

/* Offer card */
.offer-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--card-shadow);
}

.badge-50 {
  display: inline-block;
  background: linear-gradient(135deg, var(--earth-yellow), #e6ac00);
  color: #040E1C;
  font-weight: 800;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.price-strike {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 18px;
}

/* Trust / refund */
.trust-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Square cards — equal height and width */
.card-square {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* Daily prescription cards — rectangular, animated */
.prescription-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s cubic-bezier(.2,.8,.2,1), background .4s ease;
}

@media (max-width: 639px) {
  .prescription-card {
    padding: 20px 16px;
    min-height: 100px;
  }
}

.prescription-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 212, 255, 0.15);
}
.prescription-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.prescription-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.prescription-card__unit {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.prescription-card--steps .prescription-card__value { color: var(--blue-gray); }
.prescription-card--strength .prescription-card__value { color: var(--spanish-green); }
.prescription-card--cardio .prescription-card__value { color: var(--sky-blue); }

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Premium date input — indigo accent, custom calendar */
.premium-date-wrap {
  position: relative;
}
.premium-date-wrap .premium-date {
  padding-right: 44px;
  border-radius: var(--radius-sm);
}
.premium-date-wrap .premium-date::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 12px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}
.premium-date-wrap .premium-date-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D3256' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") center/contain no-repeat;
}
.premium-date:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Flatpickr overrides — match theme */
.flatpickr-calendar {
  font-family: var(--font) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid var(--card-border) !important;
  background: var(--bg-soft) !important;
  backdrop-filter: blur(18px) !important;
  z-index: 99999 !important; /* Ensure calendar is above everything on mobile */
}

@media (max-width: 767px) {
  .flatpickr-calendar {
    position: fixed !important;
    top: auto !important;
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    margin: 0 !important;
  }
  
  .flatpickr-calendar.arrowTop::before,
  .flatpickr-calendar.arrowTop::after {
    display: none !important; /* Hide arrow on mobile */
  }
}
.flatpickr-day.selected {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #040E1C !important;
}
.flatpickr-day:hover {
  background: var(--accent-muted) !important;
  border-color: transparent !important;
}
.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--text-main) !important;
}
.flatpickr-current-month .numInputWrapper span.arrowUp::after,
.flatpickr-current-month .numInputWrapper span.arrowDown::after {
  border-bottom-color: var(--accent) !important;
  border-top-color: var(--accent) !important;
}
.flatpickr-weekdays span {
  color: var(--text-muted) !important;
}
.flatpickr-day {
  color: var(--text-main) !important;
}
.flatpickr-monthDropdown-months {
  background: var(--bg-soft) !important;
  color: var(--text-main) !important;
  border: none !important;
  outline: none !important;
}
.flatpickr-monthDropdown-months option {
  background: var(--bg-soft) !important;
  color: var(--text-main) !important;
}

/* Premium sliders — indigo / green accent */
.slider-premium {
  --bs-body-color: var(--primary-indigo);
}
.form-range.slider-premium::-webkit-slider-thumb {
  background: linear-gradient(135deg, #00B87A, #00D4FF);
  border: none;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.35);
  width: 24px;
  height: 24px;
  margin-top: -8px; /* center 24px thumb on 8px track: (8-24)/2 */
}
.form-range.slider-premium::-moz-range-thumb {
  background: linear-gradient(135deg, #00B87A, #00D4FF);
  border: none;
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.35);
  width: 24px;
  height: 24px;
}
.range-display {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

/* Health issues list — minimal radio/checkbox */
.health-issues-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.health-issues-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.health-issue-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: rgba(10, 20, 45, 0.6);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  transition: background 0.3s cubic-bezier(.2,.8,.2,1), border-color 0.3s cubic-bezier(.2,.8,.2,1), transform 0.3s cubic-bezier(.2,.8,.2,1);
  min-height: 48px; /* Better touch target */
}

@media (max-width: 639px) {
  .health-issue-option {
    padding: 14px 16px;
    font-size: 15px;
  }
}

.health-issue-option:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.health-issue-option:has(input[type="radio"]:checked),
.health-issue-option:has(input[type="checkbox"]:checked) {
  background: var(--success-dim);
  border-color: var(--success);
  box-shadow: 0 4px 12px rgba(0, 184, 122, 0.2);
}
.health-issue-option input[type="radio"],
.health-issue-option input[type="checkbox"] {
  accent-color: var(--spanish-green);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .health-issue-option input[type="radio"],
  .health-issue-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}
.health-issue-option input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.health-issue-option:has(input:disabled) {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Responsive — Mobile First */
@media (max-width: 639px) {
  .form-step-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  
  .form-step-header .stepper {
    width: 100%;
  }
  
  .form-step-header .step-label {
    align-self: flex-end;
  }
  
  .step-title {
    font-size: 18px;
  }
  
  .step-note {
    font-size: 13px;
  }
  
  .d-flex.justify-content-end {
    flex-direction: column-reverse;
    width: 100%;
  }
  
  .d-flex.justify-content-end .btn {
    width: 100%;
    margin: 0 !important;
  }
  
  .d-flex.justify-content-end .primary-btn {
    margin-bottom: 12px;
  }
  
  .row.g-3,
  .row.g-4 {
    margin: 0;
  }
  
  .row.g-3 > *,
  .row.g-4 > * {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 16px;
  }
  
  .health-issues-list {
    gap: 12px;
  }
  
  .health-issues-checkboxes {
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .glass-card {
    padding: 20px;
  }
}
