/* ============================================
   Patient Portal - Theme Configuration
   ============================================
   
   HOW TO CUSTOMIZE:
   1. Change the values below to match your clinic's brand
   2. Refresh your browser to see changes instantly
   3. No coding knowledge required!
   
   ============================================ */

:root {
  /* ============================================
     BRAND COLORS
     ============================================
     These define your clinic's visual identity.
     Use your brand's hex color codes (e.g., #FF5733).
     
     Tip: Use a color picker tool like coolors.co
     to find the perfect palette.
     ============================================ */
  
  /* Primary: Your main brand color (buttons, links, accents) */
  --color-primary: #06B6D4;
  --color-primary-dark: #0891B2;
  --color-primary-light: #67E8F9;
  --color-primary-soft: rgba(6, 182, 212, 0.10);
  
  /* Secondary: Dark color for text and headers */
  --color-secondary: #0F172A;
  
  /* ============================================
     SEMANTIC COLORS
     ============================================
     These are used for status indicators.
     You usually don't need to change these.
     ============================================ */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  --color-accent: #8B5CF6;

  /* Text on a tinted badge or icon (darker than the colour above, to be readable) */
  --tone-success-text: #047857;
  --tone-warning-text: #B45309;
  --tone-error-text: #B91C1C;
  --tone-info-text: #1D4ED8;
  --tone-accent-text: #6D28D9;
  
  /* ============================================
     BACKGROUND COLORS
     ============================================ */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-dark: #0F172A;
  --bg-hero-overlay: rgba(15, 23, 42, 0.45);
  
  /* ============================================
     TEXT COLORS
     ============================================ */
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-on-dark: #FFFFFF;
  --text-on-primary: #FFFFFF;
  
  /* ============================================
     BORDER COLORS
     ============================================ */
  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-glass: rgba(255, 255, 255, 0.5);
  --bg-input: rgba(255, 255, 255, 0.85);
  
  /* ============================================
     TYPOGRAPHY
     ============================================
     Inter and Space Grotesk are served from this site (fonts.css).
     To use another font, add its files there first.
     ============================================ */
  --font-heading: 'Space Grotesk Variable', 'Space Grotesk', sans-serif;
  --font-body: 'Inter Variable', 'Inter', sans-serif;
  
  /* ============================================
     BORDER RADIUS
     ============================================
     Controls how rounded corners appear.
     0px = sharp corners, 9999px = fully rounded (pills)
     ============================================ */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* ============================================
     SHADOWS
     ============================================
     These create depth on cards and buttons.
     You usually don't need to change these.
     ============================================ */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.10);
  --shadow-glow: 0 0 60px rgba(6, 182, 212, 0.15);
  
  /* The clinic's name comes from the EMR through the API, not from this file. */
  
  /* ============================================
     SPACING
     ============================================ */
  --section-padding: 80px;
  --container-max: 1200px;
}

/* ============================================
   DARK THEME
   ============================================
   Used when the patient picks "Dark", or when their device is set to dark
   and they haven't picked "Light". Brand colours stay the same; change these
   only if your primary colour is hard to read on a dark background.
   ============================================ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-primary-soft: rgba(6, 182, 212, 0.16);
  --bg-page: #0B1120;
  --bg-surface: #111A2E;
  --bg-card: rgba(17, 26, 46, 0.85);
  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-light: #1E293B;
  --border-medium: #334155;
  --border-glass: rgba(148, 163, 184, 0.12);
  --bg-input: rgba(15, 23, 42, 0.7);
  --tone-success-text: #34D399;
  --tone-warning-text: #FBBF24;
  --tone-error-text: #F87171;
  --tone-info-text: #60A5FA;
  --tone-accent-text: #A78BFA;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-primary-soft: rgba(6, 182, 212, 0.16);
    --bg-page: #0B1120;
    --bg-surface: #111A2E;
    --bg-card: rgba(17, 26, 46, 0.85);
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-light: #1E293B;
    --border-medium: #334155;
    --border-glass: rgba(148, 163, 184, 0.12);
    --bg-input: rgba(15, 23, 42, 0.7);
    --tone-success-text: #34D399;
    --tone-warning-text: #FBBF24;
    --tone-error-text: #F87171;
    --tone-info-text: #60A5FA;
    --tone-accent-text: #A78BFA;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
  }
}

/* ============================================
   TAILWIND CSS VARIABLE BRIDGE
   ============================================
   These helper classes let Tailwind use your theme.
   Do not edit below this line unless you know CSS.
   ============================================ */

.bg-theme-primary { background-color: var(--color-primary); }
.bg-theme-primary-dark { background-color: var(--color-primary-dark); }
.bg-theme-surface { background-color: var(--bg-surface); }
.bg-theme-page { background-color: var(--bg-page); }
.bg-theme-dark { background-color: var(--bg-dark); }
.bg-theme-card { background-color: var(--bg-card); }
.bg-theme-success { background-color: var(--color-success); }
.bg-theme-error { background-color: var(--color-error); }
.bg-theme-warning { background-color: var(--color-warning); }

.text-theme-primary { color: var(--color-primary); }
.text-theme-secondary { color: var(--text-secondary); }
.text-theme-muted { color: var(--text-muted); }
.text-theme-dark { color: var(--text-primary); }
.text-theme-on-dark { color: var(--text-on-dark); }
.text-theme-on-primary { color: var(--text-on-primary); }

.border-theme-light { border-color: var(--border-light); }
.border-theme-primary { border-color: var(--color-primary); }

.font-theme-heading { font-family: var(--font-heading); }
.font-theme-body { font-family: var(--font-body); }

.rounded-theme-sm { border-radius: var(--radius-sm); }
.rounded-theme-md { border-radius: var(--radius-md); }
.rounded-theme-lg { border-radius: var(--radius-lg); }
.rounded-theme-xl { border-radius: var(--radius-xl); }
.rounded-theme-full { border-radius: var(--radius-full); }

.shadow-theme-sm { box-shadow: var(--shadow-sm); }
.shadow-theme-md { box-shadow: var(--shadow-md); }
.shadow-theme-lg { box-shadow: var(--shadow-lg); }

/* Hover states */
.hover\:bg-theme-primary-dark:hover { background-color: var(--color-primary-dark); }
.hover\:text-theme-primary:hover { color: var(--color-primary); }
.hover\:border-theme-primary:hover { border-color: var(--color-primary); }

/* Focus states */
.focus\:ring-theme-primary:focus { --tw-ring-color: var(--color-primary); }

/* Ring utilities for Tailwind arbitrary values */
.ring-theme-primary { --tw-ring-color: var(--color-primary); }

/* Gradient utilities */
.bg-gradient-theme-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}
.bg-gradient-theme-dark {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #020617 100%);
}

/* Glass morphism card style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
}

/* Glow effect for accent elements */
.glow-accent {
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

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

/* Animation keyframes */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}
.animate-slide-in-right {
  animation: slideInRight 0.4s ease forwards;
}
.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
