/* ============================================
   SC7 THEME VARIABLES
   Modern CSS Variables for Dark/Light Mode
   Version: 2.0
   ============================================ */

/* Default Theme (Dark Mode) */
:root {
    /* Background Colors */
    --shop-bg: #050507;
    --shop-surface: #101010;
    --shop-surface-2: #151514;
    --shop-surface-3: #1b1b19;

    /* Border Colors */
    --shop-border: #3d3a39;
    --shop-border-soft: rgba(61, 58, 57, .62);

    /* Brand Colors */
    --shop-green: #00d992;
    --shop-mint: #2fd6a1;

    /* Text Colors */
    --shop-text: #f2f2f2;
    --shop-muted: #b8b3b0;
    --shop-subtle: #8b949e;

    /* Status Colors */
    --shop-red: #fb565b;
    --shop-amber: #ffba00;
    --shop-blue: #0096ff;

    /* Typography */
    --shop-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --shop-mono: "IBM Plex Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Shadows */
    --shop-shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
    --shop-shadow-md: 0 4px 20px rgba(0, 0, 0, .5);
    --shop-shadow-lg: 0 20px 60px rgba(0, 0, 0, .6);

    /* Transitions */
    --shop-transition: 0.3s ease;
}

/* Light Mode - System Preference */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        /* Background Colors */
        --shop-bg: #f8f9fa;
        --shop-surface: #ffffff;
        --shop-surface-2: #f5f6f7;
        --shop-surface-3: #e9ecef;

        /* Border Colors */
        --shop-border: #dee2e6;
        --shop-border-soft: rgba(0, 0, 0, .08);

        /* Brand Colors */
        --shop-green: #00a86b;
        --shop-mint: #00b377;

        /* Text Colors */
        --shop-text: #212529;
        --shop-muted: #495057;
        --shop-subtle: #6c757d;

        /* Status Colors */
        --shop-red: #dc3545;
        --shop-amber: #fd7e14;
        --shop-blue: #0096ff;

        /* Shadows */
        --shop-shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
        --shop-shadow-md: 0 4px 20px rgba(0, 0, 0, .06);
        --shop-shadow-lg: 0 20px 60px rgba(0, 0, 0, .12);
    }
}

/* Light Mode - Manual Override */
[data-theme="light"] {
    /* Background Colors */
    --shop-bg: #f8f9fa;
    --shop-surface: #ffffff;
    --shop-surface-2: #f5f6f7;
    --shop-surface-3: #e9ecef;

    /* Border Colors */
    --shop-border: #dee2e6;
    --shop-border-soft: rgba(0, 0, 0, .08);

    /* Brand Colors */
    --shop-green: #00a86b;
    --shop-mint: #00b377;

    /* Text Colors */
    --shop-text: #212529;
    --shop-muted: #495057;
    --shop-subtle: #6c757d;

    /* Status Colors */
    --shop-red: #dc3545;
    --shop-amber: #fd7e14;
    --shop-blue: #0096ff;

    /* Shadows */
    --shop-shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
    --shop-shadow-md: 0 4px 20px rgba(0, 0, 0, .06);
    --shop-shadow-lg: 0 20px 60px rgba(0, 0, 0, .12);
}

/* Dark Mode - Manual Override */
[data-theme="dark"] {
    /* Background Colors */
    --shop-bg: #050507;
    --shop-surface: #101010;
    --shop-surface-2: #151514;
    --shop-surface-3: #1b1b19;

    /* Border Colors */
    --shop-border: #3d3a39;
    --shop-border-soft: rgba(61, 58, 57, .62);

    /* Brand Colors */
    --shop-green: #00d992;
    --shop-mint: #2fd6a1;

    /* Text Colors */
    --shop-text: #f2f2f2;
    --shop-muted: #b8b3b0;
    --shop-subtle: #8b949e;

    /* Status Colors */
    --shop-red: #fb565b;
    --shop-amber: #ffba00;
    --shop-blue: #0096ff;

    /* Shadows */
    --shop-shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
    --shop-shadow-md: 0 4px 20px rgba(0, 0, 0, .5);
    --shop-shadow-lg: 0 20px 60px rgba(0, 0, 0, .6);
}

/* Light Mode Specific Styles */
[data-theme="light"] body.sc7-commercial,
:root:not([data-theme="dark"]) body.sc7-commercial {
    background-color: var(--shop-bg);
    background-image:
        radial-gradient(circle at 12% 0, rgba(0, 168, 107, .06), transparent 320px),
        radial-gradient(circle at 88% 18%, rgba(0, 179, 119, .04), transparent 420px),
        radial-gradient(circle at 50% 48%, rgba(0, 168, 107, .02), transparent 520px),
        linear-gradient(180deg, rgba(248, 249, 250, .98) 0%, rgba(248, 249, 250, 1) 42%, rgba(245, 246, 247, 1) 100%);
    background-attachment: fixed;
    color: var(--shop-text);
}

[data-theme="light"] body.sc7-commercial::before,
:root:not([data-theme="dark"]) body.sc7-commercial::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: .04;
    pointer-events: none;
    background-image: radial-gradient(rgba(33, 37, 41, .15) 1px, transparent 1px);
    background-size: 34px 34px;
}

/* Dark Mode Specific Styles */
[data-theme="dark"] body.sc7-commercial,
body.sc7-commercial {
    background-color: var(--shop-bg);
    background-image:
        radial-gradient(circle at 12% 0, rgba(0, 217, 146, .08), transparent 320px),
        radial-gradient(circle at 88% 18%, rgba(0, 230, 160, .06), transparent 420px);
    background-attachment: fixed;
    color: var(--shop-text);
}

/* Smooth Transitions */
html,
body,
body * {
    transition: background-color var(--shop-transition),
                border-color var(--shop-transition),
                color var(--shop-transition),
                box-shadow var(--shop-transition);
}

/* Disable transitions on theme change to prevent flash */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: none !important;
}
