/* frontend/static/css/design-system.css */
/* 
   Bella Vie Health - Design System
   ReadyRx.com inspired clean healthcare interface
   Bella Vie Health brand colors from bellaviehealth.com
*/

/* ============================================================================
   COLOR SYSTEM - Bella Vie Health Brand Colors
   ============================================================================ */
:root {
    /* Primary Brand Colors */
    --color-primary: #B7A374;           /* Warm gold - Main brand */
    --color-primary-dark: #A58D55;      /* Darker gold for hover */
    --color-primary-light: #C9BA97;     /* Light gold for backgrounds */
    --color-primary-pale: #F3F1ED;      /* Very light gold for subtle bg */

    /* Accent Colors - Warm Gold for CTAs */
    --color-accent: #C9A961;            /* Warm gold - Call to action */
    --color-accent-dark: #B89545;       /* Darker gold for hover */
    --color-accent-light: #D4BC7D;      /* Light gold for highlights */
    --color-accent-pale: #FBF8F0;       /* Very light gold for subtle bg */
    
    /* Semantic Colors */
    --color-success: #10B981;           /* Green - Success states */
    --color-warning: #F59E0B;           /* Orange - Warnings */
    --color-error: #EF4444;             /* Red - Errors */
    --color-info: #3B82F6;              /* Blue - Info */
    
    /* Neutrals - ReadyRx inspired clean grays */
    --color-text-primary: #111827;      /* Almost black for body text */
    --color-text-secondary: #6B7280;    /* Gray for secondary text */
    --color-text-tertiary: #9CA3AF;     /* Light gray for meta text */
    --color-text-inverse: #FFFFFF;      /* White text on dark bg */
    
    --color-background: #f5f2f2;        /* Warm off-white background for contrast */
    --color-background-alt: #D0D2CD;    /*E6E1D8  Slightly darker warm gray for sections */
    --color-background-elevated: #FFFFFF; /* White for cards - creates contrast */
    
    --color-border: #E5E7EB;            /* Light gray borders */
    --color-border-focus: #837F73;      /* Taupe for focused elements */
    --color-divider: #F3F4F6;           /* Very light gray dividers */
    
    /* Shadows - Subtle, healthcare clean */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Typography - ReadyRx clean, professional */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
    
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    
    /* Spacing - 4px base unit (ReadyRx style) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    
    /* Border Radius - ReadyRx smooth corners */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;  /* Fully rounded */
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================================================
   BASE STYLES - ReadyRx inspired clean typography
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-background);
}

/* Typography Scale - ReadyRx clean headers */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-bold); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); font-weight: var(--font-weight-medium); }

p {
    margin-bottom: var(--space-4);
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Focus styles - HIPAA accessibility important */
*:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Selection - Bella Vie brand colors */
::selection {
    background-color: var(--color-primary-light);
    color: var(--color-text-inverse);
}

/* ============================================================================
   UTILITY CLASSES - ReadyRx style utilities
   ============================================================================ */

/* Text utilities */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-muted { color: var(--color-text-tertiary); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Spacing utilities */
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* ============================================================================
   LOADING & EMPTY STATES - ReadyRx clean
   ============================================================================ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    color: var(--color-text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-divider);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--space-4);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: var(--space-16);
    color: var(--color-text-secondary);
}

.empty-state .icon,
.empty-icon {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-4);
    opacity: 0.3;
}

.empty-state h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.empty-state p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    max-width: 400px;
    margin: 0 auto var(--space-4);
}

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

@media (max-width: 768px) {
    :root {
        --font-size-4xl: 1.875rem;
        --font-size-3xl: 1.5rem;
    }
    
    body {
        font-size: var(--font-size-sm);
    }
}

@media (min-width: 1440px) {
    :root {
        --font-size-base: 1.0625rem;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    body {
        color: #000;
        background: #fff;
    }
    
    .no-print {
        display: none !important;
    }
}