/* Shared color tokens for each interface theme. */
:root {
    --radius-sm: 6px; --radius: 8px; --radius-md: 10px; --radius-lg: 14px;
}

:root, [data-theme="light"] {
    color-scheme: light;
    --bg: #f3f5f4; --shell-bg: #f3f5f4; --surface: #ffffff; --surface-2: #f7f9f8; --hover: rgba(2, 62, 44, 0.03);
    --text: #0f241e; --muted: #5c726c; --eyebrow: #023e2c; --heading: #023e2c;
    --primary: #023e2c; --on-primary: #ffffff; --accent: #c8dd69; --focus: #c8dd69;
    --btn-bg: #023e2c; --btn-bg-hover: #4e786b; --btn-text: #ffffff;
    --border: rgba(2, 62, 44, 0.08); --border-strong: rgba(2, 62, 44, 0.16); --input-border: rgba(2, 62, 44, 0.22); --input-focus: #4e786b;
    --bg-sidebar: #023e2c; --text-on-dark: #ededed; --nav-accent: #c8dd69;
    --error-border: #d9534f; --error-bg: #fcefee; --error-text: #7a221d; --validation: #b3261e;
    --elev-1: 0 1px 2px rgba(2, 62, 44, 0.05); --elev-2: 0 2px 6px rgba(2, 62, 44, 0.07); --elev-3: 0 10px 28px rgba(2, 62, 44, 0.14);
    --shadow: rgba(2, 62, 44, 0.14); --backdrop: rgba(2, 62, 44, 0.55);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111614; --shell-bg: #111614; --surface: #181c1b; --surface-2: #1a1f1e; --hover: rgba(255, 255, 255, 0.04);
    --text: #e4e8e6; --muted: #8a9691; --eyebrow: #c8dd69; --heading: #e8ece9;
    --primary: #c8dd69; --on-primary: #111614; --accent: #c8dd69; --focus: #c8dd69;
    --btn-bg: #2d5a4a; --btn-bg-hover: #3d6b5e; --btn-text: #ffffff;
    --border: rgba(255, 255, 255, 0.06); --border-strong: rgba(255, 255, 255, 0.12); --input-border: rgba(255, 255, 255, 0.14); --input-focus: #c8dd69;
    --bg-sidebar: #0d110f; --text-on-dark: #ededed; --nav-accent: #c8dd69;
    --error-border: #e07a66; --error-bg: #3a1c17; --error-text: #ffc9bd; --validation: #ff9d8a;
    --elev-1: 0 1px 2px rgba(0, 0, 0, 0.3); --elev-2: 0 2px 6px rgba(0, 0, 0, 0.35); --elev-3: 0 10px 28px rgba(0, 0, 0, 0.5);
    --shadow: rgba(0, 0, 0, 0.5); --backdrop: rgba(0, 0, 0, 0.7);
}

/* Northern lights: deep night sky with green and violet bands. */
[data-theme="aurora"] {
    color-scheme: dark;
    --bg: #0b1026;
    --shell-bg: radial-gradient(1200px 500px at 15% -10%, rgba(94, 242, 194, 0.22), transparent 60%),
                radial-gradient(900px 420px at 85% -5%, rgba(180, 140, 255, 0.24), transparent 60%), #0b1026;
    --surface: #141b3a; --surface-2: #1d2650; --hover: #1a2350;
    --text: #e8ecff; --muted: #9aa6d6; --eyebrow: #b48cff;
    --primary: #5ef2c2; --on-primary: #06121f; --accent: #b48cff; --focus: #b48cff;
    --border: #2a3566; --input-border: #3d4a85;
    --bg-sidebar: #080c1f; --text-on-dark: #e8ecff; --nav-accent: #5ef2c2;
    --error-border: #ff8fa3; --error-bg: #3a1530; --error-text: #ffc6d1; --validation: #ff9fb2;
    --shadow: rgba(0, 0, 0, 0.6); --backdrop: rgba(5, 8, 25, 0.7);
}

/* Glacier: icy blues and clean white. */
[data-theme="glacier"] {
    color-scheme: light;
    --bg: #eef5f9; --shell-bg: linear-gradient(180deg, #e3f0f7 0%, #eef5f9 320px); --surface: #fbfdff; --surface-2: #dcebf3; --hover: #e7f4fb;
    --text: #0f2533; --muted: #5a7486; --eyebrow: #2a6f93;
    --primary: #0b5e86; --on-primary: #ffffff; --accent: #8fd3f0; --focus: #2a9fd6;
    --border: #cfe1ec; --input-border: #a5c3d6;
    --bg-sidebar: #0b4f72; --text-on-dark: #f2f9fd; --nav-accent: #8fd3f0;
    --error-border: #b0413a; --error-bg: #fdeeee; --error-text: #7a221d; --validation: #a3302a;
    --shadow: rgba(10, 40, 60, 0.25); --backdrop: rgba(10, 40, 60, 0.35);
}

/* Volcano: basalt with glowing lava. */
[data-theme="volcano"] {
    color-scheme: dark;
    --bg: #161112;
    --shell-bg: radial-gradient(900px 380px at 50% 115%, rgba(255, 122, 69, 0.16), transparent 70%), #161112;
    --surface: #211819; --surface-2: #2d2021; --hover: #2a1d1e;
    --text: #f3e9e6; --muted: #b59d97; --eyebrow: #ffb08a;
    --primary: #ff7a45; --on-primary: #1a0d08; --accent: #ffc857; --focus: #ffc857;
    --border: #3a2a2a; --input-border: #5a4140;
    --bg-sidebar: #100b0c; --text-on-dark: #f3e9e6; --nav-accent: #ff7a45;
    --error-border: #ff6b6b; --error-bg: #3d1616; --error-text: #ffc2c2; --validation: #ff9a9a;
    --shadow: rgba(0, 0, 0, 0.6); --backdrop: rgba(0, 0, 0, 0.65);
}

/* High contrast for accessibility. */
[data-theme="contrast"] {
    color-scheme: dark;
    --bg: #000000; --shell-bg: #000000; --surface: #000000; --surface-2: #1a1a1a; --hover: #1a1a1a;
    --text: #ffffff; --muted: #e6e6e6; --eyebrow: #00ffff;
    --primary: #ffff00; --on-primary: #000000; --accent: #00ffff; --focus: #00ffff;
    --border: #ffffff; --input-border: #ffffff;
    --bg-sidebar: #000000; --text-on-dark: #ffffff; --nav-accent: #ffff00; --border-strong: #ffff00;
    --error-border: #ff6b6b; --error-bg: #000000; --error-text: #ffb3b3; --validation: #ffb3b3;
    --shadow: rgba(255, 255, 255, 0.25); --backdrop: rgba(0, 0, 0, 0.8);
}
[data-theme="contrast"] .select-label select { border-width: 2px; }
[data-theme="contrast"] a { text-decoration: underline; }

[data-theme="contrast"] .app-sidebar { border-right: 2px solid #ffffff; }

/* Statically rendered text emitted in both languages; show the one matching <html lang>. */
html[lang="is"] [data-ui-lang="en"], html:not([lang="is"]) [data-ui-lang="is"] { display: none; }
