/**
 * lemay.css - The SAC War Room Aesthetic
 *
 * v3.0 - "1946 Analog Overhaul"
 *
 * Reference: Dr. Strangelove / 1940s Strategic Air Command
 * Steel Blue, Slate Grey, Off-White (Paper), Tungsten light
 * Metal Plotting Table, Stark Alert Red, High-Contrast Industrial
 *
 * NO CRT effects. NO Scanlines. NO Neon.
 * "Peace Is Our Profession"
 */

/* ========================================
   LeMay Doctrine Theme Variables
   ======================================== */
.theme-lemay {
    /* Steel/Industrial colors */
    --lemay-steel-dark: #2a3038;
    --lemay-steel-medium: #3a4048;
    --lemay-steel-light: #4a5058;
    --lemay-steel-highlight: #5a6068;

    /* Slate Blue (Cold, sterile) */
    --lemay-blue: #4a6080;
    --lemay-blue-dim: #3a5070;
    --lemay-blue-dark: #2a4060;
    --lemay-blue-light: #6a80a0;

    /* Paper/Document tones - Lightened for contrast */
    --lemay-paper: #f8f5ef;
    --lemay-paper-dim: #f0ece4;
    --lemay-paper-dark: #e0dcd4;

    /* Ink colors - Pure black for maximum contrast */
    --lemay-ink: #000000;
    --lemay-ink-blue: #002244;

    /* Header accent colors */
    --lemay-stamp-red: #b30000;
    --lemay-navy: #002244;

    /* Alert Red (Stark, not neon) */
    --lemay-red: #b41e1e;
    --lemay-red-bright: #cc2a2a;
    --lemay-red-dark: #8b1515;

    /* Tungsten/Amber indicators */
    --lemay-amber: #c89020;
    --lemay-amber-dim: #a07818;

    /* Override base variables */
    --paper-cream: #f0ece4;
    --paper-aged: #e0dcd4;
    --ink-black: #1a1a20;
    --ink-blue: #1a3050;
    --ink-red: #b41e1e;
}

/* ========================================
   Base Theme Application
   ======================================== */
.theme-lemay body,
.theme-lemay #desk {
    background: var(--lemay-steel-dark);
    font-family: 'Courier Prime', 'American Typewriter', 'Courier New', monospace;
}

.theme-lemay #desk {
    /* Industrial steel panel texture */
    background:
        /* Subtle brushed metal grain */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(255, 255, 255, 0.02) 1px,
            rgba(255, 255, 255, 0.02) 2px
        ),
        /* Steel gradient */
        linear-gradient(
            180deg,
            var(--lemay-steel-medium) 0%,
            var(--lemay-steel-dark) 50%,
            #1a2028 100%
        );
}

/* ========================================
   Header - Command Console
   ======================================== */
.theme-lemay #header {
    background: linear-gradient(180deg, #3a4550 0%, #2a3540 100%);
    border: 2px solid #1a2530;
    border-top-color: #4a5560;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 3px 8px rgba(0, 0, 0, 0.4);
}

.theme-lemay .title-area h1 {
    color: var(--lemay-paper);
    font-family: 'Courier Prime', 'Courier New', monospace;
    letter-spacing: 4px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.theme-lemay .title-area .subtitle {
    color: #8aa0c0;
    letter-spacing: 2px;
}

/* ========================================
   Status Bar - Tactical Display
   ======================================== */
.theme-lemay #status-bar {
    background: linear-gradient(180deg, var(--lemay-paper-dim) 0%, var(--lemay-paper-dark) 100%);
    border: 2px solid #a09890;
    border-top-color: #f0ece4;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-lemay .status-item {
    border-right-color: #a09890;
}

.theme-lemay .status-item .label {
    color: #2a2a30;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: bold;
    text-transform: uppercase;
}

.theme-lemay .status-item .value {
    color: #000000;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: bold;
}

.theme-lemay .status-item .value.usa {
    color: var(--lemay-navy);
}

.theme-lemay .status-item .value.ussr {
    color: var(--lemay-stamp-red);
}

.theme-lemay .status-item .vs {
    color: #3a3a40;
}

/* ========================================
   Kill Ratio Display (LeMay Victory Metric)
   ======================================== */
.kill-ratio-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    /* Metal instrument panel */
    background: linear-gradient(180deg, #3a4048 0%, #2a3038 100%);
    border: 2px solid #1a2028;
    border-top-color: #4a5058;
    border-radius: 3px;
    min-width: 180px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

.kill-ratio-label {
    font-size: 11px;
    color: var(--lemay-paper-dim);
    letter-spacing: 3px;
    margin-bottom: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.kill-ratio-value {
    font-size: 26px;
    font-weight: bold;
    font-family: 'Courier Prime', 'Courier New', monospace;
    color: var(--lemay-paper);
}

.kill-ratio-bar {
    width: 100%;
    height: 10px;
    background: #1a2028;
    border: 1px solid #0a1018;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.kill-ratio-fill {
    height: 100%;
    /* Gradient from red (danger) through amber to blue (safe) */
    background: linear-gradient(90deg,
        var(--lemay-red) 0%,
        var(--lemay-amber) 40%,
        var(--lemay-blue) 75%,
        var(--lemay-blue-light) 100%
    );
    transition: width 0.3s ease;
}

.kill-ratio-status {
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 2px;
    font-weight: bold;
    text-transform: uppercase;
}

.kill-ratio-status.winning {
    color: var(--lemay-blue-light);
    background: rgba(74, 96, 128, 0.3);
    border: 1px solid var(--lemay-blue);
}

.kill-ratio-status.superior {
    color: var(--lemay-blue);
    background: rgba(58, 80, 112, 0.25);
    border: 1px solid var(--lemay-blue-dim);
}

.kill-ratio-status.parity {
    color: var(--lemay-amber);
    background: rgba(200, 144, 32, 0.2);
    border: 1px solid var(--lemay-amber-dim);
}

.kill-ratio-status.inferior {
    color: var(--lemay-amber-dim);
    background: rgba(160, 120, 24, 0.2);
    border: 1px solid #806010;
}

.kill-ratio-status.losing {
    color: #ff6666;  /* Brightened from --lemay-red-bright for better contrast */
    background: rgba(180, 30, 30, 0.25);
    border: 1px solid var(--lemay-red);
    animation: alert-flash 1.5s infinite;
}

@keyframes alert-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========================================
   Map Area - Plotting Table
   ======================================== */
.theme-lemay #map-area {
    /* Metal plotting table surface */
    background: linear-gradient(180deg, #2a3038 0%, #1a2028 100%);
    border: 3px solid #1a2028;
    border-top-color: #3a4048;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4);
}

.theme-lemay .world-map-container {
    background: linear-gradient(180deg, #1a2028 0%, #0a1018 100%);
    border: 2px solid #0a1018;
    border-top-color: #2a3038;
}

.theme-lemay .map-title {
    color: var(--lemay-paper);
    font-family: 'Courier Prime', 'Courier New', monospace;
    letter-spacing: 4px;
    font-weight: bold;
}

.theme-lemay .region-summary {
    background: linear-gradient(180deg, #2a3038 0%, #1a2028 100%);
    border: 1px solid #3a4048;
}

.theme-lemay .region-summary .region-name {
    color: var(--lemay-paper);
    font-family: 'Georgia', serif;
}

.theme-lemay .country-chip {
    font-family: 'Courier Prime', 'Courier New', monospace;
}

.theme-lemay .country-chip.us {
    background: rgba(74, 96, 128, 0.25);
    border-color: var(--lemay-blue);
    color: var(--lemay-blue-light);
}

.theme-lemay .country-chip.ussr {
    background: rgba(180, 30, 30, 0.2);
    border-color: var(--lemay-red-dark);
    color: var(--lemay-red-bright);
}

.theme-lemay .country-chip.contested {
    background: rgba(200, 144, 32, 0.2);
    border-color: var(--lemay-amber-dim);
    color: var(--lemay-amber);
}

.theme-lemay .global-control-indicator {
    background: linear-gradient(180deg, #2a3038 0%, #1a2028 100%);
    border: 2px solid var(--lemay-blue-dark);
    color: var(--lemay-paper);
}

/* ========================================
   Action Panel - Command Console
   ======================================== */
.theme-lemay #action-panel {
    background: linear-gradient(180deg, #2a3038 0%, #1a2028 100%);
    border: 2px solid #1a2028;
    border-top-color: #3a4048;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.theme-lemay .action-header {
    border-bottom: 2px solid #3a4048;
}

.theme-lemay .action-header h2 {
    color: var(--lemay-paper);
    font-family: 'Courier Prime', 'Courier New', monospace;
    letter-spacing: 2px;
}

.theme-lemay .ap-display {
    color: var(--lemay-paper-dim);
}

/* Steel/Paper telegram cards - Fresh Ink */
.theme-lemay .telegram {
    background: linear-gradient(180deg, var(--lemay-paper) 0%, var(--lemay-paper-dim) 100%);
    border: 1px solid #8a8078;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.theme-lemay .telegram::before {
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        var(--lemay-navy) 10px,
        var(--lemay-navy) 20px
    );
}

.theme-lemay .action-name {
    color: var(--lemay-navy);
    font-weight: bold;
    font-size: 13px;
}

.theme-lemay .action-cost {
    background: var(--lemay-navy);
    color: #ffffff;
    border: 1px solid #001122;
    font-weight: bold;
}

.theme-lemay .telegram-body p {
    color: var(--lemay-ink);
    font-weight: 500;
}

.theme-lemay .telegram-body .stats {
    color: #3a3a40;
    font-weight: bold;
}

.theme-lemay .country-selector label {
    color: #2a2a30;
    font-weight: bold;
}

.theme-lemay .country-select {
    background: #ffffff;
    border: 2px solid #3a3a40;
    color: #000000;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: bold;
}

.theme-lemay .execute-btn {
    /* Steel toggle switch */
    background: linear-gradient(180deg, #4a5058 0%, #3a4048 100%);
    border: 2px solid #2a3038;
    border-top-color: #5a6068;
    color: var(--lemay-paper);
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: bold;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-lemay .execute-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #5a6068 0%, #4a5058 100%);
}

.theme-lemay .execute-btn:disabled {
    background: #2a3038;
    border-color: #1a2028;
    color: #7a8090;
}

.theme-lemay .end-turn-btn {
    /* Heavy brass/steel lever */
    background: linear-gradient(180deg, #4a5560 0%, #3a4550 50%, #2a3540 100%);
    border: 3px solid #1a2530;
    border-top-color: #5a6570;
    color: var(--lemay-paper);
    font-family: 'Courier Prime', 'Courier New', monospace;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.theme-lemay .end-turn-btn:hover {
    background: linear-gradient(180deg, #5a6570 0%, #4a5560 50%, #3a4550 100%);
}

/* ========================================
   SAC ALERT Button - The Sunday Punch
   ======================================== */
.sac-alert-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--lemay-red-dark);
}

.sac-alert-btn {
    width: 100%;
    padding: 15px 20px;
    /* Heavy emergency switch - stark red */
    background: linear-gradient(180deg, #a02020 0%, #801818 50%, #601010 100%);
    border: 3px solid #400808;
    border-top-color: #c02828;
    border-radius: 3px;
    color: var(--lemay-paper);
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

/* No sweep animation - static, industrial */
.sac-alert-btn::before {
    display: none;
}

.sac-alert-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #b82828 0%, #902020 50%, #701818 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.25),
        0 5px 12px rgba(80, 0, 0, 0.4);
}

.sac-alert-btn:disabled {
    background: linear-gradient(180deg, #3a3a40 0%, #2a2a30 100%);
    border-color: #1a1a20;
    color: #5a5a60;
    cursor: not-allowed;
}

.sac-alert-label {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

.sac-alert-subtitle {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    letter-spacing: 1px;
}

.sac-alert-cost {
    display: block;
    font-size: 11px;
    color: var(--lemay-amber);
    margin-top: 5px;
}

.sac-alert-used {
    width: 100%;
    padding: 15px;
    background: #1a2028;
    border: 2px solid #2a3038;
    border-radius: 3px;
    color: #5a6068;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-size: 12px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ========================================
   Tension/DEFCON Override
   ======================================== */
.theme-lemay .tension-status {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: bold;
}

.theme-lemay .tension-calm {
    background: var(--lemay-blue);
    color: var(--lemay-paper);
}

.theme-lemay .tension-concerned {
    background: #4a6050;
    color: var(--lemay-paper);
}

.theme-lemay .tension-mobilizing {
    background: var(--lemay-amber-dim);
    color: #1a1a20;
}

.theme-lemay .tension-ready {
    background: #a05020;
    color: var(--lemay-paper);
}

.theme-lemay .tension-imminent {
    background: var(--lemay-red);
    color: var(--lemay-paper);
    animation: alert-flash 1.5s infinite;
}

/* ========================================
   Domestic Stats Override
   ======================================== */
.theme-lemay .domestic-stat.domestic-ok {
    background: var(--lemay-blue);
    color: var(--lemay-paper);
}

.theme-lemay .domestic-stat.domestic-warning {
    background: var(--lemay-amber-dim);
    color: #1a1a20;
}

.theme-lemay .domestic-stat.domestic-low {
    background: var(--lemay-red);
    color: var(--lemay-paper);
}

/* ========================================
   Footer - Command Status
   ======================================== */
.theme-lemay #footer {
    background: #1a2028;
    border-top: 1px solid #2a3038;
}

.theme-lemay .classification {
    color: #dd3333;
    font-weight: bold;
    letter-spacing: 2px;
}

.theme-lemay .version {
    color: var(--lemay-paper-dim);
}

/* ========================================
   Crisis Modal Override - Stark Headers
   ======================================== */
.theme-lemay .crisis-modal {
    background: linear-gradient(180deg, var(--lemay-paper) 0%, var(--lemay-paper-dim) 100%);
    border: 4px solid var(--lemay-stamp-red);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.theme-lemay .crisis-title {
    color: var(--lemay-stamp-red);
    font-family: 'Georgia', serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-lemay .crisis-description {
    color: #000000;
    font-weight: 500;
}

.theme-lemay .red-phone {
    background: var(--lemay-red);
    box-shadow: 0 4px 12px rgba(100, 0, 0, 0.4);
}

.theme-lemay .phone-ring {
    border-color: var(--lemay-red-bright);
}

.theme-lemay .crisis-btn {
    font-family: 'Courier Prime', 'Courier New', monospace;
    background: var(--lemay-paper-dim);
    border: 2px solid #a09890;
    color: var(--lemay-ink);
}

.theme-lemay .crisis-btn:hover {
    background: var(--lemay-paper);
    border-color: var(--lemay-blue);
}

.theme-lemay .crisis-btn.escalate {
    background: linear-gradient(180deg, #a02020 0%, #801818 100%);
    border-color: #601010;
    color: var(--lemay-paper);
}

.theme-lemay .crisis-btn.escalate:hover {
    background: linear-gradient(180deg, #b82828 0%, #902020 100%);
}

/* ========================================
   Action Log Override - Fresh Ink Teletype
   ======================================== */
.theme-lemay .action-log-container {
    background: linear-gradient(180deg, var(--lemay-paper) 0%, var(--lemay-paper-dim) 100%);
    border: 2px solid #6a6058;
}

.theme-lemay .log-header {
    background: linear-gradient(180deg, var(--lemay-paper-dim) 0%, var(--lemay-paper-dark) 100%);
    border-bottom-color: #8a8078;
}

.theme-lemay .log-title {
    color: var(--lemay-navy);
    font-weight: bold;
}

.theme-lemay .log-status {
    color: var(--lemay-stamp-red);
    font-weight: bold;
}

.theme-lemay .log-content {
    color: #000000;
    font-weight: 500;
}

.theme-lemay .log-entry.usa-entry {
    border-left-color: var(--lemay-navy);
    color: #000000;
}

.theme-lemay .log-entry.ussr-entry {
    border-left-color: var(--lemay-stamp-red);
    color: var(--lemay-stamp-red);
    font-weight: bold;
}

/* ========================================
   Vignette Override - Tungsten Lighting
   ======================================== */
.theme-lemay::before {
    background: radial-gradient(
        ellipse at 50% 30%,
        transparent 35%,
        rgba(10, 20, 30, 0.25) 75%,
        rgba(5, 10, 20, 0.45) 100%
    );
}

/* No scanlines - clean industrial */
.theme-lemay::after {
    display: none;
}

/* ========================================
   Notification Override
   ======================================== */
.theme-lemay .notification {
    font-family: 'Courier Prime', 'Courier New', monospace;
    border: 2px solid;
    font-weight: bold;
}

.theme-lemay .notification.success {
    background: var(--lemay-blue);
    color: var(--lemay-paper);
    border-color: var(--lemay-blue-dark);
}

.theme-lemay .notification.error {
    background: var(--lemay-red);
    color: var(--lemay-paper);
    border-color: var(--lemay-red-dark);
}

/* ========================================
   Cost Modifiers (LeMay Doctrine)
   ======================================== */
.theme-lemay .action-cost.cost-discount {
    background: var(--lemay-blue);
    color: var(--lemay-paper);
    border: 1px solid var(--lemay-blue-dark);
}

.theme-lemay .action-cost.cost-markup {
    background: var(--lemay-red-dark);
    color: var(--lemay-paper);
    border: 1px solid #601010;
}

/* General cost modifier styling (works outside LeMay theme too) */
.action-cost.cost-discount {
    background: #2a5070 !important;
    color: #f0ece4 !important;
}

.action-cost.cost-markup {
    background: #802020 !important;
    color: #f0ece4 !important;
}
