/* ============================================================
   IrisFMS light theme.
   Loaded AFTER theme-dark.css. The app keeps the `theme-dark` class
   on <body> at all times (so every structural rule in theme-dark.css
   stays active); light mode simply ADDS the `theme-light` class, which
   re-defines the palette CSS variables to light values. Because every
   rule in theme-dark.css reads var(--…), flipping the variables here
   recolors the whole app with no per-rule duplication.
   This file only needs: (1) the light palette, (2) color-scheme flips,
   and (3) overrides for the handful of values theme-dark.css hardcodes
   (not via var) that would be unreadable on a light background.
   ============================================================ */

.theme-light {
    --bg: #f5f6f8;          /* app background (soft gray) */
    --surface: #ffffff;     /* cards, header, sidebar */
    --surface-2: #f0f2f5;   /* inputs, panels */
    --surface-3: #e4e7ec;   /* hover / active */
    --border: #e1e4e9;      /* card hairlines */
    --divider: rgba(17, 24, 39, .07); /* faint in-table row divider */
    --text: #1f2937;        /* primary text */
    --text-muted: #5b6470;  /* secondary text */
    --text-subtle: #8b94a1; /* labels / tertiary */
    --primary: #2f6fe0;     /* accent only */
    --primary-hover: #265dc4;
    --link: #1d4ed8;

    background-color: var(--bg);
    color: var(--text);
    font-family: Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* native <select> popups + form controls render light */
html:has(body.theme-light) { color-scheme: light; }
.theme-light select,
.theme-light .rp-type-select { color-scheme: light; }

/* ---- active nav: theme-dark sets color:#fff (correct on a dark highlight);
   on the light highlight that's invisible, so use the normal text color ---- */
.theme-light .nav-menu a.active,
.theme-light .nav-menu .sub-menu-item .sub-item-active { color: var(--text); }

/* ---- Logo: Irislogo.svg is white (for dark); swap to the black IrislogoPrint.svg
   on light. Both render; theme decides which shows (rules here load always). ---- */
.nav-logo .logo-light { display: none; }
.theme-light .nav-logo .logo-dark { display: none; }
.theme-light .nav-logo .logo-light { display: inline; }

/* ---- Headings & labels theme-dark left white: right on the dark surface, invisible
   on light. (.card-header bakes `@apply text-white` in tw_site.css; some pages write
   the title as a plain white heading; WebSwitch labels pass LabelColor="text-white".) ---- */
.theme-light .card-header { color: var(--text); }
.theme-light .text-white.text-3xl,
.theme-light .text-white.text-2xl,
.theme-light .text-white.text-xl { color: var(--text); }
.theme-light label.text-white { color: var(--text); }
.theme-light .mdi-arrow-left.text-white { color: var(--text); }

/* ---- Status text colors: theme-dark uses light-on-dark tints (e.g. #6ee7b7)
   that wash out on white. The faint rgba backgrounds stay (they read as pale
   pastels on light); just darken the TEXT for contrast. ---- */
/* green — success / pickup / loaded / completed */
.theme-light .s-ok,
.theme-light .badge-ok,
.theme-light .conn-test.is-ok,
.theme-light .rp-type-pickup,
.theme-light .rp-stop-pickup,
.theme-light .rp-fullempty-label.is-loaded,
.theme-light .route-filter button.completed,
.theme-light .route-filter button.active.completed { color: #047857; }

/* blue — info / enroute / drop / relay */
.theme-light .s-info,
.theme-light .badge-info,
.theme-light .rp-type-drop,
.theme-light .rp-type-relay,
.theme-light .rp-stop-drop,
.theme-light .route-filter button.enroute,
.theme-light .route-filter button.active.enroute { color: #1d4ed8; }

/* amber — warn / end */
.theme-light .s-warn,
.theme-light .badge-warn,
.theme-light .rp-type-end { color: #b45309; }

/* red — danger / canceled */
.theme-light .s-danger,
.theme-light .badge-danger,
.theme-light .conn-test.is-err,
.theme-light .route-filter button.canceled,
.theme-light .route-filter button.active.canceled { color: #b91c1c; }

/* header alert icons: darken the severity colors for a light topbar */
.theme-light .header-alerts .text-iris-yellow-500 { color: #d97706 !important; }
.theme-light .header-alerts .text-iris-red-300 { color: #dc2626 !important; }

/* ---- Shadows: theme-dark uses heavy near-black shadows that look harsh on
   light. Soften the common surfaces + the Tailwind shadow utilities. ---- */
.theme-light .shadow,
.theme-light .shadow-md,
.theme-light .shadow-lg { box-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .06); }
.theme-light .gs-modal,
.theme-light .iris-confirm-card,
.theme-light .webenology-modal,
.theme-light .drop-down-body,
.theme-light .wc-holder { box-shadow: 0 16px 40px rgba(16, 24, 40, .14) !important; }
.theme-light .gs-overlay,
.theme-light .webenology-backdrop { background-color: rgba(17, 24, 39, .35) !important; }

/* ---- Scrollbars: light track + thumb ---- */
.theme-light ::-webkit-scrollbar-thumb { background: #c4cad3; border: 3px solid var(--bg); }
.theme-light ::-webkit-scrollbar-thumb:hover { background: #aab2bd; }

/* ---- Calendar footer: Cancel (red) + Ok (indigo) have saturated backgrounds, so keep
   white text. theme-dark sets all footer buttons to var(--text), which is dark-on-color
   in light mode (low contrast). wc-clear is the neutral one — leave its themed text. ---- */
.theme-light .wc-holder .wc-footer > button:not(.wc-clear) { color: #fff !important; }
