/*
  EloQuest design tokens. BlazorBase supplies the colour, spacing, radius and type scales and is linked
  before this file. The fantasy-scholarly palette below overrides the BlazorBase accent and status colours
  for the light and the dark theme; the --eq-* tokens expose the raw brand colours to components.

  The dark theme is declared twice on purpose, exactly like BlazorBase does it: once behind the
  prefers-color-scheme media query (guarded so an explicit light choice still wins) and once behind the
  data-theme="dark" stamp of an explicit choice.
*/

@font-face {
    font-family: "EloQuest Nunito";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "EloQuest Nunito";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("../fonts/nunito-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --space-7: 48px;
    --shell-max: 1120px;
    --tap-target: 44px;
    --shadow-raised: 0 6px 24px #0000001F;

    --eq-ink: #1C2541;
    --eq-teal: #1F7A8C;
    --eq-gold: #E0A526;
    --eq-parchment: #F6EFDF;
    --eq-crimson: #C8414B;
    --eq-green: #3BAA6E;
    --eq-gold-text: #8A6210;
    --eq-gold-edge: #9A6D0C;
    --eq-violet: #7A4FD0;
    --eq-flame: #F28C28;
    --eq-ice: #8DD3EF;
    --eq-ice-edge: #3E93B5;

    --eq-rarity-common: #7B8294;
    --eq-rarity-uncommon: #3BAA6E;
    --eq-rarity-rare: #1F7A8C;
    --eq-rarity-epic: #7A4FD0;
    --eq-rarity-legendary: #E0A526;

    --color-accent: #1A6D7E;
    --color-accent-fill: #1F7A8C;
    --color-accent-fill-hover: #19667A;
    --color-accent-fill-pressed: #135264;
    --color-text-on-accent: #FFFFFF;
    --color-bg-selected: #1F7A8C1A;
    --color-border-focus: #1F7A8C;

    --color-success: #23804F;
    --color-warning: #8A6210;
    --color-danger: #C8414B;

    --font-display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --font-base: "EloQuest Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

    --color-bg-surface: #F6EFDF;
    --color-bg-elevated: #FFFBF1;
    --color-bg-subtle: #EDE4CE;
    --color-bg-hover: #F0E7D2;
    --color-border: #DDD2B8;
    --color-border-strong: #C4B691;
    --color-text-primary: #1C2541;
    --color-text-secondary: #3F4A6B;
    --color-text-muted: #5F6784;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --eq-gold-text: #E0A526;

        --color-bg-surface: #121A30;
        --color-bg-elevated: #1C2541;
        --color-bg-subtle: #17203A;
        --color-bg-hover: #26315A;
        --color-bg-selected: #1F7A8C38;

        --color-border: #2F3B63;
        --color-border-strong: #43517F;
        --color-border-focus: #4FB3C6;

        --color-accent: #4FB3C6;
        --color-accent-fill: #1F7A8C;
        --color-accent-fill-hover: #19667A;
        --color-accent-fill-pressed: #135264;
        --color-text-on-accent: #FFFFFF;

        --color-text-primary: #F6EFDF;
        --color-text-secondary: #D3CCBA;
        --color-text-muted: #A7A495;

        --color-success: #3BAA6E;
        --color-warning: #E0A526;
        --color-danger: #E26670;
        --color-danger-bg: #C8414B26;
        --color-text-on-danger: #1B0E10;
    }
}

:root[data-theme="dark"] {
    --eq-gold-text: #E0A526;

    --color-bg-surface: #121A30;
    --color-bg-elevated: #1C2541;
    --color-bg-subtle: #17203A;
    --color-bg-hover: #26315A;
    --color-bg-selected: #1F7A8C38;

    --color-border: #2F3B63;
    --color-border-strong: #43517F;
    --color-border-focus: #4FB3C6;

    --color-accent: #4FB3C6;
    --color-accent-fill: #1F7A8C;
    --color-accent-fill-hover: #19667A;
    --color-accent-fill-pressed: #135264;
    --color-text-on-accent: #FFFFFF;

    --color-text-primary: #F6EFDF;
    --color-text-secondary: #D3CCBA;
    --color-text-muted: #A7A495;

    --color-success: #3BAA6E;
    --color-warning: #E0A526;
    --color-danger: #E26670;
    --color-danger-bg: #C8414B26;
    --color-text-on-danger: #1B0E10;
}
