/* ============================================================================
   File:    TMDWebUserControl/Content/themes.css
   Project: TMDWebUserControl
   Purpose: Shared CSS custom properties (variables) for brand theming
            across the nav control, master page chrome, and (eventually)
            page content. Linked from each master page's <head>.

   Theme application:
     * Default: TMDSAS navy palette — applied at :root
     * JAMP override: blue/indigo palette (texasjamp.org) — applied when
       <body class="theme-jamp">

   Relation to ResponsiveNavigation.css:
     That file has its own --nav-* variables. The --brand-* variables here
     are additional, for page chrome (header, buttons, forms). The JAMP nav
     still needs a matching body.theme-jamp { --nav-* } override added there
     — it does NOT inherit these --brand-* overrides.

   Contrast compliance:
     Brand primaries meet WCAG AA (4.5:1) for text on white:
       TMDSAS #162a3a: ≈14.7:1 on white
       JAMP   #264180: ≈9.8:1  on white
     NOTE: JAMP --brand-secondary (#C6D6D7) and --brand-tertiary (#B9E367)
     are LIGHT colors — pair them with dark text, never --brand-on-primary.
     --brand-primary-hover (#5373C6) is ~4.5:1 with white: fine as text-on-
     white, borderline as a white-text background — verify per use.
     Status colors fixed regardless of theme.
   ============================================================================ */

:root {
    /* ---------- Brand (TMDSAS — refreshed palette) ---------- */
    --brand-primary: #162a3a; /* deep navy -- was #057ab2 (legacy blue) */
    --brand-primary-hover: #334e50; /* hover shade */
    --brand-primary-active: #0e1f2c; /* darker shade for :active state */
    --brand-accent: #e06045; /* warm orange accent */
    --brand-secondary: #9eb9d4; /* PROVISIONAL - confirm official TMDSAS secondary */
    --brand-tertiary: #e06045; /* PROVISIONAL - confirm official TMDSAS tertiary */
    --brand-tint-lightest: #f7f7f7;
    --brand-tint-light: #dbe6e6;
    --brand-tint-medium: #9eb9d4;
    --brand-on-primary: #ffffff;
    /* ---------- Neutral palette (theme-independent) ---------- */
    --surface-bg: #ffffff;
    --surface-bg-alt: #f8f9fa;
    --surface-border: #dee2e6;
    --surface-border-strong: #adb5bd;
    --text-default: #212529;
    --text-muted: #666666;
    --text-inverse: #ffffff;
    /* ---------- Status (fixed across themes) ---------- */
    --status-success: #198754;
    --status-success-bg: #d1e7dd;
    --status-warning: #997404;
    --status-warning-bg: #fff3cd;
    --status-danger: #cc0000;
    --status-danger-bg: #f8d7da;
    --status-info: #055160;
    --status-info-bg: #cff4fc;
    /* ---------- Focus ring (never removed, never outline:none) ---------- */
    --focus-ring: #0a58ca;
    --focus-ring-width: 2px;
    --focus-ring-offset: 2px;
    /* ---------- Typography & sizing primitives ---------- */
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --transition-fast: 150ms ease-in-out;
    --transition-med: 250ms ease-in-out;

    /* ---------- Additional variables for backward compatibility with Advisor/School ---------- */
    --color-primary: var(--brand-primary);
    --color-primary-hover: var(--brand-primary-hover);
    --color-primary-active: var(--brand-primary-active);
    --color-secondary: #2b4593;
    --color-secondary-hover: #243a7d;
    --color-accent: var(--brand-accent);
    --color-on-primary: var(--brand-on-primary);
    --color-error: #b01a09;
    --color-error-bg: #fdf2f1;
    --color-success: #2e6b4a;
    --color-success-bg: var(--status-success-bg);
    --color-warning: var(--status-warning);
    --color-warning-bg: var(--status-warning-bg);
    --color-info: var(--status-info);
    --color-info-bg: var(--status-info-bg);
    --text-body: var(--text-default);
    --surface-neutral: var(--surface-bg-alt);
    --surface-field: #e3eef3;
    --surface-table: #b2c0eb;
    --surface-highlight: #fbf8ea;
    --chrome-height: 280px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
}

/* ---------- JAMP theme override (official - texasjamp.org) ---------- */

body.theme-jamp {
    /* Core brand */
    --brand-primary: #264180; /* deep blue/indigo (≈9.8:1 on white) */
    --brand-primary-hover: #5373C6; /* lighter blue - see contrast note in header */
    --brand-primary-active: #182952;
    --brand-accent: #474D9E; /* indigo accent */
    --brand-secondary: #C6D6D7; /* LIGHT - dark text only, not --brand-on-primary */
    --brand-tertiary: #B9E367; /* LIGHT lime - dark text only, not --brand-on-primary */
    /* Tints */
    --brand-tint-lightest: #F7F9FC;
    --brand-tint-light: #EEF3F7;
    --brand-tint-medium: #C6D6D773; /* 8-digit hex = ~45% alpha (translucent) */
    /* Aliases for backward compatibility */
    --color-primary:          var(--brand-primary);
    --color-primary-hover:    var(--brand-primary-hover);
    --color-primary-active:   var(--brand-primary-active);
    --color-accent:           var(--brand-accent);
    /* --brand-on-primary, surfaces, status colors, focus ring inherit from :root */
}

/* ---------- Reduced motion — global ---------- */

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0s;
        --transition-med: 0s;
    }
}
