/**
 * wallace.css - The Progressive Campaign Aesthetic
 *
 * v2.5 - "The Road Not Taken Update"
 *
 * Reference: 1948 Progressive Party / Post-War Optimism
 * Clean White/Soft Cream, Navy Blue and Slate Grey, Campaign Button accents
 * Typography: Futura or clean Geometric Sans-Serif (The font of progress)
 * Open, airy, optimistic - a stark contrast to the claustrophobic LeMay bunker
 *
 * "The American fascists are most easily recognized by their deliberate
 *  perversion of truth and fact."
 *
 * NO bunkers. NO war rooms. Civilian office, not military command.
 */

/* ========================================
   Wallace Doctrine Theme Variables
   ======================================== */
.theme-wallace {
    /* Background tones - Clean and airy */
    --wallace-white: #ffffff;
    --wallace-cream: #faf9f7;
    --wallace-cream-dim: #f5f4f2;
    --wallace-cream-dark: #ebe9e5;

    /* Text colors - Navy and Slate */
    --wallace-navy: #1a365d;
    --wallace-navy-light: #2c5282;
    --wallace-slate: #4a5568;
    --wallace-slate-light: #718096;

    /* Campaign Button accents - Patriotic but hopeful */
    --wallace-blue: #3182ce;
    --wallace-blue-light: #4299e1;
    --wallace-red: #c53030;
    --wallace-red-light: #e53e3e;

    /* Trust/Progress colors */
    --wallace-trust-low: #e53e3e;
    --wallace-trust-mid: #d69e2e;
    --wallace-trust-high: #38a169;
    --wallace-trust-victory: #2b6cb0;

    /* Accent colors */
    --wallace-gold: #d69e2e;
    --wallace-green: #38a169;

    /* Override base variables */
    --paper-cream: #faf9f7;
    --paper-aged: #f5f4f2;
    --ink-black: #1a365d;
    --ink-blue: #2c5282;
    --ink-red: #c53030;
}

/* ========================================
   Base Theme Application - Civilian Office
   ======================================== */
.theme-wallace body,
.theme-wallace #desk {
    background: var(--wallace-cream);
    font-family: 'Futura', 'Century Gothic', 'Avenir', 'Helvetica Neue', sans-serif;
}

.theme-wallace #desk {
    /* Clean, open office look */
    background:
        /* Subtle texture */
        linear-gradient(
            180deg,
            var(--wallace-white) 0%,
            var(--wallace-cream) 30%,
            var(--wallace-cream-dim) 100%
        );
}

/* ========================================
   Header - Campaign Banner
   ======================================== */
.theme-wallace #header {
    background: linear-gradient(180deg, var(--wallace-white) 0%, var(--wallace-cream) 100%);
    border: none;
    border-bottom: 3px solid var(--wallace-navy);
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.1);
}

.theme-wallace .title-area h1 {
    color: var(--wallace-navy);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    letter-spacing: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.theme-wallace .title-area .subtitle {
    color: var(--wallace-slate);
    letter-spacing: 3px;
    font-size: 11px;
    font-weight: 500;
}

/* ========================================
   Status Bar - Clean Dashboard
   ======================================== */
.theme-wallace #status-bar {
    background: var(--wallace-white);
    border: 1px solid var(--wallace-cream-dark);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.theme-wallace .status-item {
    border-right-color: var(--wallace-cream-dark);
}

.theme-wallace .status-item .label {
    color: var(--wallace-slate);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.theme-wallace .status-item .value {
    color: var(--wallace-navy);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    font-weight: 700;
}

.theme-wallace .status-item .value.usa {
    color: var(--wallace-blue);
}

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

.theme-wallace .status-item .vs {
    color: var(--wallace-slate-light);
}

/* ========================================
   Global Trust Display (Wallace Victory Metric)
   ======================================== */
.global-trust-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    /* Clean, modern look */
    background: var(--wallace-white);
    border: 2px solid var(--wallace-blue);
    border-radius: 6px;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.15);
    position: relative;
}

/* Optimistic badge */
.global-trust-display::before {
    content: 'PEACE INITIATIVE';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: var(--wallace-white);
    background: var(--wallace-blue);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 1px;
    font-weight: 600;
}

.global-trust-label {
    font-size: 11px;
    color: var(--wallace-navy);
    letter-spacing: 3px;
    margin-bottom: 4px;
    margin-top: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

.global-trust-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    color: var(--wallace-navy);
}

.global-trust-bar {
    width: 100%;
    height: 10px;
    background: var(--wallace-cream-dark);
    border-radius: 5px;
    margin-top: 6px;
    overflow: hidden;
}

.global-trust-fill {
    height: 100%;
    /* Gradient from distrust (red) through engaged (gold) to trusted (blue) */
    background: linear-gradient(90deg,
        var(--wallace-trust-low) 0%,
        var(--wallace-trust-mid) 40%,
        var(--wallace-trust-high) 70%,
        var(--wallace-trust-victory) 100%
    );
    border-radius: 5px;
    transition: width 0.3s ease;
}

.global-trust-status {
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.global-trust-status.victory {
    color: var(--wallace-white);
    background: var(--wallace-trust-victory);
}

.global-trust-status.trusted {
    color: var(--wallace-trust-victory);
    background: rgba(43, 108, 176, 0.15);
    border: 1px solid var(--wallace-trust-victory);
}

.global-trust-status.respected {
    color: var(--wallace-trust-high);
    background: rgba(56, 161, 105, 0.15);
    border: 1px solid var(--wallace-trust-high);
}

.global-trust-status.engaged {
    color: var(--wallace-trust-mid);
    background: rgba(214, 158, 46, 0.15);
    border: 1px solid var(--wallace-trust-mid);
}

.global-trust-status.skeptical {
    color: var(--wallace-slate);
    background: rgba(74, 85, 104, 0.1);
    border: 1px solid var(--wallace-slate-light);
}

.global-trust-status.distrusted {
    color: var(--wallace-trust-low);
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid var(--wallace-trust-low);
}

/* ========================================
   Map Area - Bright World Map
   ======================================== */
.theme-wallace #map-area {
    /* Lighter, less threatening map */
    background: var(--wallace-cream);
    border: 1px solid var(--wallace-cream-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

.theme-wallace .world-map-container {
    background: var(--wallace-white);
    border: 1px solid var(--wallace-cream-dark);
    border-radius: 4px;
}

.theme-wallace .map-title {
    color: var(--wallace-navy);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    letter-spacing: 3px;
    font-weight: 600;
}

.theme-wallace .region-summary {
    background: var(--wallace-white);
    border: 1px solid var(--wallace-cream-dark);
    border-radius: 4px;
}

.theme-wallace .region-summary .region-name {
    color: var(--wallace-navy);
    font-weight: 600;
}

.theme-wallace .country-chip {
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    border-radius: 12px;
}

/* Friendly blue for allies */
.theme-wallace .country-chip.us {
    background: rgba(49, 130, 206, 0.15);
    border-color: var(--wallace-blue);
    color: var(--wallace-blue);
}

/* Softer red for USSR */
.theme-wallace .country-chip.ussr {
    background: rgba(197, 48, 48, 0.1);
    border-color: var(--wallace-red);
    color: var(--wallace-red);
}

.theme-wallace .country-chip.contested {
    background: rgba(214, 158, 46, 0.12);
    border-color: var(--wallace-gold);
    color: var(--wallace-slate);
}

.theme-wallace .global-control-indicator {
    background: var(--wallace-white);
    border: 2px solid var(--wallace-navy);
    border-radius: 4px;
    color: var(--wallace-navy);
}

/* ========================================
   Action Panel - Policy Memo
   ======================================== */
.theme-wallace #action-panel {
    background: var(--wallace-white);
    border: 1px solid var(--wallace-cream-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

.theme-wallace .action-header {
    border-bottom: 1px solid var(--wallace-cream-dark);
}

.theme-wallace .action-header h2 {
    color: var(--wallace-navy);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    letter-spacing: 2px;
    font-weight: 600;
}

.theme-wallace .ap-display {
    color: var(--wallace-slate);
}

/* Telegram cards - Clean policy cards */
.theme-wallace .telegram {
    background: var(--wallace-white);
    border: 1px solid var(--wallace-cream-dark);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.theme-wallace .telegram::before {
    /* Campaign stripe */
    background: linear-gradient(90deg,
        var(--wallace-blue) 0%,
        var(--wallace-blue) 50%,
        var(--wallace-red) 50%,
        var(--wallace-red) 100%
    );
    opacity: 0.8;
    height: 3px;
}

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

.theme-wallace .action-cost {
    background: var(--wallace-blue);
    color: var(--wallace-white);
    border-radius: 12px;
    font-weight: 600;
    padding: 2px 10px;
}

.theme-wallace .telegram-body p {
    color: var(--wallace-slate);
}

.theme-wallace .telegram-body .stats {
    color: var(--wallace-navy);
    font-weight: 600;
}

.theme-wallace .country-selector label {
    color: var(--wallace-slate);
    font-weight: 500;
}

.theme-wallace .country-select {
    background: var(--wallace-white);
    border: 1px solid var(--wallace-cream-dark);
    color: var(--wallace-navy);
    border-radius: 4px;
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
}

.theme-wallace .execute-btn {
    /* Clean, optimistic button */
    background: linear-gradient(180deg, var(--wallace-blue-light) 0%, var(--wallace-blue) 100%);
    border: none;
    border-radius: 4px;
    color: var(--wallace-white);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(49, 130, 206, 0.3);
}

.theme-wallace .execute-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #5db4f0 0%, var(--wallace-blue-light) 100%);
    box-shadow: 0 3px 8px rgba(49, 130, 206, 0.4);
}

.theme-wallace .execute-btn:disabled {
    background: var(--wallace-cream-dark);
    color: var(--wallace-slate-light);
    box-shadow: none;
}

.theme-wallace .end-turn-btn {
    /* Hopeful end turn button */
    background: linear-gradient(180deg, var(--wallace-navy-light) 0%, var(--wallace-navy) 100%);
    border: none;
    border-radius: 6px;
    color: var(--wallace-white);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.3);
}

.theme-wallace .end-turn-btn:hover {
    background: linear-gradient(180deg, #3a6ea8 0%, var(--wallace-navy-light) 100%);
}

/* ========================================
   PROPOSE TREATY Button - The Grand Bargain
   ======================================== */
.grand-bargain-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed var(--wallace-blue);
}

.grand-bargain-btn {
    width: 100%;
    padding: 18px 20px;
    /* Hopeful, bold - like a peace initiative */
    background: linear-gradient(180deg, var(--wallace-green) 0%, #2f855a 100%);
    border: none;
    border-radius: 8px;
    color: var(--wallace-white);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.35);
}

/* Peace dove icon */
.grand-bargain-btn::before {
    content: '\2721';  /* Six pointed star - symbol of unity */
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 18px;
    opacity: 0.8;
}

.grand-bargain-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #48bb78 0%, var(--wallace-green) 100%);
    box-shadow: 0 6px 16px rgba(56, 161, 105, 0.45);
    transform: translateY(-1px);
}

.grand-bargain-btn:disabled {
    background: var(--wallace-cream-dark);
    color: var(--wallace-slate-light);
    cursor: not-allowed;
    box-shadow: none;
}

.grand-bargain-btn:disabled::before {
    opacity: 0.3;
}

.grand-bargain-label {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.grand-bargain-subtitle {
    display: block;
    font-size: 11px;
    font-style: italic;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-transform: none;
    font-weight: 400;
    margin-bottom: 6px;
}

.grand-bargain-cost {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    text-transform: none;
    letter-spacing: 0.5px;
    font-weight: 500;
    opacity: 0.9;
}

.grand-bargain-cost.cost-danger {
    color: #ffc107;
    font-weight: 700;
}

.grand-bargain-used {
    width: 100%;
    padding: 18px;
    background: linear-gradient(180deg, var(--wallace-cream) 0%, var(--wallace-cream-dim) 100%);
    border: 2px solid var(--wallace-green);
    border-radius: 8px;
    color: var(--wallace-green);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    font-size: 12px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Grand Bargain Status */
.grand-bargain-status {
    margin-top: 10px;
    padding: 12px 15px;
    background: rgba(214, 158, 46, 0.1);
    border: 2px solid var(--wallace-gold);
    border-radius: 6px;
}

.grand-bargain-status-label {
    display: block;
    font-size: 10px;
    color: #a07a1a;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.grand-bargain-warning {
    font-size: 11px;
    color: var(--wallace-slate);
    line-height: 1.5;
}

/* ========================================
   Tension/DEFCON Override - Calmer colors
   ======================================== */
.theme-wallace .tension-status {
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    font-weight: 600;
    border-radius: 4px;
}

.theme-wallace .tension-calm {
    background: var(--wallace-green);
    color: var(--wallace-white);
}

.theme-wallace .tension-concerned {
    background: var(--wallace-gold);
    color: #1a1a10;
}

.theme-wallace .tension-mobilizing {
    background: #ed8936;
    color: var(--wallace-white);
}

.theme-wallace .tension-ready {
    background: var(--wallace-red);
    color: var(--wallace-white);
}

.theme-wallace .tension-imminent {
    background: #9b2c2c;
    color: var(--wallace-white);
}

/* ========================================
   Domestic Stats Override
   ======================================== */
.theme-wallace .domestic-stat {
    border-radius: 4px;
}

.theme-wallace .domestic-stat.domestic-ok {
    background: var(--wallace-green);
    color: var(--wallace-white);
}

.theme-wallace .domestic-stat.domestic-warning {
    background: var(--wallace-gold);
    color: #1a1a10;
}

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

/* ========================================
   Footer - Clean footer
   ======================================== */
.theme-wallace #footer {
    background: var(--wallace-cream);
    border-top: 1px solid var(--wallace-cream-dark);
}

.theme-wallace .classification {
    color: var(--wallace-blue);
    font-weight: 600;
    letter-spacing: 2px;
}

.theme-wallace .version {
    color: var(--wallace-slate-light);
}

/* ========================================
   Crisis Modal Override - Diplomatic Brief
   ======================================== */
.theme-wallace .crisis-modal {
    background: var(--wallace-white);
    border: 2px solid var(--wallace-navy);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.theme-wallace .crisis-title {
    color: var(--wallace-navy);
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-wallace .crisis-description {
    color: var(--wallace-slate);
}

.theme-wallace .red-phone {
    background: var(--wallace-blue);
    box-shadow: 0 3px 8px rgba(49, 130, 206, 0.4);
}

.theme-wallace .phone-ring {
    border-color: var(--wallace-blue);
}

.theme-wallace .crisis-btn {
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    background: var(--wallace-cream);
    border: 1px solid var(--wallace-cream-dark);
    color: var(--wallace-navy);
    border-radius: 4px;
    font-weight: 500;
}

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

/* Diplomatic button gets special emphasis for Wallace */
.theme-wallace .crisis-btn.diplomatic {
    background: linear-gradient(180deg, var(--wallace-blue-light) 0%, var(--wallace-blue) 100%);
    border: none;
    color: var(--wallace-white);
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

.theme-wallace .crisis-btn.diplomatic:hover {
    background: linear-gradient(180deg, #5db4f0 0%, var(--wallace-blue-light) 100%);
}

.theme-wallace .crisis-btn.escalate {
    background: var(--wallace-cream-dark);
    border-color: var(--wallace-red);
    color: var(--wallace-red);
    opacity: 0.7;
}

.theme-wallace .crisis-btn.escalate:hover {
    opacity: 1;
    background: rgba(197, 48, 48, 0.1);
}

/* ========================================
   Action Log Override - Clean Report
   ======================================== */
.theme-wallace .action-log-container {
    background: var(--wallace-white);
    border: 1px solid var(--wallace-cream-dark);
    border-radius: 6px;
}

.theme-wallace .log-header {
    background: var(--wallace-cream);
    border-bottom-color: var(--wallace-cream-dark);
    border-radius: 6px 6px 0 0;
}

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

.theme-wallace .log-status {
    color: var(--wallace-green);
    font-weight: 600;
}

.theme-wallace .log-content {
    color: var(--wallace-slate);
}

.theme-wallace .log-entry.usa-entry {
    border-left-color: var(--wallace-blue);
    color: var(--wallace-navy);
}

.theme-wallace .log-entry.ussr-entry {
    border-left-color: var(--wallace-red);
    color: var(--wallace-red);
}

/* Wallace-specific log entries (Trust gains/losses) */
.theme-wallace .log-entry.wallace-entry {
    border-left-color: var(--wallace-green);
    color: var(--wallace-green);
}

/* ========================================
   Vignette Override - Bright, no shadows
   ======================================== */
.theme-wallace::before {
    /* Very subtle, almost invisible vignette */
    background: radial-gradient(
        ellipse at 50% 50%,
        transparent 60%,
        rgba(250, 249, 247, 0.3) 100%
    );
}

/* No scanlines - clean and modern */
.theme-wallace::after {
    display: none;
}

/* ========================================
   Notification Override
   ======================================== */
.theme-wallace .notification {
    font-family: 'Futura', 'Century Gothic', 'Avenir', sans-serif;
    border: none;
    border-radius: 6px;
    font-weight: 500;
}

.theme-wallace .notification.success {
    background: var(--wallace-green);
    color: var(--wallace-white);
}

.theme-wallace .notification.error {
    background: var(--wallace-red);
    color: var(--wallace-white);
}

/* ========================================
   Cost Modifiers (Wallace Doctrine)
   ======================================== */
.theme-wallace .action-cost.cost-discount {
    background: var(--wallace-green);
    color: var(--wallace-white);
}

.theme-wallace .action-cost.cost-markup {
    background: var(--wallace-red);
    color: var(--wallace-white);
}

/* ========================================
   Game Over - Wallace Victory/Defeat
   ======================================== */
.theme-wallace .game-over.wallace-victory {
    border-color: var(--wallace-green);
    background: linear-gradient(180deg, var(--wallace-white) 0%, rgba(56, 161, 105, 0.1) 100%);
}

.theme-wallace .game-over.wallace-victory .stamp {
    background: var(--wallace-green);
    color: var(--wallace-white);
}

.theme-wallace .game-over.soft-on-communism {
    border-color: var(--wallace-red);
    background: linear-gradient(180deg, var(--wallace-white) 0%, rgba(197, 48, 48, 0.1) 100%);
}

.theme-wallace .game-over.soft-on-communism .stamp {
    background: var(--wallace-red);
    color: var(--wallace-white);
}

/* ========================================
   Advisor Selection Override
   ======================================== */
.theme-wallace .advisor-overlay {
    background: rgba(250, 249, 247, 0.98);
}

.theme-wallace .advisor-modal {
    background: var(--wallace-white);
}

.theme-wallace .advisor-card {
    border: 1px solid var(--wallace-cream-dark);
    border-radius: 8px;
    background: var(--wallace-white);
}

.theme-wallace .advisor-card:hover {
    border-color: var(--wallace-blue);
    box-shadow: 0 4px 16px rgba(49, 130, 206, 0.2);
}

.theme-wallace .advisor-select-btn {
    background: linear-gradient(180deg, var(--wallace-blue-light) 0%, var(--wallace-blue) 100%);
    border: none;
    border-radius: 4px;
    color: var(--wallace-white);
    font-weight: 600;
}

.theme-wallace .advisor-select-btn:hover {
    background: linear-gradient(180deg, #5db4f0 0%, var(--wallace-blue-light) 100%);
}
