/*
 * Temi della galleria. Ogni tema è un insieme di variabili CSS applicato
 * con l'attributo data-theme (sulla pagina o sulle anteprime nelle impostazioni).
 * Per creare un tema nuovo: copia un blocco, cambia nome e colori, e aggiungilo
 * all'elenco THEMES in inc/functions.php.
 */

/* ---------- valori comuni a tutti i temi */
:root, [data-theme] {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: var(--font);
  --head-weight: 650;
  --head-transform: none;
  --head-spacing: normal;
  --radius: 10px;
  --btn-radius: 8px;
  --tile-radius: 6px;
  --tile-gap: 6px;
  --tile-border: 0;
  --tile-shadow: none;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

/* ---------- Classico: chiaro o scuro come il dispositivo */
:root, :root[data-theme="classico"], [data-theme="classico"] {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #1c2026;
  --muted: #6a717d;
  --border: #dde1e6;
  --accent: #2563c9;
  --accent-text: #ffffff;
  --accent-soft: #e3ecfb;
  --danger: #c62f2f;
  --success: #1d7a46;
  --success-soft: #e2f4ea;
  --error-soft: #fbe6e6;
  --info-soft: #e7eefb;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]), :root[data-theme="classico"], [data-theme="classico"] {
    --bg: #121418;
    --surface: #1b1e24;
    --surface-2: #252931;
    --text: #e8eaee;
    --muted: #9aa1ad;
    --border: #2f343d;
    --accent: #5b8ff0;
    --accent-text: #0b1220;
    --accent-soft: #1f2c47;
    --danger: #ef6b6b;
    --success: #4cc27f;
    --success-soft: #16301f;
    --error-soft: #3a1c1c;
    --info-soft: #1c2740;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

/* ---------- Notte: sfondo nero che fa risaltare le foto, dettagli oro */
:root[data-theme="notte"], [data-theme="notte"] {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1f1f22;
  --text: #ededed;
  --muted: #8e8e94;
  --border: #29292d;
  --accent: #e2b65a;
  --accent-text: #1b1405;
  --accent-soft: #2b2312;
  --danger: #f07070;
  --success: #62c98f;
  --success-soft: #14291c;
  --error-soft: #3a1c1c;
  --info-soft: #2b2312;
  --shadow: 0 1px 3px rgba(0, 0, 0, .6);
  --tile-radius: 2px;
  --tile-gap: 3px;
  color-scheme: dark;
}

/* ---------- Carta: toni caldi, titoli con grazie, foto con cornice bianca */
:root[data-theme="carta"], [data-theme="carta"] {
  --bg: #f3ede2;
  --surface: #fbf8f2;
  --surface-2: #ebe3d4;
  --text: #2e271f;
  --muted: #7b6f60;
  --border: #ddd2bf;
  --accent: #9b4a2e;
  --accent-text: #ffffff;
  --accent-soft: #f2e1d6;
  --danger: #b3261e;
  --success: #3f7a3a;
  --success-soft: #e3eedc;
  --error-soft: #f6dedb;
  --info-soft: #f2e1d6;
  --font-head: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --head-weight: 600;
  --radius: 4px;
  --btn-radius: 4px;
  --tile-radius: 2px;
  --tile-gap: 14px;
  --tile-border: 6px solid #ffffff;
  --tile-shadow: 0 2px 6px rgba(60, 40, 20, .18);
  --shadow: 0 1px 3px rgba(60, 40, 20, .10);
  color-scheme: light;
}

/* ---------- Minimal: bianco e nero, angoli vivi, griglia compatta */
:root[data-theme="minimal"], [data-theme="minimal"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --text: #111111;
  --muted: #7a7a7a;
  --border: #e3e3e3;
  --accent: #111111;
  --accent-text: #ffffff;
  --accent-soft: #efefef;
  --danger: #c0262d;
  --success: #1f7a45;
  --success-soft: #e6f3eb;
  --error-soft: #fbe7e8;
  --info-soft: #f2f2f2;
  --head-weight: 500;
  --head-transform: uppercase;
  --head-spacing: .08em;
  --radius: 0;
  --btn-radius: 0;
  --tile-radius: 0;
  --tile-gap: 2px;
  --shadow: none;
  color-scheme: light;
}

/* ---------- Oceano: azzurro e turchese, forme morbide */
:root[data-theme="oceano"], [data-theme="oceano"] {
  --bg: #edf6f8;
  --surface: #ffffff;
  --surface-2: #ddeef2;
  --text: #0f2a33;
  --muted: #587480;
  --border: #cde2e8;
  --accent: #0b8796;
  --accent-text: #ffffff;
  --accent-soft: #d5eff2;
  --danger: #c2333b;
  --success: #17805a;
  --success-soft: #dcf2e8;
  --error-soft: #fae3e4;
  --info-soft: #d5eff2;
  --radius: 18px;
  --btn-radius: 999px;
  --tile-radius: 14px;
  --tile-gap: 10px;
  --shadow: 0 2px 8px rgba(11, 80, 100, .08);
  color-scheme: light;
}

/* ---------- Bosco: verde scuro e naturale */
:root[data-theme="bosco"], [data-theme="bosco"] {
  --bg: #121c16;
  --surface: #1a281f;
  --surface-2: #233629;
  --text: #e5eee7;
  --muted: #95aa9c;
  --border: #2d4436;
  --accent: #93cc7c;
  --accent-text: #10210e;
  --accent-soft: #24402a;
  --danger: #f07a6e;
  --success: #93cc7c;
  --success-soft: #1d3322;
  --error-soft: #3b201c;
  --info-soft: #24402a;
  --radius: 12px;
  --tile-radius: 8px;
  --tile-gap: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
