/**
 * Web Agenda - Sistema de Variables CSS
 * Version: 2.0
 * Ultima actualizacion: 2025-01-27
 *
 * Este archivo centraliza todas las variables CSS del sistema.
 * Modificar estos valores afectara toda la aplicacion.
 */

:root {
    /* ========================================
       COLORES PRINCIPALES
       ======================================== */

    /* Colores de marca Motion Center */
    --agenda-red: #e10600;
    --agenda-red-light: #ff3333;
    --agenda-red-dark: #c00500;
    --agenda-dark: #1a1a1a;
    --agenda-dark-light: #2d2d2d;
    --agenda-gray: #f8f9fa;

    /* Colores de estado */
    --color-success: #28a745;
    --color-success-light: #10b981;
    --color-danger: #dc3545;
    --color-danger-light: #ef4444;
    --color-warning: #ffc107;
    --color-warning-light: #f59e0b;
    --color-info: #17a2b8;
    --color-info-light: #3b82f6;

    /* Escala de grises */
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Colores de fondo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a1a1a;

    /* Colores de texto */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --text-inverse: #ffffff;

    /* ========================================
       ESPACIADO
       ======================================== */

    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */

    /* ========================================
       TIPOGRAFIA
       ======================================== */

    --font-family-base: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --font-family-mono: '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-light: 300;
    --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.75;

    /* ========================================
       SOMBRAS
       ======================================== */

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.25);
    --shadow-agenda: 0 4px 12px rgba(225, 6, 0, 0.3);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);

    /* ========================================
       BORDES Y RADIOS
       ======================================== */

    --border-width: 1px;
    --border-width-thick: 2px;
    --border-width-thicker: 3px;
    --border-color: var(--gray-300);
    --border-color-light: var(--gray-200);

    --radius-none: 0;
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.375rem;  /* 6px */
    --radius-lg: 0.5rem;    /* 8px */
    --radius-xl: 0.75rem;   /* 12px */
    --radius-2xl: 1rem;     /* 16px */
    --radius-full: 9999px;  /* circulo */

    /* ========================================
       TRANSICIONES Y ANIMACIONES
       ======================================== */

    --transition-fast: 0.15s;
    --transition-base: 0.3s;
    --transition-slow: 0.5s;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-easing-in: cubic-bezier(0.4, 0, 1, 1);
    --transition-easing-out: cubic-bezier(0, 0, 0.2, 1);
    --transition: all var(--transition-base) var(--transition-easing);

    /* ========================================
       LAYOUT Y DIMENSIONES
       ======================================== */

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --navbar-height: 60px;
    --content-max-width: 1400px;
    --footer-height: 60px;

    /* ========================================
       Z-INDEX
       ======================================== */

    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-notification: 1080;

    /* ========================================
       COMPONENTES ESPECIFICOS
       ======================================== */

    /* Botones */
    --btn-padding-y: 0.5rem;
    --btn-padding-x: 1.5rem;
    --btn-font-size: 1rem;
    --btn-border-radius: var(--radius-md);

    /* Cards */
    --card-padding: 1.5rem;
    --card-border-radius: var(--radius-xl);
    --card-border-width: var(--border-width);
    --card-border-color: var(--border-color-light);

    /* Inputs */
    --input-padding-y: 0.5rem;
    --input-padding-x: 1rem;
    --input-border-radius: var(--radius-md);
    --input-border-width: var(--border-width);
    --input-border-color: var(--border-color);

    /* Tables */
    --table-cell-padding: 0.75rem;
    --table-border-color: var(--gray-200);

    /* ========================================
       BREAKPOINTS (para referencia en JS)
       ======================================== */

    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

/* ========================================
   TEMA OSCURO
   ======================================== */

[data-bs-theme="dark"] {
    /* Colores ajustados para tema oscuro */
    --agenda-gray: #0d1117;
    --gray-50: #0d1117;
    --gray-100: #161b22;
    --gray-200: #21262d;
    --gray-300: #30363d;
    --gray-400: #484f58;
    --gray-500: #6e7681;
    --gray-600: #8b949e;
    --gray-700: #b1bac4;
    --gray-800: #c9d1d9;
    --gray-900: #f0f6fc;

    /* Fondos oscuros */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-dark: #000000;

    /* Texto invertido */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --text-inverse: #0d1117;

    /* Bordes */
    --border-color: var(--gray-300);
    --border-color-light: var(--gray-200);

    /* Sombras mas intensas */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.8);

    /* Cards oscuras */
    --card-border-color: var(--gray-300);
}

/* ========================================
   UTILIDADES GLOBALES
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* Suavizar transiciones globalmente */
a, button, input, select, textarea {
    transition: var(--transition);
}

/* Focus visible mejorado */
:focus-visible {
    outline: 2px solid var(--agenda-red);
    outline-offset: 2px;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--gray-100);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-400);
}

/* Seleccion de texto */
::selection {
    background: var(--agenda-red);
    color: white;
}

::-moz-selection {
    background: var(--agenda-red);
    color: white;
}
