/* ==========================================================================
   Color themes (Admin > Site Config > Color theme).
   fragments/head sets <html data-palette="..."> before first paint and loads this file only for a
   non-default palette; violet is the built-in look of moon.css / moon-chrome.css.
   The palettes re-point the --moon-* variables, so every button, link, glow and gradient follows.
   html[data-palette] beats the plain :root blocks; seasonal.css (loaded after this file, same
   specificity) wins while a season is active.
   ========================================================================== */

html[data-palette="blue"] {
    --moon-accent-rgb: 0, 112, 243;
    --moon-accent-hi: #8ec5ff;
    --moon-accent-soft: #4da3ff;
    --moon-accent-lo: #0058c4;
    --moon-accent-ink: #020a16;
    --moon-blue: #0070f3;
    --moon-blue-hi: #4da3ff;
    --moon-deep-rgb: 0, 52, 120;
    --moon-grad: linear-gradient(180deg, #1f86ff 0%, #0070f3 55%, #0063db 100%);
    --moon-text-grad: linear-gradient(90deg, #0070f3 0%, #3291ff 32%, #9ccbff 50%, #3291ff 68%, #0070f3 100%);
    --moon-bg: #05070a;
    --moon-bg-rgb: 5, 7, 10;
    --moon-bg-2: #090c11;
    --moon-panel-rgb: 13, 17, 23;
    --moon-panel-solid: #0d1117;
    --moon-text: #edeff2;
    --moon-dim: #9ba1a6;
    --moon-mute: #6e7681;
    --moon-info: #7cc4ff;
    --moon-info-rgb: 124, 196, 255;
    --palette-logo-hue: -55deg;
}

html[data-palette="red"] {
    --moon-accent-rgb: 239, 35, 60;
    --moon-accent-hi: #ffc2c9;
    --moon-accent-soft: #ff5a6e;
    --moon-accent-lo: #b3122a;
    --moon-accent-ink: #1a0306;
    --moon-blue: #ef233c;
    --moon-blue-hi: #ff5a6e;
    --moon-deep-rgb: 110, 10, 24;
    --moon-grad: linear-gradient(180deg, #ff4057 0%, #e11d35 55%, #b3122a 100%);
    --moon-text-grad: linear-gradient(90deg, #e11d35 0%, #ff5a6e 32%, #ffd6db 50%, #ff5a6e 68%, #e11d35 100%);
    --moon-bg: #0b0708;
    --moon-bg-rgb: 11, 7, 8;
    --moon-bg-2: #120a0c;
    --moon-panel-rgb: 22, 15, 17;
    --moon-panel-solid: #160f11;
    --moon-text: #f3eded;
    --moon-dim: #aea0a3;
    --moon-mute: #7d6f72;
    --moon-info: #ff9aa6;
    --moon-info-rgb: 255, 154, 166;
    --palette-logo-hue: 95deg;
}

html[data-palette="pink"] {
    --moon-accent-rgb: 236, 72, 153;
    --moon-accent-hi: #fbcfe8;
    --moon-accent-soft: #f472b6;
    --moon-accent-lo: #be185d;
    --moon-accent-ink: #1c0612;
    --moon-blue: #ec4899;
    --moon-blue-hi: #f472b6;
    --moon-deep-rgb: 110, 20, 70;
    --moon-grad: linear-gradient(180deg, #f45ca8 0%, #ec4899 55%, #c81e72 100%);
    --moon-text-grad: linear-gradient(90deg, #ec4899 0%, #f472b6 32%, #fde2f1 50%, #f472b6 68%, #ec4899 100%);
    --moon-bg: #0b070a;
    --moon-bg-rgb: 11, 7, 10;
    --moon-bg-2: #12090f;
    --moon-panel-rgb: 22, 14, 19;
    --moon-panel-solid: #160e13;
    --moon-text: #f3edf1;
    --moon-dim: #ad9fa8;
    --moon-mute: #7c6e77;
    --moon-info: #f9a8d4;
    --moon-info-rgb: 249, 168, 212;
    --palette-logo-hue: 65deg;
}

html[data-palette="orange"] {
    --moon-accent-rgb: 249, 115, 22;
    --moon-accent-hi: #fed7aa;
    --moon-accent-soft: #fb923c;
    --moon-accent-lo: #c2410c;
    --moon-accent-ink: #1a0900;
    --moon-blue: #f97316;
    --moon-blue-hi: #fb923c;
    --moon-deep-rgb: 110, 45, 8;
    --moon-grad: linear-gradient(180deg, #ff8a3d 0%, #f26b0f 55%, #c2410c 100%);
    --moon-text-grad: linear-gradient(90deg, #f26b0f 0%, #fb923c 32%, #ffe4c7 50%, #fb923c 68%, #f26b0f 100%);
    --moon-bg: #0b0806;
    --moon-bg-rgb: 11, 8, 6;
    --moon-bg-2: #120d09;
    --moon-panel-rgb: 22, 17, 13;
    --moon-panel-solid: #16110d;
    --moon-text: #f3efeb;
    --moon-dim: #ada39b;
    --moon-mute: #7c726b;
    --moon-info: #fdba74;
    --moon-info-rgb: 253, 186, 116;
    --palette-logo-hue: 125deg;
}

html[data-palette="yellow"] {
    --moon-accent-rgb: 234, 179, 8;
    --moon-accent-hi: #fef3c7;
    --moon-accent-soft: #facc15;
    --moon-accent-lo: #a16207;
    --moon-accent-ink: #1a1102;
    --moon-blue: #eab308;
    --moon-blue-hi: #facc15;
    --moon-deep-rgb: 95, 65, 5;
    --moon-grad: linear-gradient(180deg, #f2b821 0%, #d99a06 55%, #b07a04 100%);
    --moon-text-grad: linear-gradient(90deg, #d99a06 0%, #facc15 32%, #fff7d1 50%, #facc15 68%, #d99a06 100%);
    --moon-bg: #0a0906;
    --moon-bg-rgb: 10, 9, 6;
    --moon-bg-2: #110f09;
    --moon-panel-rgb: 21, 19, 13;
    --moon-panel-solid: #15130d;
    --moon-text: #f3f1ea;
    --moon-dim: #aca697;
    --moon-mute: #7b7568;
    --moon-info: #fde047;
    --moon-info-rgb: 253, 224, 71;
    --palette-logo-hue: 145deg;
}

html[data-palette="green"] {
    --moon-accent-rgb: 34, 197, 94;
    --moon-accent-hi: #bbf7d0;
    --moon-accent-soft: #4ade80;
    --moon-accent-lo: #15803d;
    --moon-accent-ink: #03140a;
    --moon-blue: #22c55e;
    --moon-blue-hi: #4ade80;
    --moon-deep-rgb: 10, 80, 40;
    --moon-grad: linear-gradient(180deg, #34d872 0%, #1fb455 55%, #15803d 100%);
    --moon-text-grad: linear-gradient(90deg, #1fb455 0%, #4ade80 32%, #d6fbe4 50%, #4ade80 68%, #1fb455 100%);
    --moon-bg: #060a07;
    --moon-bg-rgb: 6, 10, 7;
    --moon-bg-2: #09110b;
    --moon-panel-rgb: 13, 21, 16;
    --moon-panel-solid: #0d1510;
    --moon-text: #edf3ef;
    --moon-dim: #9ea9a1;
    --moon-mute: #6d7870;
    --moon-info: #86efac;
    --moon-info-rgb: 134, 239, 172;
    --palette-logo-hue: -120deg;
}

html[data-palette="teal"] {
    --moon-accent-rgb: 20, 184, 166;
    --moon-accent-hi: #99f6e4;
    --moon-accent-soft: #2dd4bf;
    --moon-accent-lo: #0f766e;
    --moon-accent-ink: #02130f;
    --moon-blue: #14b8a6;
    --moon-blue-hi: #2dd4bf;
    --moon-deep-rgb: 8, 75, 70;
    --moon-grad: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 55%, #0f766e 100%);
    --moon-text-grad: linear-gradient(90deg, #14b8a6 0%, #2dd4bf 32%, #d2fbf3 50%, #2dd4bf 68%, #14b8a6 100%);
    --moon-bg: #050a0a;
    --moon-bg-rgb: 5, 10, 10;
    --moon-bg-2: #081110;
    --moon-panel-rgb: 12, 20, 20;
    --moon-panel-solid: #0c1414;
    --moon-text: #edf3f2;
    --moon-dim: #9ca9a7;
    --moon-mute: #6b7876;
    --moon-info: #99f6e4;
    --moon-info-rgb: 153, 246, 228;
    --palette-logo-hue: -90deg;
}

/* the built-in logo is violet; turn it to the palette's hue (matches both /images/moon-logo.png and
   Spring's content-hashed /images/moon-logo-<hash>.png; an uploaded logo under /uploads/ is left alone) */
html[data-palette] img[src*="/images/moon-logo"] {
    filter: hue-rotate(var(--palette-logo-hue, 0deg));
}
html[data-palette] ::selection { background: rgba(var(--moon-accent-rgb), 0.35); color: #fff; }
