/**
 * nw-components.css
 * NukeWorker Shared Component Library — ACTIVE subset
 *
 * Loaded on every page. Contains only :root design tokens + the components
 * that pages actually reference today. Slim by design to keep critical-path
 * CSS small.
 *
 * The FULL forward-looking design system (KPI, badge, btn, alert, table,
 * controls, grid, tip, status-dot, pill-nav, search, collapse) lives in
 * /includes/nw-components-library.css and is NOT loaded site-wide. When a
 * page is ready to adopt one of those components, copy the relevant rules
 * over here (or load the library on that page specifically).
 *
 * Active components:
 *   - Card (.nw-card, .nw-card-header, .nw-card-body, .nw-card--static)
 *
 * Dark mode overrides use body.theme-nuclear from dark_colors.css.
 */


/* ==========================================================================
   DESIGN TOKENS
   Self-contained :root so tokens are available even when nuke2026a.css
   is not loaded (most pages load nuke2026.css instead). Values are
   intentionally identical to nuke2026a.css — whichever loads last wins
   with the same result.
   ========================================================================== */

:root {
    /* Core Palette */
    --nuke-blue: #346699;
    --nuke-blue-dark: #1e3c72;
    --nuke-blue-light: #5183b6;
    --nuke-gold: #FFD700;
    --nuke-gold-dark: #ccac00;

    /* Neutral Palette */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e4e8;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;

    /* Typography */
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-condensed: "Arial Narrow", "Helvetica Inserat", "sans-serif-condensed", sans-serif;

    /* Status Colors */
    --status-online: #27ae60;
    --status-offline: #c0392b;
    --status-reduced: #e67e22;
    --status-coastdown: #3498db;
    --status-startup: #f1c40f;
    --status-b2b: #8e44ad;

    /* Semantic Colors */
    --color-success: #27ae60;
    --color-danger: #c0392b;
    --color-warning: #f39c12;
    --color-info: #3498db;

    /* Gray Scale */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #1a2a3a;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 20px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-tooltip: 0 4px 12px rgba(0,0,0,0.2);

    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #1a2a3a 0%, #346699 100%);
    --gradient-blue-rev: linear-gradient(135deg, #346699 0%, #1e3c72 100%);
    --gradient-hero: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #346699 100%);
    --gradient-sidebar: linear-gradient(135deg, #346699 0%, #2a5298 50%, #1e3c72 100%);
}


/* ==========================================================================
   CARD
   Generic container card with subtle border, shadow, and hover lift.
   ========================================================================== */

.nw-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nw-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.nw-card-header {
    background: var(--gradient-blue);
    color: #fff;
    padding: 15px var(--space-5);
    font-weight: 700;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nw-card-header i {
    color: #fff;
    transition: color 0.3s;
}

.nw-card:hover .nw-card-header i {
    color: var(--nuke-gold);
}

.nw-card-body {
    padding: var(--space-5);
}

/* No-hover variant for static cards */
.nw-card--static:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}


/* ==========================================================================
   DARK MODE OVERRIDES (body.theme-nuclear)
   ========================================================================== */

body.theme-nuclear .nw-card {
    background: var(--nw-strong-grey) !important;
    border-color: var(--nw-classy-grey) !important;
}
body.theme-nuclear .nw-card-header {
    background: var(--nw-olympian-blue) !important;
    border-bottom: 2px solid var(--nw-aureoline) !important;
}
body.theme-nuclear .nw-card:hover .nw-card-header i {
    color: var(--nw-aureoline) !important;
}
