/**
 * Nutrietiqueta - Sistema de Variables CSS
 * Modernización Minimalista v1.1
 * 
 * Base para diseño consistente y mantenible
 * Compatible con todos los navegadores modernos (no IE11)
 */

:root {
    /* ========================================
       COLORES PRIMARIOS - Verde Salud
       ======================================== */
    --nutri-primary-50: #f0fdf4;
    --nutri-primary-100: #dcfce7;
    --nutri-primary-200: #bbf7d0;
    --nutri-primary-300: #86efac;
    --nutri-primary-400: #4ade80;
    --nutri-primary-500: #22c55e;
    --nutri-primary-600: #16a34a;
    --nutri-primary-700: #15803d;
    --nutri-primary-800: #166534;
    --nutri-primary-900: #14532d;
    
    /* Alias para uso común */
    --nutri-primary: var(--nutri-primary-500);
    --nutri-primary-hover: var(--nutri-primary-600);
    --nutri-primary-active: var(--nutri-primary-700);
    
    /* ========================================
       COLORES SECUNDARIOS - Azul Confianza
       ======================================== */
    --nutri-secondary-50: #eff6ff;
    --nutri-secondary-100: #dbeafe;
    --nutri-secondary-500: #3b82f6;
    --nutri-secondary-600: #2563eb;
    --nutri-secondary-700: #1d4ed8;
    
    --nutri-secondary: var(--nutri-secondary-500);
    --nutri-secondary-hover: var(--nutri-secondary-600);
    
    /* ========================================
       ESCALA DE GRISES - Premium
       ======================================== */
    --nutri-gray-50: #f9fafb;
    --nutri-gray-100: #f3f4f6;
    --nutri-gray-200: #e5e7eb;
    --nutri-gray-300: #d1d5db;
    --nutri-gray-400: #9ca3af;
    --nutri-gray-500: #6b7280;
    --nutri-gray-600: #4b5563;
    --nutri-gray-700: #374151;
    --nutri-gray-800: #1f2937;
    --nutri-gray-900: #111827;
    
    /* ========================================
       COLORES DE FEEDBACK
       ======================================== */
    --nutri-success: #10b981;
    --nutri-success-light: #d1fae5;
    --nutri-success-dark: #047857;
    
    --nutri-warning: #f59e0b;
    --nutri-warning-light: #fef3c7;
    --nutri-warning-dark: #d97706;
    
    --nutri-error: #ef4444;
    --nutri-error-light: #fee2e2;
    --nutri-error-dark: #dc2626;
    
    --nutri-info: #06b6d4;
    --nutri-info-light: #cffafe;
    --nutri-info-dark: #0891b2;
    
    /* ========================================
       SOMBRAS - Sistema de Elevación
       ======================================== */
    --nutri-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --nutri-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --nutri-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --nutri-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --nutri-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --nutri-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Sombras de color (para focus states) */
    --nutri-shadow-primary: 0 0 0 3px rgba(34, 197, 94, 0.1);
    --nutri-shadow-error: 0 0 0 3px rgba(239, 68, 68, 0.1);
    
    /* ========================================
       BORDES REDONDEADOS
       ======================================== */
    --nutri-radius-sm: 6px;
    --nutri-radius-md: 8px;
    --nutri-radius-lg: 12px;
    --nutri-radius-xl: 16px;
    --nutri-radius-2xl: 24px;
    --nutri-radius-full: 9999px;
    
    /* ========================================
       ESPACIADO - Sistema de 4px
       ======================================== */
    --nutri-spacing-xs: 4px;
    --nutri-spacing-sm: 8px;
    --nutri-spacing-md: 16px;
    --nutri-spacing-lg: 24px;
    --nutri-spacing-xl: 32px;
    --nutri-spacing-2xl: 48px;
    --nutri-spacing-3xl: 64px;
    
    /* ========================================
       TIPOGRAFÍA
       ======================================== */
    --nutri-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --nutri-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    
    /* Tamaños de fuente */
    --nutri-text-xs: 0.75rem;      /* 12px */
    --nutri-text-sm: 0.875rem;     /* 14px */
    --nutri-text-base: 1rem;       /* 16px */
    --nutri-text-lg: 1.125rem;     /* 18px */
    --nutri-text-xl: 1.25rem;      /* 20px */
    --nutri-text-2xl: 1.5rem;      /* 24px */
    
    /* Pesos de fuente */
    --nutri-font-normal: 400;
    --nutri-font-medium: 500;
    --nutri-font-semibold: 600;
    --nutri-font-bold: 700;
    
    /* ========================================
       TRANSICIONES - Timing Functions
       ======================================== */
    --nutri-transition-fast: 150ms;
    --nutri-transition-base: 200ms;
    --nutri-transition-slow: 300ms;
    --nutri-transition-slower: 500ms;
    
    --nutri-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --nutri-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --nutri-ease-in: cubic-bezier(0.4, 0, 1, 1);
    
    /* ========================================
       Z-INDEX - Capas de Stack
       ======================================== */
    --nutri-z-base: 1;
    --nutri-z-dropdown: 1000;
    --nutri-z-sticky: 1020;
    --nutri-z-fixed: 1030;
    --nutri-z-modal: 1040;
    --nutri-z-popover: 1050;
    --nutri-z-tooltip: 1060;
    --nutri-z-toast: 1070;
}

/* ========================================
   DARK MODE (Preparado para futuro)
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        /* Comentado por ahora - activar cuando se implemente dark mode
        --nutri-gray-50: #1f2937;
        --nutri-gray-100: #374151;
        --nutri-gray-900: #f9fafb;
        */
    }
}

/* ========================================
   UTILIDADES DE ACCESIBILIDAD
   ======================================== */
.nutri-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
