/* Design System CSS Custom Properties */

:root {
    /* === TYPOGRAPHY SYSTEM === */
    /* Font families */
    --font-family-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    --font-family-serif: 'DM Serif Text', Georgia, Cambria, 'Times New Roman', Times, 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: 2.25rem; /* 36px */

    /* Font weights optimized for Space Grotesk */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Line heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Letter spacing optimized for Space Grotesk */
    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: -0.003em;
    --letter-spacing-wide: 0.005em;

    /* === SPACING SYSTEM === */
    --space-xs: 0.25rem; /* 4px */
    --space-sm: 0.5rem; /* 8px */
    --space-md: 0.75rem; /* 12px */
    --space-lg: 1rem; /* 16px */
    --space-xl: 1.5rem; /* 24px */
    --space-2xl: 2rem; /* 32px */
    --space-3xl: 3rem; /* 48px */
    --space-4xl: 4rem; /* 64px */

    /* === BORDER RADIUS SYSTEM === */
    --radius-xs: 0.125rem; /* 2px */
    --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;
    /* === SHADOW SYSTEM === */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    /* === TRANSITION SYSTEM === */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-slower: 0.6s ease;
    --transition-all: all var(--transition-normal);
    --transition-colors: color var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
    --transition-transform: transform var(--transition-normal);
    --transition-opacity: opacity var(--transition-normal);
    /* === Z-INDEX SYSTEM === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    /* === COMPONENT SIZING === */
    --component-height-sm: 2rem;
    --component-height-md: 2.5rem;
    --component-height-lg: 3rem;
    --component-height-xl: 3.5rem;
    --component-padding-sm: var(--space-sm) var(--space-md);
    --component-padding-md: var(--space-md) var(--space-lg);
    --component-padding-lg: var(--space-lg) var(--space-xl);
    --component-padding-xl: var(--space-xl) var(--space-2xl);
    /* === ANIMATION TIMING === */
    --animation-duration-fast: 150ms;
    --animation-duration-normal: 300ms;
    --animation-duration-slow: 500ms;
    --animation-duration-slower: 1000ms;
    /* === BREAKPOINTS (for JS) === */
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-2xl: 1400px;
    /* === FORM COMPONENT VARIABLES === */
    --form-input-height: var(--component-height-md);
    --form-input-padding: var(--component-padding-md);
    --form-input-border-radius: var(--radius-md);
    --form-input-focus-ring: 0 0 0 0.2rem rgba(var(--tblr-primary-rgb), 0.25);
    /* === BUTTON COMPONENT VARIABLES === */
    --button-height-sm: var(--component-height-sm);
    --button-height-md: var(--component-height-md);
    --button-height-lg: var(--component-height-lg);
    --button-padding-sm: var(--component-padding-sm);
    --button-padding-md: var(--component-padding-md);
    --button-padding-lg: var(--component-padding-lg);
    --button-border-radius: var(--radius-md);
    /* === CARD COMPONENT VARIABLES === */
    --card-padding: var(--space-xl);
    --card-border-radius: var(--radius-lg);
    --card-shadow: var(--shadow-sm);
    --card-shadow-hover: var(--shadow-lg);
    /* === PROGRESS COMPONENT VARIABLES === */
    --progress-height: 0.5rem;
    --progress-border-radius: var(--radius-full);
    --progress-animation-duration: var(--animation-duration-slow);
    /* === LOADING COMPONENT VARIABLES === */
    --loading-spinner-size-sm: 1rem;
    --loading-spinner-size-md: 1.5rem;
    --loading-spinner-size-lg: 2rem;
    --loading-spinner-border-width: 0.125rem;
    /* === VALIDATION COMPONENT VARIABLES === */
    --validation-message-padding: var(--space-md) var(--space-lg);
    --validation-message-border-radius: var(--radius-md);
    --validation-message-font-size: var(--font-size-sm);
}

/* === GLOBAL PAGE TITLE STYLING === */
.page-title {
    font-size: 1.5rem !important;
    font-family: var(--font-family-primary) !important;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-normal);
}

    .page-title:hover {
        text-decoration: none;
    }

/* === GLOBAL FONT APPLICATION === */
body {
    font-family: var(--font-family-primary) !important;
    font-weight: var(--font-weight-normal);
    letter-spacing: var(--letter-spacing-normal);
}

/* === DARK THEME OVERRIDES === */
[data-bs-theme="dark"] {
    --shadow-xs: 0 1px 2px rgba(255, 255, 255, 0.02);
    --shadow-sm: 0 1px 3px rgba(255, 255, 255, 0.05), 0 1px 2px rgba(255, 255, 255, 0.03);
    --shadow-md: 0 4px 6px rgba(255, 255, 255, 0.035), 0 2px 4px rgba(255, 255, 255, 0.03);
    --shadow-lg: 0 10px 15px rgba(255, 255, 255, 0.05), 0 4px 6px rgba(255, 255, 255, 0.025);
    --shadow-xl: 0 20px 25px rgba(255, 255, 255, 0.05), 0 10px 10px rgba(255, 255, 255, 0.02);
    --shadow-2xl: 0 25px 50px rgba(255, 255, 255, 0.125);
}

/* === PAYMENT METHOD COMPONENTS === */
.payment-method-item {
    transition: var(--transition-all);
    cursor: default;
}

    .payment-method-item:hover {
        background: var(--tblr-bg-surface-tertiary) !important;
    }

.payment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 32px;
}

.card-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: var(--font-family-primary) !important;
}

.visa-icon {
    background: linear-gradient(135deg, #1a1f71 0%, #0f4c75 100%);
    color: white !important;
}

    .visa-icon span {
        color: white !important;
    }

.mastercard-icon {
    background: linear-gradient(135deg, #eb001b 0%, #f79e1b 100%);
    color: white !important;
}

    .mastercard-icon span {
        color: white !important;
    }

.amex-icon {
    background: linear-gradient(135deg, #006fcf 0%, #00a2e5 100%);
    color: white !important;
}

    .amex-icon span {
        color: white !important;
    }

.generic-icon {
    background: var(--tblr-bg-surface-secondary);
    border: 1px solid var(--tblr-border-color);
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

/* === UTILITY CLASSES === */
.cursor-pointer {
    cursor: pointer;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--tblr-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-colors);
    font-family: var(--font-family-primary) !important;
}

    .btn-ghost:hover {
        background: var(--tblr-bg-surface-secondary);
        color: var(--tblr-body-color);
    }

/* === LEGEND AND PROGRESS BAR COLORS === */

/* Legend colors for dashboard */
.legend-perfect {
    background-color: var(--tblr-success, #28a745) !important;
}

.legend-high {
    background-color: var(--tblr-blue, #007bff) !important;
}

.legend-medium {
    background-color: var(--tblr-warning, #ffc107) !important;
}

.legend-low {
    background-color: var(--tblr-danger, #dc3545) !important;
}

/* Progress bar colors for sources */
.progress-bar-sessionize {
    background-color: var(--tblr-blue, #007bff) !important;
}

.progress-bar-papercall {
    background-color: var(--tblr-green, #28a745) !important;
}

.progress-bar-devevents {
    background-color: var(--tblr-purple, #8e44ad) !important;
}

.progress-bar-manual {
    background-color: var(--tblr-yellow, #ffc107) !important;
}

.progress-bar-other {
    background-color: var(--tblr-orange, #fd7e14) !important;
}
