/* GeneRecovery Site-Specific Styles */
/* Health and wellness platform with medical focus */

/* WCAG 2.2 AA COMPLIANCE - MINIMUM FONT SIZE */
body,
html {
  font-size: 14px !important; /* WCAG minimum 14px, override any inherited 13px */
}

:root {
  /* GeneRecovery brand colors - Based on site_config.py */
  --site-primary: #388e3c;     /* Primary: Green */
  --site-secondary: #66bb6a;   /* Secondary: Light Green */
  --site-accent: #2e7d32;      /* Accent: Dark Green */
  --site-success: #4caf50;     /* Success: Green */
  --site-warning: #ff9800;     /* Warning: Orange */

  /* RGB values for transparency effects */
  --site-primary-rgb: 56, 142, 60;
  --site-secondary-rgb: 102, 187, 106;
  --site-accent-rgb: 46, 125, 50;

  /* Clean, medical styling */
  --radius: 6px;
  --shadow-health: 0 2px 12px rgba(5, 150, 105, 0.08);
  --transition-smooth: 350ms ease;
}

/* Health dashboard styling */
.health-dashboard {
  background: var(--gray-50);
  min-height: 100vh;
  padding: var(--space-6);
}

.health-metric {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.health-metric-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--site-primary);
}

/* Recovery progress indicators */
.recovery-timeline {
  position: relative;
  padding-left: var(--space-8);
}

.recovery-milestone {
  position: relative;
  padding-bottom: var(--space-6);
  border-left: 2px solid var(--site-primary);
}

.recovery-milestone::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--site-primary);
  border-radius: var(--radius-full);
  border: 3px solid white;
  box-shadow: var(--shadow-sm);
}

/* Wellness recommendations */
.wellness-card {
  background: white;
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.wellness-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--site-primary), var(--site-secondary));
}

.wellness-card:hover {
  box-shadow: var(--shadow-health);
  border-color: var(--site-primary);
  transform: translateX(4px);
}

/* Health metrics display */
.health-metric-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--site-primary);
  font-variant-numeric: tabular-nums;
}

.health-metric-unit {
  font-size: var(--text-sm);
  color: var(--gray-600);
  font-weight: 500;
  margin-left: var(--space-1);
}

.health-metric-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
}

.health-metric-trend.positive {
  color: var(--site-success);
  background: rgba(16, 185, 129, 0.1);
}

.health-metric-trend.negative {
  color: var(--color-danger);
  background: rgba(220, 38, 38, 0.1);
}

/* Recovery journey visualization */
.journey-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.journey-step-indicator {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all var(--transition-smooth);
}

.journey-step-indicator.completed {
  background: var(--site-primary);
  color: white;
}

.journey-step-indicator.current {
  background: var(--site-secondary);
  color: white;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.2);
}

.journey-step-indicator.upcoming {
  background: var(--gray-200);
  color: var(--gray-500);
}

/* Medical-style buttons */
.btn-health {
  background: var(--site-primary);
  color: white;
  border: none;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition-smooth);
  position: relative;
}

.btn-health:hover {
  background: #047857;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

.btn-health-secondary {
  background: white;
  color: var(--site-primary);
  border: 2px solid var(--site-primary);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition-smooth);
}

.btn-health-secondary:hover {
  background: var(--site-primary);
  color: white;
  transform: translateY(-1px);
}

/* Health alerts and notifications */
.health-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.health-alert-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.health-alert.info {
  background: rgba(99, 102, 241, 0.1);
  color: var(--site-accent);
}

.health-alert.info .health-alert-icon {
  background: var(--site-accent);
  color: white;
}

.health-alert.success {
  background: rgba(5, 150, 105, 0.1);
  color: var(--site-primary);
}

.health-alert.success .health-alert-icon {
  background: var(--site-primary);
  color: white;
}

/* ========================================
   THEME STYLES (merged from generecovery-theme.css)
   Nov 27, 2025 CSS Consolidation
   ======================================== */

/*
 * Gene Recovery Theme - A Supportive, Healing Interface
 * Designed with empathy, hope, and recovery in mind
 * Following Steve Jobs' philosophy: "Design is how it works"
 */

/* ========================================
   WCAG 2.2 AA COMPLIANCE - MINIMUM FONT SIZE
   ======================================== */

body,
html {
  font-size: 14px !important; /* WCAG minimum 14px, override any inherited 13px */
}

/* ========================================
   GENE RECOVERY BRAND VARIABLES
   ======================================== */

:root {
  /* Brand Colors - Nature-inspired healing palette */
  --gr-primary: #2C5F2D;        /* Forest Green - Growth, stability */
  --gr-primary-light: #4E7C4F;
  --gr-primary-dark: #1A3B1A;

  --gr-secondary: #81C784;      /* Soft Green - Hope, renewal */
  --gr-secondary-light: #A5D6A7;
  --gr-secondary-dark: #66BB6A;

  --gr-accent: #4CAF50;         /* Living Green - Progress, vitality */
  --gr-accent-light: #69F0AE;
  --gr-accent-dark: #388E3C;

  /* Supportive Colors */
  --gr-calm: #E8F5E9;           /* Very light green - Peaceful */
  --gr-warmth: #FFF3E0;         /* Soft amber - Comfort */
  --gr-clarity: #E3F2FD;        /* Light blue - Mental clarity */
  --gr-strength: #F3E5F5;       /* Light purple - Inner strength */

  /* Semantic Colors for Recovery Journey */
  --gr-milestone: #FFD54F;      /* Amber - Achievements */
  --gr-support: #64B5F6;        /* Blue - Community support */
  --gr-caution: #FFB74D;        /* Orange - Mindful warnings */
  --gr-wellness: #4FC3F7;       /* Light blue - Health */

  /* Override design system with Gene Recovery values */
  --color-primary: var(--gr-primary);
  --color-secondary: var(--gr-secondary);
  --color-accent: var(--gr-accent);
}

/* ========================================
   HERO SECTION - INSPIRATIONAL & WELCOMING
   ======================================== */

.gr-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gr-calm) 0%, var(--gr-clarity) 100%);
}

/* Animated background with subtle movement */
.gr-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 80%, var(--gr-secondary-light) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, var(--gr-accent-light) 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, var(--gr-warmth) 0%, transparent 50%);
  animation: gr-breathe 20s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes gr-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.05) rotate(5deg); }
}

.gr-hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  padding: var(--space-2xl);
  z-index: 1;
}

.gr-hero-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-light);
  color: var(--gr-primary-dark);
  margin-bottom: var(--space-lg);
  animation: gr-fade-in-up 1s ease-out;
}

.gr-hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--gr-primary);
  margin-bottom: var(--space-2xl);
  opacity: 0.9;
  animation: gr-fade-in-up 1s ease-out 0.2s;
  animation-fill-mode: both;
}

@keyframes gr-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   RECOVERY JOURNEY CARDS
   ======================================== */

.gr-journey-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.gr-journey-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gr-secondary), var(--gr-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.gr-journey-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

.gr-journey-card:hover::before {
  transform: scaleX(1);
}

/* Milestone Badge */
.gr-milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--gr-milestone);
  color: var(--gr-primary-dark);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.gr-milestone-badge::before {
  content: "🌟";
  font-size: 1.2em;
}

/* ========================================
   ASSESSMENT FORM - GENTLE & SUPPORTIVE
   ======================================== */

.gr-assessment {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

.gr-assessment-step {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  animation: gr-gentle-appear 0.6s ease-out;
}

@keyframes gr-gentle-appear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gr-assessment-title {
  font-size: var(--font-size-2xl);
  color: var(--gr-primary);
  margin-bottom: var(--space-md);
  font-weight: var(--font-weight-light);
}

.gr-assessment-description {
  color: var(--color-gray-600);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

/* Substance Selection - Non-judgmental Checkboxes */
.gr-substance-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.gr-substance-item {
  position: relative;
}

.gr-substance-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.gr-substance-label {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  background: var(--gr-calm);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-quart);
  font-weight: var(--font-weight-medium);
  color: var(--gr-primary-dark);
}

.gr-substance-checkbox:checked + .gr-substance-label {
  background: var(--gr-secondary-light);
  border-color: var(--gr-accent);
  transform: scale(1.02);
}

.gr-substance-label::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 2px solid var(--gr-primary);
  border-radius: var(--radius-md);
  margin-right: var(--space-sm);
  transition: all var(--duration-fast) var(--ease-out-quart);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gr-substance-checkbox:checked + .gr-substance-label::before {
  background: var(--gr-accent);
  border-color: var(--gr-accent);
  content: "✓";
  color: white;
}

/* Progressive Disclosure - Smooth Reveal */
.gr-reveal-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all var(--duration-slow) var(--ease-out-expo);
}

.gr-reveal-section.active {
  max-height: 1000px;
  opacity: 1;
  margin-top: var(--space-lg);
}

/* Frequency Slider - Visual Feedback */
.gr-frequency-slider {
  margin: var(--space-xl) 0;
}

.gr-frequency-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
}

.gr-frequency-track {
  position: relative;
  height: 8px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.gr-frequency-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gr-secondary) 0%, var(--gr-accent) 100%);
  border-radius: var(--radius-full);
  transition: width var(--duration-normal) var(--ease-out-quart);
}

/* Support Messages - Encouraging & Non-judgmental */
.gr-support-message {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--gr-clarity);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
  animation: gr-gentle-appear 0.6s ease-out;
}

.gr-support-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--gr-support);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2em;
}

.gr-support-text {
  flex: 1;
  color: var(--color-gray-700);
  line-height: 1.6;
}

/* ========================================
   PROGRESS VISUALIZATION
   ======================================== */

.gr-progress-timeline {
  position: relative;
  padding: var(--space-2xl) 0;
}

.gr-progress-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-gray-200);
  transform: translateX(-50%);
}

.gr-progress-item {
  position: relative;
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.gr-progress-dot {
  position: absolute;
  left: 50%;
  top: var(--space-lg);
  width: 20px;
  height: 20px;
  background: var(--color-white);
  border: 3px solid var(--gr-secondary);
  border-radius: var(--radius-full);
  transform: translateX(-50%);
  transition: all var(--duration-normal) var(--ease-out-quart);
  z-index: 1;
}

.gr-progress-item.completed .gr-progress-dot {
  background: var(--gr-accent);
  border-color: var(--gr-accent);
  box-shadow: 0 0 0 8px rgba(76, 175, 80, 0.2);
}

.gr-progress-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-left: 60%;
  box-shadow: var(--shadow-md);
}

.gr-progress-item:nth-child(even) .gr-progress-content {
  margin-left: 0;
  margin-right: 60%;
}

/* ========================================
   WELLNESS DASHBOARD
   ======================================== */

.gr-wellness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.gr-wellness-metric {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.gr-wellness-metric:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gr-wellness-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  background: linear-gradient(135deg, var(--gr-secondary-light), var(--gr-accent-light));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5em;
}

.gr-wellness-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--gr-primary);
  margin-bottom: var(--space-xs);
}

.gr-wellness-label {
  font-size: var(--font-size-base);
  color: var(--color-gray-600);
  margin-bottom: var(--space-md);
}

.gr-wellness-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: var(--gr-calm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--gr-accent-dark);
}

/* ========================================
   SUPPORTIVE ANIMATIONS
   ======================================== */

/* Pulse animation for call-to-action */
.gr-pulse {
  animation: gr-pulse 2s infinite;
}

@keyframes gr-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

/* Gentle float for wellness icons */
.gr-float {
  animation: gr-float 3s ease-in-out infinite;
}

@keyframes gr-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .gr-hero-title {
    font-size: var(--font-size-2xl);
  }

  .gr-substance-group {
    grid-template-columns: 1fr;
  }

  .gr-progress-content {
    margin-left: var(--space-md);
    margin-right: var(--space-md);
  }

  .gr-progress-item:nth-child(even) .gr-progress-content {
    margin-left: var(--space-md);
    margin-right: var(--space-md);
  }

  .gr-wellness-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Focus states with calming colors */
.gr-substance-checkbox:focus + .gr-substance-label {
  outline: 3px solid var(--gr-support);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gr-journey-card {
    border: 2px solid var(--gr-primary);
  }

  .gr-substance-label {
    border-width: 3px;
  }
}

/* Dark mode for evening use */
@media (prefers-color-scheme: dark) {
  .gr-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  }

  .gr-journey-card,
  .gr-assessment-step,
  .gr-wellness-metric {
    background: #2d2d2d;
    color: #e0e0e0;
  }

  .gr-hero-title {
    color: var(--gr-secondary-light);
  }

  .gr-substance-label {
    background: rgba(129, 199, 132, 0.1);
    color: var(--gr-secondary-light);
  }
}
