/*
 * Every color the page CSS files (include/css/pages/) use, defined ONCE. The other files use only
 * these variables (a transparent variant: color-mix(in srgb, var(--navy) 30%, transparent)).
 * \D\ETC\pageStyles() prints this file first, once per page.
 *
 * Color mode: body.pageDark (set from \D\LAYOUT\pageMode()) switches the shared surfaces at the end.
 */
:root {
    /* the brand palette (Figma) */
    --navy: #113D56;
    --sea: #1099AB;
    --sky: #B9DDE8;
    --glow: #F8F294;
    --blaze: #F15D22;
    --peach: #FDC066;
    --glass: #E4E5E7;
    --black: #101010;
    --white: #FFFFFF;
    --brand-dark: #182226;
    /* approved exception: the adopted homes' grey (as the Leaders Portal) */
    --adopted-grey: #D9D9D9;

    /* NOT brand colors: the older UI's tints and dark surfaces, kept so the existing pages look the
       same. New work uses the palette above. */
    --sky-wash: #E9F3F8;        /* cards and table headers */
    --sky-wash-deep: #D6E9F3;   /* a clickable card's hover */
    --sky-hover: #DFEEF5;       /* a table row's hover */
    --sky-mist: #F4F8FA;        /* a map control's hover */
    --row-alt: #F1F3F5;         /* every other table row */
    --text-grey: #333333;
    --muted-grey: #6B6B6B;
    --mid-grey: #969696;
    --neutral-grey: #808080;
    --cream: #FBF9F4;
    --navy-deep: #0D2F42;       /* a navy button's hover */
    --shadow: #000000;          /* shadows and dark washes */
    --slate: #26343E;           /* dark mode: cards */
    --slate-raised: #31424F;    /* dark mode: card hover, popup header */
    --slate-hover: #31424E;     /* dark mode: map control hover */
    --slate-sheet: #1F2A31;     /* dark mode: map sheet */
    --slate-dot: #3A4A55;
    --slate-grip: #4A5A65;
    --night: #1B1E21;           /* dark mode: map page */
    --dark-text: #E6E6E6;
    --dark-muted: #A5A5AC;
    --dark-popup-text: #E8EDF1;
    --sea-light: #7FD3DE;
    --error: #C62828;
    --error-on-dark: #F28B82;
    --error-on-map: #FF8A80;
    --success: #1E7B34;
    --success-on-dark: #7FD98F;
}

/* The surfaces several pages share, light and dark. */
body {
    --surface-card: var(--sky-wash);
    --surface-card-hover: var(--sky-wash-deep);
    --surface-mount: color-mix(in srgb, var(--white) 75%, transparent);   /* text boxes on a card */
    --control-border: color-mix(in srgb, var(--navy) 35%, transparent);
    --control-bg: color-mix(in srgb, var(--white) 75%, transparent);
    --switch-track: color-mix(in srgb, var(--navy) 30%, transparent);
    --error-text: var(--error);
}
body.pageDark {
    --surface-card: var(--slate);
    --surface-card-hover: var(--slate-raised);
    --surface-mount: color-mix(in srgb, var(--shadow) 25%, transparent);
    --control-border: color-mix(in srgb, var(--white) 35%, transparent);
    --control-bg: color-mix(in srgb, var(--shadow) 25%, transparent);
    --switch-track: color-mix(in srgb, var(--white) 30%, transparent);
    --error-text: var(--error-on-dark);
}
