/* ===================================
   BASE CSS - DESIGN SYSTEM & RESET
   =================================== */

/* CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-base);
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

p {
    margin: 0;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Forms */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Disabled Input Styles */
input:disabled,
input[disabled],
textarea:disabled,
textarea[disabled],
select:disabled,
select[disabled] {
    background-color: #f2f2f2;
    color: var(--color-text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}

input:disabled::placeholder,
input[disabled]::placeholder,
textarea:disabled::placeholder,
textarea[disabled]::placeholder {
    color: var(--color-text-tertiary);
}

/* ===================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   =================================== */

:root {
    /* ===== COLORS ===== */
    /* Primary Colors */
    --color-primary: #EE0033;
    --color-primary-hover: #d30029;
    --color-primary-active: #b80024;
    --color-primary-light: rgba(238, 0, 51, 0.1);
    --color-primary-lighter: rgba(238, 0, 51, 0.05);
    
    /* Secondary Colors */
    --color-secondary: #121214;
    --color-secondary-light: #1d1d20;
    
    /* Background Colors */
    --color-background: #FFFFFF;
    --color-background-secondary: #F8F9FA;
    --color-background-tertiary: #F7F7F8;
    --color-background-hover: #F8F9FA;
    --color-background-active: #F3F4F6;
    --color-background-light: #F7F7F8;
    --color-background-lighter: #F9FAFB;
    
    /* Border Colors */
    --color-border: #CFCFD3;
    --color-border-light: #CFCFD3;
    --color-border-hover: #EE0033;
    --color-border-focus: #EE0033;
    --color-border-dark: #121214;
    
    /* Text Colors */
    --color-text: #121214;
    --color-text-secondary: #6B7280;
    --color-text-tertiary: #9CA3AF;
    --color-text-disabled: #D1D5DB;
    
    /* Status Colors */
    --color-success: #10B981;
    --color-success-light: rgba(16, 185, 129, 0.1);
    --color-warning: #F59E0B;
    --color-warning-light: rgba(245, 158, 11, 0.1);
    --color-error: #DC2626;
    --color-error-light: rgba(220, 38, 38, 0.1);
    --color-info: #3B82F6;
    --color-info-light: rgba(59, 130, 246, 0.1);
    
    /* ===== TYPOGRAPHY ===== */
    --font-family-base: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Font Sizes */
    --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: 2rem;       /* 32px */
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    
    /* ===== SPACING ===== */
    /* Base spacing unit: 4px */
    --spacing-0: 0;
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-xs-md: 0.75rem; /* 12px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */
    --spacing-4xl: 6rem;     /* 96px */
    
    /* ===== SIZES ===== */
    /* Component Heights */
    --height-xs: 24px;
    --height-sm: 32px;
    --height-md: 40px;
    --height-lg: 48px;
    --height-xl: 56px;
    
    /* Component Widths */
    --width-xs: 24px;
    --width-sm: 32px;
    --width-md: 40px;
    --width-lg: 48px;
    --width-xl: 56px;
    
    /* ===== BORDER RADIUS ===== */
    --radius-none: 0;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-3xl: 24px;
    --radius-full: 9999px;
    
    /* ===== SHADOWS ===== */
    --shadow-none: none;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* ===== TRANSITIONS ===== */
    --transition-none: none;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-slower: 0.5s ease;
    
    /* ===== Z-INDEX ===== */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
    
    /* ===== BREAKPOINTS ===== */
    --breakpoint-sm: 480px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1360px;
    --breakpoint-2xl: 1536px;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Visually hidden but accessible */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus visible */
.focus-visible {
    outline: 1px solid var(--color-primary);
    outline-offset: 1px;
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --color-text-secondary: #000000;
        --color-background-secondary: #FFFFFF;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode variables can be added here in the future */
}

/* ===================================
   CONFIRM DIALOG STYLES
   =================================== */

/* Confirm dialog title */
.confirm-dialog__title {
    font-size: 20px !important;
    font-family: var(--font-family-base) !important;
    font-weight: var(--font-weight-semibold) !important;
    line-height: var(--line-height-tight) !important;
    color: var(--color-text) !important;
}

/* Confirm dialog message */
.confirm-dialog__message {
    font-size: 16px !important;
    font-family: var(--font-family-base) !important;
    font-weight: var(--font-weight-normal) !important;
    line-height: var(--line-height-normal) !important;
    color: var(--color-text-secondary) !important;
}

/* Ensure consistency across all viewports */
@media (min-width: 1025px) {
    .confirm-dialog__title {
        font-size: 20px !important;
    }
    
    .confirm-dialog__message {
        font-size: 16px !important;
    }
}

@media (max-width: 1024px) {
    .confirm-dialog__title {
        font-size: 20px !important;
    }
    
    .confirm-dialog__message {
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    .confirm-dialog__title {
        font-size: 20px !important;
    }
    
    .confirm-dialog__message {
        font-size: 16px !important;
    }
}

