/* =========================================================================
   Hondenopvang – thema's
   Elk thema is één blok met CSS-variabelen op :root[data-theme="…"].
   Een eigen thema toevoegen: kopieer een blok, geef het een nieuwe naam
   (bijv. data-theme="lavendel") en voeg die naam toe in public/js/theme.js.
   Regels: tekst (--text, --muted, --st-*-fg) moet minstens 4,5:1 contrast hebben
   met de achtergrond waarop hij staat (WCAG AA). Controleer met: npm run contrast
   ========================================================================= */

/* ---------- Licht (standaard) ---------- */
:root, :root[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --text: #1b1f29;
  --muted: #576072;
  --line: #d6dae2;
  --line-soft: #e9ecf1;
  --primary: #2f6f4f;
  --primary-text: #ffffff;
  --danger: #b42318;
  --warn-bg: #fff3c4;
  --warn-fg: #5a4300;
  --now: #d92d20;
  --focus: #2f6f4f;
  --shadow: 0 1px 2px rgb(16 24 40 / .08), 0 2px 6px rgb(16 24 40 / .06);
  --shadow-lg: 0 10px 30px rgb(16 24 40 / .22);
  --toast-bg: #20242e;
  --toast-fg: #f3f4f7;
  --toast-btn: #9fe0bd;

  /* Statussen: accent (rand/icoon), bg (vlak), fg (tekst op bg) */
  --st-aangevraagd-accent: #8a6100; --st-aangevraagd-bg: #fff4d6; --st-aangevraagd-fg: #4d3600;
  --st-bevestigd-accent:   #1d5fbf; --st-bevestigd-bg:   #e4eefc; --st-bevestigd-fg:   #0c2f63;
  --st-lopend-accent:      #2f7d4a; --st-lopend-bg:      #e2f4e8; --st-lopend-fg:      #0f3d20;
  --st-afgerond-accent:    #5d6676; --st-afgerond-bg:    #eceef2; --st-afgerond-fg:    #2a303b;
  --st-geannuleerd-accent: #b42318; --st-geannuleerd-bg: #fde7e4; --st-geannuleerd-fg: #6a130c;
  /* Betaalstatus */
  --pay-open-bg: #fde7e4;    --pay-open-fg: #7a1a10;
  --pay-deels-bg: #fff1cc;   --pay-deels-fg: #5a4300;
  --pay-betaald-bg: #dff3e6; --pay-betaald-fg: #0f4a26;
  color-scheme: light;
}

/* ---------- Donker ---------- */
:root[data-theme="dark"] {
  --bg: #14171f;
  --surface: #1c2029;
  --surface-2: #262b36;
  --text: #e8eaf0;
  --muted: #a3abbb;
  --line: #343a48;
  --line-soft: #252a35;
  --primary: #6cc59a;
  --primary-text: #0b1a12;
  --danger: #ff8a7a;
  --warn-bg: #4a3a00;
  --warn-fg: #ffe9a3;
  --now: #ff6b6b;
  --focus: #8fdcb6;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 2px 6px rgb(0 0 0 / .3);
  --shadow-lg: 0 10px 30px rgb(0 0 0 / .6);
  --toast-bg: #e8eaf0;
  --toast-fg: #14171f;
  --toast-btn: #1e6b45;
  --st-aangevraagd-accent: #e6b84a; --st-aangevraagd-bg: #3a2e0c; --st-aangevraagd-fg: #ffe7a8;
  --st-bevestigd-accent:   #6aa5f5; --st-bevestigd-bg:   #142a4a; --st-bevestigd-fg:   #d7e7ff;
  --st-lopend-accent:      #5fcf86; --st-lopend-bg:      #133722; --st-lopend-fg:      #d2f5de;
  --st-afgerond-accent:    #9aa3b3; --st-afgerond-bg:    #2a2f3a; --st-afgerond-fg:    #dde1e8;
  --st-geannuleerd-accent: #ff8a7a; --st-geannuleerd-bg: #451a16; --st-geannuleerd-fg: #ffd9d3;
  --pay-open-bg: #451a16;    --pay-open-fg: #ffd9d3;
  --pay-deels-bg: #3a2e0c;   --pay-deels-fg: #ffe7a8;
  --pay-betaald-bg: #133722; --pay-betaald-fg: #d2f5de;
  color-scheme: dark;
}

/* ---------- Volg systeem: licht of donker ---------- */
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #14171f; --surface: #1c2029; --surface-2: #262b36; --text: #e8eaf0; --muted: #a3abbb; --line: #343a48; --line-soft: #252a35;
    --primary: #6cc59a; --primary-text: #0b1a12; --danger: #ff8a7a; --warn-bg: #4a3a00; --warn-fg: #ffe9a3; --now: #ff6b6b; --focus: #8fdcb6;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 2px 6px rgb(0 0 0 / .3); --shadow-lg: 0 10px 30px rgb(0 0 0 / .6);
    --toast-bg: #e8eaf0; --toast-fg: #14171f; --toast-btn: #1e6b45;
    --st-aangevraagd-accent: #e6b84a; --st-aangevraagd-bg: #3a2e0c; --st-aangevraagd-fg: #ffe7a8;
    --st-bevestigd-accent: #6aa5f5; --st-bevestigd-bg: #142a4a; --st-bevestigd-fg: #d7e7ff;
    --st-lopend-accent: #5fcf86; --st-lopend-bg: #133722; --st-lopend-fg: #d2f5de;
    --st-afgerond-accent: #9aa3b3; --st-afgerond-bg: #2a2f3a; --st-afgerond-fg: #dde1e8;
    --st-geannuleerd-accent: #ff8a7a; --st-geannuleerd-bg: #451a16; --st-geannuleerd-fg: #ffd9d3;
    --pay-open-bg: #451a16; --pay-open-fg: #ffd9d3; --pay-deels-bg: #3a2e0c; --pay-deels-fg: #ffe7a8; --pay-betaald-bg: #133722; --pay-betaald-fg: #d2f5de;
    color-scheme: dark;
  }
}

/* ---------- Bos (groentinten) ---------- */
:root[data-theme="forest"] {
  --bg: #eef3ec;
  --surface: #fbfdf9;
  --surface-2: #e0eadb;
  --text: #17261a;
  --muted: #4a5d4c;
  --line: #c6d5c2;
  --line-soft: #dfe8db;
  --primary: #2e6b34;
  --primary-text: #ffffff;
  --danger: #a3261a;
  --warn-bg: #f6ecc5;
  --warn-fg: #4f3e00;
  --now: #b3261e;
  --focus: #2e6b34;
  --shadow: 0 1px 2px rgb(20 40 20 / .1), 0 2px 6px rgb(20 40 20 / .07);
  --shadow-lg: 0 10px 30px rgb(20 40 20 / .22);
  --toast-bg: #1d2e20; --toast-fg: #eef5ec; --toast-btn: #b5e3a8;
  --st-aangevraagd-accent: #85620a; --st-aangevraagd-bg: #f7eccb; --st-aangevraagd-fg: #463300;
  --st-bevestigd-accent:   #2d6a8a; --st-bevestigd-bg:   #dcecf2; --st-bevestigd-fg:   #0f3346;
  --st-lopend-accent:      #2e7a35; --st-lopend-bg:      #d9efd5; --st-lopend-fg:      #123b16;
  --st-afgerond-accent:    #5e6b5f; --st-afgerond-bg:    #e3e9e1; --st-afgerond-fg:    #2a332b;
  --st-geannuleerd-accent: #a3261a; --st-geannuleerd-bg: #f6e0da; --st-geannuleerd-fg: #5e140c;
  --pay-open-bg: #f6e0da; --pay-open-fg: #6b170e; --pay-deels-bg: #f7eccb; --pay-deels-fg: #463300; --pay-betaald-bg: #d9efd5; --pay-betaald-fg: #123b16;
  color-scheme: light;
}

/* ---------- Oceaan (blauwtinten) ---------- */
:root[data-theme="ocean"] {
  --bg: #eaf2f8;
  --surface: #fafdff;
  --surface-2: #dbe8f2;
  --text: #0f2233;
  --muted: #455a6d;
  --line: #bfd3e3;
  --line-soft: #dce8f1;
  --primary: #155e8c;
  --primary-text: #ffffff;
  --danger: #a8281e;
  --warn-bg: #fbefc6;
  --warn-fg: #4f3e00;
  --now: #c92a2a;
  --focus: #155e8c;
  --shadow: 0 1px 2px rgb(10 30 50 / .1), 0 2px 6px rgb(10 30 50 / .07);
  --shadow-lg: 0 10px 30px rgb(10 30 50 / .22);
  --toast-bg: #102435; --toast-fg: #eaf3fa; --toast-btn: #9fd3f5;
  --st-aangevraagd-accent: #8a6100; --st-aangevraagd-bg: #fbf0cf; --st-aangevraagd-fg: #463300;
  --st-bevestigd-accent:   #155e8c; --st-bevestigd-bg:   #d6e9f7; --st-bevestigd-fg:   #0a2f49;
  --st-lopend-accent:      #0e7a6e; --st-lopend-bg:      #d3f0ec; --st-lopend-fg:      #063b35;
  --st-afgerond-accent:    #586776; --st-afgerond-bg:    #e1e8ee; --st-afgerond-fg:    #26313b;
  --st-geannuleerd-accent: #a8281e; --st-geannuleerd-bg: #f8e1de; --st-geannuleerd-fg: #5e140c;
  --pay-open-bg: #f8e1de; --pay-open-fg: #6b170e; --pay-deels-bg: #fbf0cf; --pay-deels-fg: #463300; --pay-betaald-bg: #d3f0ec; --pay-betaald-fg: #063b35;
  color-scheme: light;
}

/* ---------- Zonsondergang (warme oranje/terra-tinten) ---------- */
:root[data-theme="sunset"] {
  --bg: #fbf1ea;
  --surface: #fffbf8;
  --surface-2: #f4e2d5;
  --text: #2b1a12;
  --muted: #6b4f41;
  --line: #e6cdbd;
  --line-soft: #f2e2d7;
  --primary: #a8431c;
  --primary-text: #ffffff;
  --danger: #9e1c1c;
  --warn-bg: #fbecc0;
  --warn-fg: #4f3800;
  --now: #b3261e;
  --focus: #a8431c;
  --shadow: 0 1px 2px rgb(60 25 10 / .1), 0 2px 6px rgb(60 25 10 / .07);
  --shadow-lg: 0 10px 30px rgb(60 25 10 / .22);
  --toast-bg: #2f1c13; --toast-fg: #fbf1ea; --toast-btn: #ffc49f;
  --st-aangevraagd-accent: #8a5a00; --st-aangevraagd-bg: #fbedc8; --st-aangevraagd-fg: #463000;
  --st-bevestigd-accent:   #2c5d9e; --st-bevestigd-bg:   #e2ebf7; --st-bevestigd-fg:   #0f2c52;
  --st-lopend-accent:      #3d7a2e; --st-lopend-bg:      #e3f1dc; --st-lopend-fg:      #183b10;
  --st-afgerond-accent:    #6f5f57; --st-afgerond-bg:    #efe6e0; --st-afgerond-fg:    #352a24;
  --st-geannuleerd-accent: #9e1c1c; --st-geannuleerd-bg: #f8dfdb; --st-geannuleerd-fg: #5a0f0f;
  --pay-open-bg: #f8dfdb; --pay-open-fg: #631111; --pay-deels-bg: #fbedc8; --pay-deels-fg: #463000; --pay-betaald-bg: #e3f1dc; --pay-betaald-fg: #183b10;
  color-scheme: light;
}

/* ---------- Hoog contrast (slecht licht of slecht zicht) ---------- */
:root[data-theme="contrast"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --text: #000000;
  --muted: #2b2b2b;
  --line: #000000;
  --line-soft: #6b6b6b;
  --primary: #003d99;
  --primary-text: #ffffff;
  --danger: #a30000;
  --warn-bg: #ffe066;
  --warn-fg: #000000;
  --now: #c00000;
  --focus: #000000;
  --shadow: none;
  --shadow-lg: 0 0 0 3px #000000;
  --toast-bg: #000000; --toast-fg: #ffffff; --toast-btn: #ffe066;
  --st-aangevraagd-accent: #000000; --st-aangevraagd-bg: #ffe066; --st-aangevraagd-fg: #000000;
  --st-bevestigd-accent:   #000000; --st-bevestigd-bg:   #cfe2ff; --st-bevestigd-fg:   #000000;
  --st-lopend-accent:      #000000; --st-lopend-bg:      #b9f0c4; --st-lopend-fg:      #000000;
  --st-afgerond-accent:    #000000; --st-afgerond-bg:    #e6e6e6; --st-afgerond-fg:    #000000;
  --st-geannuleerd-accent: #000000; --st-geannuleerd-bg: #ffffff; --st-geannuleerd-fg: #a30000;
  --pay-open-bg: #ffffff; --pay-open-fg: #a30000; --pay-deels-bg: #ffe066; --pay-deels-fg: #000000; --pay-betaald-bg: #b9f0c4; --pay-betaald-fg: #000000;
  color-scheme: light;
}
:root[data-theme="contrast"] .stay-block, :root[data-theme="contrast"] .badge, :root[data-theme="contrast"] .card { border-width: 2px !important; border-color: #000 !important; }
:root[data-theme="contrast"] .st-geannuleerd { text-decoration: line-through; }
