/* App themes and fonts for the light pages (/historial).
 * Same tokens as the theme blocks in templates/index.html (tests/test_themes_css.py
 * fails if they drift). `html:root[...]` so they win over base.html's own palette
 * and its prefers-color-scheme block, which load later: these pages follow the
 * user's app theme, not the system's dark mode. */

/* ---- Geomanist ---- */
@font-face {
    font-family: 'Geomanist';
    src: url('/static/fonts/Geomanist/Geomanist-Thin-Webfont/geomanist-thin-webfont.woff2') format('woff2'),
         url('/static/fonts/Geomanist/Geomanist-Thin-Webfont/geomanist-thin-webfont.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geomanist';
    src: url('/static/fonts/Geomanist/Geomanist-Light-Webfont/geomanist-light-webfont.woff2') format('woff2'),
         url('/static/fonts/Geomanist/Geomanist-Light-Webfont/geomanist-light-webfont.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geomanist';
    src: url('/static/fonts/Geomanist/Geomanist-Light-Italic-Webfont/geomanist-light-italic-webfont.woff2') format('woff2'),
         url('/static/fonts/Geomanist/Geomanist-Light-Italic-Webfont/geomanist-light-italic-webfont.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Geomanist';
    src: url('/static/fonts/Geomanist/Geomanist-Book-Webfont/geomanist-book-webfont.woff2') format('woff2'),
         url('/static/fonts/Geomanist/Geomanist-Book-Webfont/geomanist-book-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geomanist';
    src: url('/static/fonts/Geomanist/Geomanist-Medium-Webfont/geomanist-medium-webfont.woff2') format('woff2'),
         url('/static/fonts/Geomanist/Geomanist-Medium-Webfont/geomanist-medium-webfont.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geomanist';
    src: url('/static/fonts/Geomanist/Geomanist-Bold-Webfont/geomanist-bold-webfont.woff2') format('woff2'),
         url('/static/fonts/Geomanist/Geomanist-Bold-Webfont/geomanist-bold-webfont.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Geomanist';
    src: url('/static/fonts/Geomanist/Geomanist-Ultra-Webfont/geomanist-ultra-webfont.woff2') format('woff2'),
         url('/static/fonts/Geomanist/Geomanist-Ultra-Webfont/geomanist-ultra-webfont.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ---- Calendas ---- */
@font-face {
    font-family: 'Calendas';
    src: url('/static/fonts/calendas/calendas_plus-webfont.woff2') format('woff2'),
         url('/static/fonts/calendas/calendas_plus-webfont.woff') format('woff'),
         url('/static/fonts/calendas/calendas_plus-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Calendas';
    src: url('/static/fonts/calendas/calendas_plus_bold-webfont.woff2') format('woff2'),
         url('/static/fonts/calendas/calendas_plus_bold-webfont.woff') format('woff'),
         url('/static/fonts/calendas/calendas_plus_bold-webfont.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Calendas';
    src: url('/static/fonts/calendas/calendas_plus_italic-webfont.woff2') format('woff2'),
         url('/static/fonts/calendas/calendas_plus_italic-webfont.woff') format('woff'),
         url('/static/fonts/calendas/calendas_plus_italic-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Tema 1: Calendas + Verde BCV */
html:root[data-theme="calendas"] {
    --bg:          #0f8844;
    --bg-light:    #14a954;
    --bg-dark:     #0c6d37;
    --fg:          #ffffff;
    --fg-dim:      rgba(255,255,255,0.75);
    --fg-dimmer:   rgba(255,255,255,0.45);
    --font-main:   'Calendas', Georgia, serif;
    --fw-eur-label: normal;
    --fw-eur-value: normal;
    --fw-dollar:    bold;
    --fw-fecha:     normal;
    --fw-badge:     normal;
    --row-alt-bg:  rgba(0,0,0,0.15);
    --row-hover-bg: rgba(0,0,0,0.25);
    --input-bg:    rgba(255,255,255,0.1);
    --input-border: var(--fg-dim);
    --panel-bg:    #0a5a2f;
    --panel-text:  #e8f4ed;
    --chart-usd:   #ffffff;
    --chart-eur:   #66ff99;
    --chart-par:   #33ff66;
}

/* Tema 2: Geomanist + Amarillo */
html:root[data-theme="geomanist"] {
    --bg:          #ebcf34;
    --bg-light:    #f0d94a;
    --bg-dark:     #d4bb2e;
    --fg:          #2b291c;
    --fg-dim:      rgba(43,41,28,0.70);
    --fg-dimmer:   rgba(43,41,28,0.40);
    --font-main:   'Geomanist', sans-serif;
    --fw-eur-label: 500;  /* Medium — exterior superior */
    --fw-eur-value: 500;  /* Medium — línea 2          */
    --fw-dollar:    900;  /* Ultra  — número principal */
    --fw-fecha:     700;  /* Bold   — línea 4          */
    --fw-badge:     700;  /* Bold   — exterior inferior */
    --row-alt-bg:  rgba(43,41,28,0.06);
    --row-hover-bg: rgba(43,41,28,0.12);
    --input-bg:    rgba(43,41,28,0.05);
    --input-border: rgba(43,41,28,0.30);
    --panel-bg:    #d4bb2e;
    --panel-text:  #2b291c;
    --chart-usd:   #2b291c;
    --chart-eur:   #997700;
    --chart-par:   #cc8800;
}

/* Tema 3: Geomanist + Verde */
html:root[data-theme="verde"] {
    --bg:          #96e072;
    --bg-light:    #a8e887;
    --bg-dark:     #7ec95c;
    --fg:          #1a1a14;
    --fg-dim:      rgba(26,26,20,0.70);
    --fg-dimmer:   rgba(26,26,20,0.40);
    --font-main:   'Geomanist', sans-serif;
    --fw-eur-label: 500;
    --fw-eur-value: 500;
    --fw-dollar:    900;
    --fw-fecha:     700;
    --fw-badge:     700;
    --row-alt-bg:  rgba(26,26,20,0.06);
    --row-hover-bg: rgba(26,26,20,0.12);
    --input-bg:    rgba(26,26,20,0.05);
    --input-border: rgba(26,26,20,0.30);
    --panel-bg:    #7ec95c;
    --panel-text:  #1a1a14;
    --chart-usd:   #1a1a14;
    --chart-eur:   #4a9333;
    --chart-par:   #2d6b1f;
}

/* Tema 4: Geomanist + Papel */
html:root[data-theme="papel"] {
    --bg:          #f8f5ef;
    --bg-light:    #faf8f4;
    --bg-dark:     #ede9e1;
    --fg:          #2b291c;
    --fg-dim:      rgba(43,41,28,0.70);
    --fg-dimmer:   rgba(43,41,28,0.40);
    --font-main:   'Geomanist', sans-serif;
    --fw-eur-label: 500;
    --fw-eur-value: 500;
    --fw-dollar:    900;
    --fw-fecha:     700;
    --fw-badge:     700;
    --row-alt-bg:  rgba(43,41,28,0.06);
    --row-hover-bg: rgba(43,41,28,0.12);
    --input-bg:    rgba(43,41,28,0.05);
    --input-border: rgba(43,41,28,0.30);
    --panel-bg:    #ede9e1;
    --panel-text:  #2b291c;
    --chart-usd:   #2b291c;
    --chart-eur:   #8b6f47;
    --chart-par:   #a0826d;
}

/* Tema 5: Geomanist + Crema */
html:root[data-theme="crema"] {
    --bg:          #F3F1D9;
    --bg-light:    #f7f5e6;
    --bg-dark:     #e8e5cc;
    --fg:          #2b291c;
    --fg-dim:      rgba(43,41,28,0.70);
    --fg-dimmer:   rgba(43,41,28,0.40);
    --font-main:   'Geomanist', sans-serif;
    --fw-eur-label: 500;
    --fw-eur-value: 500;
    --fw-dollar:    900;
    --fw-fecha:     700;
    --fw-badge:     700;
    --row-alt-bg:  rgba(43,41,28,0.06);
    --row-hover-bg: rgba(43,41,28,0.12);
    --input-bg:    rgba(43,41,28,0.05);
    --input-border: rgba(43,41,28,0.30);
    --panel-bg:    #e8e5cc;
    --panel-text:  #2b291c;
    --chart-usd:   #2b291c;
    --chart-eur:   #9d7d3e;
    --chart-par:   #b8924a;
}

/* Tema 6: Geomanist + Rosa */
html:root[data-theme="rosa"] {
    --bg:          #f0c5d9;
    --bg-light:    #f5d0e0;
    --bg-dark:     #e8a8c5;
    --fg:          #2b291c;
    --fg-dim:      rgba(43,41,28,0.70);
    --fg-dimmer:   rgba(43,41,28,0.40);
    --font-main:   'Geomanist', sans-serif;
    --fw-eur-label: 500;
    --fw-eur-value: 500;
    --fw-dollar:    900;
    --fw-fecha:     700;
    --fw-badge:     700;
    --row-alt-bg:  rgba(43,41,28,0.06);
    --row-hover-bg: rgba(43,41,28,0.12);
    --input-bg:    rgba(43,41,28,0.05);
    --input-border: rgba(43,41,28,0.30);
    --panel-bg:    #e8a8c5;
    --panel-text:  #2b291c;
    --chart-usd:   #2b291c;
    --chart-eur:   #a84d73;
    --chart-par:   #c46d8f;
}
