/* Theme Variables - Light/Dark Theme System */
:root {
    /* Light theme (default) - Based on current design */
    --mb-color-primary: #0d3ecc;
    --mb-color-primary-hover: #0a32b8;
    --mb-color-primary-rgb: 13, 62, 204;

    /* Background colors */
    --mb-color-background: #ffffff;
    --mb-color-surface: #ffffff;
    --mb-color-surface-secondary: #f8f9fa;
    --mb-color-surface-elevated: #ffffff;

    /* Text colors */
    --mb-color-text-primary: #1c1b1f;
    --mb-color-text-secondary: #1c1b1fcc;
    --mb-color-text-muted: #6a707b;
    --mb-color-text-on-primary: #ffffff;

    /* Border and divider colors */
    --mb-color-border: #e5e6e8;
    --mb-color-border-input: #b9bbc1;
    --mb-color-border-focus: #0d3ecc;
    --mb-color-divider: #d7d8df;

    /* Input colors */
    --mb-color-input-background: #ffffff;
    --mb-color-input-text: #141519;
    --mb-color-input-placeholder: #6a707b;

    /* Button colors */
    --mb-color-button-primary-bg: #0d3ecc;
    --mb-color-button-primary-text: #ffffff;
    --mb-color-button-primary-hover: #0a32b8;
    --mb-color-button-secondary-bg: #ffffff;
    --mb-color-button-secondary-text: #666666;
    --mb-color-button-secondary-border: #f9f9f9;

    /* Social button colors */
    --mb-color-social-bg: #ffffff;
    --mb-color-social-border: #e5e6e8;
    --mb-color-social-hover: rgba(230, 230, 230, 0.5);

    /* Alert and status colors */
    --mb-color-error: #e60000;
    --mb-color-error-bg: #fff5f5;
    --mb-color-error-border: #ff0000;
    --mb-color-success: #16a085;
    --mb-color-warning: #f39c12;
    --mb-color-info: #3498db;

    /* Shadow colors */
    --mb-shadow-light: rgba(0, 0, 0, 0.1);
    --mb-shadow-medium: rgba(0, 0, 0, 0.14);
    --mb-shadow-card: 0px 6px 10px 4px #00000014;
    --mb-shadow-focus: 0px 0px 0px 3px #0d3ecc33;
    --mb-shadow-error: 0px 0px 0px 3px #e6000033;

    /* Locale dropdown */
    --mb-color-locale-bg: #ffffff;
    --mb-color-locale-text: #141519;
    --mb-color-locale-hover: #f8f9fa;
    --mb-color-locale-border: #d7d8df;

    /* Benefit icons */
    --mb-color-benefit-icon-bg: #ffffff;
    --mb-color-benefit-icon: inherit;

    /* SVG Icons */
    --mb-color-icon-primary: inherit;
    --mb-color-icon-apple-social: inherit;
    --mb-color-background-svg: transparent;
}

/* Dark theme */
[data-theme="dark"] {
    /* Primary colors */
    --mb-color-primary: #7A95E3;
    --mb-color-primary-hover: #339af0;
    --mb-color-primary-rgb: 77, 171, 247;

    /* Background colors */
    --mb-color-background: #282A32;
    --mb-color-surface: #1C1B1F;
    --mb-color-surface-secondary: #2d2d2d;
    --mb-color-surface-elevated: #2d2d2d;

    /* Text colors */
    --mb-color-text-primary: #ffffff;
    --mb-color-text-secondary: #e0e0e0;
    --mb-color-text-muted: #a0a0a0;
    --mb-color-text-on-primary: #000000;

    /* Border and divider colors */
    --mb-color-border: #404040;
    --mb-color-border-input: #555555;
    --mb-color-border-focus: #4dabf7;
    --mb-color-divider: #404040;

    /* Input colors */
    --mb-color-input-background: #2d2d2d;
    --mb-color-input-text: #ffffff;
    --mb-color-input-placeholder: #a0a0a0;

    /* Button colors */
    --mb-color-button-primary-bg: #7A95E3;
    --mb-color-button-primary-text: #000000;
    --mb-color-button-primary-hover: #7A95E3;
    --mb-color-button-secondary-bg: #2d2d2d;
    --mb-color-button-secondary-text: #7A95E3;
    --mb-color-button-secondary-border: #9EB2EB;

    /* Social button colors */
    --mb-color-social-bg: #2d2d2d;
    --mb-color-social-border: #555555;
    --mb-color-social-hover: rgba(255, 255, 255, 0.1);

    /* Alert and status colors */
    --mb-color-error: #ff6b6b;
    --mb-color-error-bg: #3d1f1f;
    --mb-color-error-border: #ff6b6b;
    --mb-color-success: #51cf66;
    --mb-color-warning: #ffd43b;
    --mb-color-info: #74c0fc;

    /* Shadow colors */
    --mb-shadow-light: rgba(0, 0, 0, 0.3);
    --mb-shadow-medium: rgba(0, 0, 0, 0.4);
    --mb-shadow-card: 0px 6px 10px 4px rgba(0, 0, 0, 0.3);
    --mb-shadow-focus: 0px 0px 0px 3px rgba(77, 171, 247, 0.3);
    --mb-shadow-error: 0px 0px 0px 3px rgba(255, 107, 107, 0.3);

    /* Locale dropdown */
    --mb-color-locale-bg: #1C1B1F;
    --mb-color-locale-text: #ffffff;
    --mb-color-locale-hover: #404040;
    --mb-color-locale-border: #555555;

    /* Benefit icons */
    --mb-color-benefit-icon-bg: #414451;
    --mb-color-benefit-icon: #ffffff;

    /* SVG Icons */
    --mb-color-icon-primary: #ffffff;
    --mb-color-icon-apple-social: #FFFFFFB2;
    --mb-color-background-svg: #1C1B1F;
}

/* Smooth transitions for theme switching */
*,
*::before,
*::after {
    transition: background-color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
        color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --mb-color-border: #000000;
        --mb-color-text-primary: #000000;
    }

    [data-theme="dark"] {
        --mb-color-border: #ffffff;
        --mb-color-text-primary: #ffffff;
    }
}
