/* ============================================================================
   oum-theme.css — OUM brand tokens for the Learner Portal.

   Change the hexes in :root below and the whole portal follows.

   Load order: style.css -> oum-theme.css -> custom.css -> learner-ui.css.
   Must sit before custom.css, which consumes these tokens.

   Don't de-duplicate public/logos: cms-logo-invert.png and oumlogo.png are
   copies of the oum-* marks, kept under their old names because the 9 module
   repos and the PDF headers still reference those names.
   ============================================================================ */

:root {
    /* --- palette: the only hexes you should need to edit --- */
    --oum-primary: #19499C;
    --oum-primary-rgb: 25, 73, 156;
    --oum-primary-hover: #143C82;
    --oum-primary-active: #102F66;
    --oum-primary-light: #2F63BD;
    --oum-primary-soft: #E8EEF7;

    --oum-accent: #05B6C5;
    --oum-accent-rgb: 5, 182, 197;
    --oum-accent-hover: #049AA6;
    --oum-accent-soft: #E0F7F9;

    --oum-on-brand: #ffffff;
    /* Ink for labels on accent fills — white on cyan is only 2.2:1. */
    --oum-on-accent: #032A31;
    /* Lightened so the brand stays legible on dark surfaces. */
    --oum-primary-on-dark: #5E9BE8;

    /* --- roles: remap these to restyle without touching the palette --- */
    --oum-sidebar-bg: var(--oum-primary);
    --oum-icon-action: var(--oum-primary);
    --oum-link: var(--oum-primary);
    --oum-link-hover: var(--oum-accent-hover);
    /* Swap to var(--oum-primary-hover) for monochrome navy buttons. */
    --oum-btn-hover-bg: var(--oum-accent);
    --oum-btn-active-bg: var(--oum-accent-hover);
    --oum-btn-disabled-bg: #8CA4CB;
    --oum-focus-ring: 0 0 0 3px rgba(var(--oum-accent-rgb), .35);
}

/* CoreUI 4.2.2 (style.css) resolves its components through these. */
:root {
    --cui-primary: var(--oum-primary);
    --cui-primary-rgb: var(--oum-primary-rgb);
    --cui-secondary: var(--oum-accent);
    --cui-secondary-rgb: var(--oum-accent-rgb);
    --cui-link-color: var(--oum-link);
    --cui-link-hover-color: var(--oum-link-hover);
}

/* learner-ui.css tokens, rebased on OUM. Doubled :root:root outranks
   learner-ui.css's own :root, which loads after this file. */
:root:root {
    --lp-brand: var(--oum-primary);
    --lp-brand-strong: var(--oum-primary-hover);
    --lp-brand-soft: var(--oum-primary-soft);
    --lp-brand-contrast: var(--oum-on-brand);
    --lp-focus-ring: var(--oum-focus-ring);
    --lp-solid-info-from: var(--oum-primary);
    --lp-solid-info-to: var(--oum-primary-hover);
    --lp-solid-teal-from: var(--oum-accent);
    --lp-solid-teal-to: var(--oum-accent-hover);
}

/* Brand identity only. Rebinding the status tones (info/teal/...) here would
   outrank learner-ui.css's `.dark-mode` and strand them at light-mode colours. */

/* Ties with :root:root on specificity, so it wins on order — keep it last. */
.dark-mode:root {
    --lp-brand: var(--oum-primary-on-dark);
    --lp-brand-soft: #16304a;
}

/* --- Compatibility layer: recolours inline styles still hardcoded in blades.
       Drop a rule once its blade moves to tokens. --- */

[style*="#0d4c80" i]:not([style*="background"]),
[style*="#03559d" i]:not([style*="background"]) {
    color: var(--oum-icon-action) !important;
}

[style*="background-color:#0d4c80" i],
[style*="background-color: #0d4c80" i] {
    background-color: var(--oum-primary) !important;
}

[style*="#eef4fb" i] {
    background-color: var(--oum-primary-soft) !important;
}

/* Auth shell (layouts/admin.blade.php) still uses Bootstrap-4 button styling. */
.login-register .btn-primary,
.login-box .btn-primary {
    background-color: var(--oum-primary);
    border-color: var(--oum-primary);
}

.login-register .btn-primary:hover,
.login-box .btn-primary:hover {
    background-color: var(--oum-btn-hover-bg);
    border-color: var(--oum-btn-hover-bg);
}
