/* ==================================
   JINX OS — ORIGINAL CHAOS
================================== */

:root {
    --theme-accent: #ed51a5;
    --theme-accent-dark: #c83383;

    --theme-secondary: #357fe0;
    --theme-secondary-dark: #2458ad;

    --theme-soft: #b592e6;
    --theme-soft-light: #dac8eb;
    --theme-tint: #ede3fa;

    --theme-background: #fff0dc;
    --theme-paper: #fffaf4;

    --theme-dark: #201d2c;
    --theme-plum: #41304f;
    --theme-ink: #292237;

    --theme-checker-light: #41304f;
    --theme-checker-dark: #292237;

    --theme-success: #bde879;

    --theme-gradient: linear-gradient(
        115deg,
        #201d2c,
        #483051 48%,
        #263b65
    );

    --theme-toolbar: #d4c4ed;
}


/* ==================================
   TOXIC TROUBLE
================================== */

html[data-theme="toxic"] {
    --theme-accent: #bded63;
    --theme-accent-dark: #688c26;

    --theme-secondary: #9370db;
    --theme-secondary-dark: #6043a0;

    --theme-soft: #d5e9a9;
    --theme-soft-light: #e3edca;
    --theme-tint: #edf2dc;

    --theme-background: #f2f5df;
    --theme-paper: #fafbf1;

    --theme-dark: #23291e;
    --theme-plum: #333b29;
    --theme-ink: #2e3525;

    --theme-checker-light: #3d4731;
    --theme-checker-dark: #23291e;

    --theme-success: #b7f66a;

    --theme-gradient: linear-gradient(
        115deg,
        #23291e,
        #414d2c 48%,
        #40315d
    );

    --theme-toolbar: #dce8bc;
}


/* ==================================
   CHERRY BOMB
================================== */

html[data-theme="cherry"] {
    --theme-accent: #ef4c52;
    --theme-accent-dark: #bd3449;

    --theme-secondary: #f3a5ac;
    --theme-secondary-dark: #ac465d;

    --theme-soft: #ecac65;
    --theme-soft-light: #f6c9b0;
    --theme-tint: #ffe2e2;

    --theme-background: #fff0e4;
    --theme-paper: #fff8f3;

    --theme-dark: #351e2a;
    --theme-plum: #652c3b;
    --theme-ink: #422433;

    --theme-checker-light: #652c3b;
    --theme-checker-dark: #351e2a;

    --theme-success: #b3d77a;

    --theme-gradient: linear-gradient(
        115deg,
        #351e2a,
        #652c3b 48%,
        #a54c56
    );

    --theme-toolbar: #f3c2cb;
}


/* ==================================
   CONNECT OUR EXISTING COLOR VARIABLES
================================== */

html[data-theme]:not([data-theme="original"]) {
    --pink: var(--theme-accent);
    --hot-pink: var(--theme-accent-dark);

    --blue: var(--theme-secondary-dark);
    --electric: var(--theme-secondary);
    --electric-blue: var(--theme-secondary);
    --dark-blue: var(--theme-secondary-dark);

    --lavender: var(--theme-soft);
    --light-lavender: var(--theme-soft-light);

    --cream: var(--theme-background);
    --paper: var(--theme-paper);

    --berry: var(--theme-ink);
    --ink: var(--theme-ink);
    --line: var(--theme-dark);
    --dark: var(--theme-dark);
    --blackberry: var(--theme-dark);
    --plum: var(--theme-plum);

    --green: var(--theme-success);

    --checker-light: var(--theme-checker-light);
    --checker-dark: var(--theme-checker-dark);
}


/* ==================================
   SHARED THEME OVERRIDES
================================== */

html[data-theme]:not([data-theme="original"]) .hero::before {
    background: var(--theme-gradient);
}

html[data-theme]:not([data-theme="original"]) .browser-toolbar {
    background: var(--theme-toolbar);
}

html[data-theme]:not([data-theme="original"]) .panel,
html[data-theme]:not([data-theme="original"]) .address-bar {
    background: var(--theme-paper);
}

html[data-theme]:not([data-theme="original"]) .wallpaper-logo {
    color: var(--theme-soft);
    opacity: .12;
}

html[data-theme]:not([data-theme="original"]) .wallpaper-star {
    text-shadow: 0 0 12px var(--theme-accent);
}

html[data-theme]:not([data-theme="original"]) .star-two {
    color: var(--theme-secondary);
    text-shadow: 0 0 12px var(--theme-secondary);
}

html[data-theme]:not([data-theme="original"]) .window-body iframe {
    background: var(--theme-background) !important;
}


/* ==================================
   APPLICATION PAGE HEADERS
================================== */

html[data-theme]:not([data-theme="original"]) :is(
    .babyz-header,
    .petz-header,
    .about-header,
    .downloads-header,
    .tools-header,
    .archive-header,
    .links-header
) {
    background: var(--theme-gradient);
}


/* ==================================
   TEXT SELECTION & SCROLLBARS
================================== */

html[data-theme] ::selection {
    background: var(--theme-accent);
    color: var(--theme-dark);
}

html[data-theme] ::-moz-selection {
    background: var(--theme-accent);
    color: var(--theme-dark);
}

html[data-theme]:not([data-theme="original"]) * {
    scrollbar-color:
        var(--theme-accent-dark)
        var(--theme-tint);
}

html[data-theme]:not([data-theme="original"]) ::-webkit-scrollbar-track {
    background: var(--theme-tint);
}

html[data-theme]:not([data-theme="original"]) ::-webkit-scrollbar-thumb {
    background: var(--theme-accent-dark);
}


/* ==================================
   START MENU THEME PICKER
================================== */

.theme-picker {
    display: flex;
    align-items: center;
    gap: 7px;
}

.start-menu .theme-swatch {
    display: block;

    width: 24px;
    height: 24px;

    padding: 0;
    flex-shrink: 0;

    border: 1.5px solid var(--theme-dark);
    border-radius: 5px;

    background: conic-gradient(
        var(--swatch-a) 25%,
        var(--swatch-b) 0 50%,
        var(--swatch-c) 0 75%,
        var(--swatch-d) 0
    );

    box-shadow: 2px 2px 0 var(--theme-dark);

    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}


/* Original Chaos */

.original-swatch {
    --swatch-a: #ed51a5;
    --swatch-b: #357fe0;
    --swatch-c: #b592e6;
    --swatch-d: #41304f;
}


/* Toxic Trouble */

.toxic-swatch {
    --swatch-a: #bded63;
    --swatch-b: #9370db;
    --swatch-c: #d5e9a9;
    --swatch-d: #333b29;
}


/* Cherry Bomb */

.cherry-swatch {
    --swatch-a: #ef4c52;
    --swatch-b: #f3a5ac;
    --swatch-c: #ecac65;
    --swatch-d: #652c3b;
}


/* Hover */

.start-menu .theme-swatch:hover,
.start-menu .theme-swatch:focus-visible {
    transform: translateY(-2px);

    border-color: var(--theme-background);

    background: conic-gradient(
        var(--swatch-a) 25%,
        var(--swatch-b) 0 50%,
        var(--swatch-c) 0 75%,
        var(--swatch-d) 0
    );
}


/* Selected theme */

.start-menu .theme-swatch[aria-pressed="true"] {
    border-color: var(--theme-background);

    box-shadow:
        0 0 0 1px var(--theme-accent),
        2px 2px 0 var(--theme-dark);
}

.start-menu .theme-swatch:focus-visible {
    outline: 2px dashed var(--theme-background);
    outline-offset: 3px;
}