/* ============================================================
   briefing-modal-era.css — Era-Overrides für Briefing-Modal
   ============================================================
   Author: Googli (Frontend) — 2026-05-06
   Bug: id="briefing-modal" zeigt in Era 2/3/4 hardcoded
        Era-1-Optik (XP-blau Forecast, helle Card-BGs, fixe
        2px Radius, fixe graue Texte). Sieht in Dark-Era 4
        besonders kaputt aus (heller Text auf hellem BG).

   Strategie: Higher-Specificity-Overrides via
   "body.era-eN #briefing-modal-body .X" — schlagen das
   inline-injected <style> in marketing-polish.js, weil
   eine zusätzliche Klasse (.era-eN) die Spezifität anhebt.

   Dabei: Wo möglich CSS-Variablen aus eras.css verwenden
   (--win-bg, --text, --accent-blue, --radius, etc.), damit
   Era-Theming automatisch greift.
   ============================================================ */


/* ==========================================================
   GENERISCHE BASIS — gilt für alle Eras: respektiere --radius
   so dass das Modal nicht überall Win95-Kanten zeigt.
   (Era 1 hat --radius:0px, also no-op dort.)
   ========================================================== */
body.era #briefing-modal-body .brf-forecast,
body.era #briefing-modal-body .brf-card,
body.era #briefing-modal-body .brf-tag,
body.era #briefing-modal-body .brf-locked,
body.era #briefing-modal-body .brf-hero-tag {
    border-radius: var(--radius, 2px);
}


/* ============================================================
   ÄRA 2 — XP Luna (Glossy Beige, dunkelblaue Akzente)
   ============================================================
   Forecast soll XP-Luna-Style: weiches Beige+Blau passend zur
   XP-Palette, nicht das hardcoded #f8fbff Bonbonblau.
   Cards: XP-Beige statt grauer #fcfcfc.
   ============================================================ */

/* Forecast-Kasten — XP-Luna Beige+Blau */
body.era-e2 #briefing-modal-body .brf-forecast {
    background: linear-gradient(180deg, #fdfdfa 0%, #ece9d8 100%);
    border: 1px solid #aca899;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 #fff;
}
body.era-e2 #briefing-modal-body .brf-forecast h4 {
    color: #00309c;                          /* XP-Dark-Blue */
}

/* Cards — XP-Luna Beige */
body.era-e2 #briefing-modal-body .brf-card {
    background: #f5f4e8;                     /* XP-Luna-Light-Beige */
    border: 2px solid #aca899;
    border-radius: 4px;
}
body.era-e2 #briefing-modal-body .brf-card:hover {
    background: #fefdf6;
    box-shadow: 0 2px 6px rgba(0, 48, 156, 0.15);
}

/* Quote-Block — passt sich an Beige an */
body.era-e2 #briefing-modal-body .brf-quote {
    background: rgba(0, 48, 156, 0.05);
    color: #2a2a2a;
}

/* Locked-Hint — XP-Beige statt Win95-Grau */
body.era-e2 #briefing-modal-body .brf-locked {
    background: #ece9d8;
    color: #555;
    border-left: 3px solid #aca899;
    border-radius: 4px;
}

/* Section-Titles — XP-Blau-Akzent */
body.era-e2 #briefing-modal-body .brf-section-title {
    color: #00309c;
}


/* ============================================================
   ÄRA 3 — iOS-7-flat (weisse Cards, weiche Schatten, runde Ecken)
   ============================================================
   Forecast: weiß mit ganz feinem Border, kein hartes Blau.
   Cards: weiß mit dezentem Border + iOS-Blau Hover.
   Border-Radius: konsequent 8-10px für iOS-Look.
   ============================================================ */

body.era-e3 #briefing-modal-body .brf-forecast {
    background: #ffffff;
    border: 1px solid rgba(60, 60, 67, 0.12);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
body.era-e3 #briefing-modal-body .brf-forecast h4 {
    color: #007aff;                          /* iOS System Blue */
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

body.era-e3 #briefing-modal-body .brf-card {
    background: #ffffff;
    border: 1px solid rgba(60, 60, 67, 0.15);
    border-radius: 10px;
    transition: all 0.2s ease;
}
body.era-e3 #briefing-modal-body .brf-card:hover {
    border-color: #007aff;
    background: #fafafa;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.12);
}
body.era-e3 #briefing-modal-body .brf-card.brf-checked {
    background: linear-gradient(180deg, #ffffff 0%, rgba(0,122,255,0.06) 100%);
}

body.era-e3 #briefing-modal-body .brf-quote {
    background: rgba(0, 122, 255, 0.04);
    color: #3c3c43;
    border-left: 3px solid #007aff;
    border-radius: 0 8px 8px 0;
}

body.era-e3 #briefing-modal-body .brf-locked {
    background: rgba(60, 60, 67, 0.05);
    color: #6c6c70;
    border-left: 3px solid rgba(60, 60, 67, 0.2);
    border-radius: 0 8px 8px 0;
}

body.era-e3 #briefing-modal-body .brf-section-title {
    color: #6c6c70;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.2px;
}

body.era-e3 #briefing-modal-body .brf-card-desc {
    color: #6c6c70;
}

/* iOS Tags weicher */
body.era-e3 #briefing-modal-body .brf-tag {
    border-radius: 6px;
    font-weight: 500;
}


/* ============================================================
   ÄRA 4 — Dark Glassmorphism (Aurora, helle Texte!)
   ============================================================
   KRITISCH: Hardcoded helle BGs (#fcfcfc, #f0f0f0) und dunkle
   Texte (#444, #555, #666) sind im Dark-Mode unleserlich.
   Forecast XP-Blau ist visuell ein Fremdkörper auf Aurora-BG.

   Lösung: Dunkle, transluzente Glassmorphism-Cards mit hellem
   Text. Akzente nutzen --accent-blue (#667eea) / --accent-cyan.
   ============================================================ */

body.era-e4 #briefing-modal-body .brf-forecast {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
body.era-e4 #briefing-modal-body .brf-forecast h4 {
    color: #a78bfa;                          /* --accent-purple */
    text-transform: none;
    letter-spacing: 0.3px;
    font-weight: 600;
}
body.era-e4 #briefing-modal-body .brf-forecast-row {
    color: #e2e8f0;                          /* --text */
}
body.era-e4 #briefing-modal-body .brf-forecast-row span {
    color: #e2e8f0;
}
/* Aufwand-Zeile (dimmer) */
body.era-e4 #briefing-modal-body .brf-forecast-row[style*="opacity"] span,
body.era-e4 #briefing-modal-body #brf-fc-effort {
    color: #94a3b8;                          /* --text-muted */
}

body.era-e4 #briefing-modal-body .brf-card {
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 10px;
    color: #e2e8f0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
body.era-e4 #briefing-modal-body .brf-card:hover {
    background: rgba(51, 65, 85, 0.7);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}
body.era-e4 #briefing-modal-body .brf-card.brf-checked {
    background: linear-gradient(180deg, rgba(30,41,59,0.7) 0%, rgba(102,126,234,0.18) 100%);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.4),
                0 4px 16px rgba(102, 126, 234, 0.2);
}
body.era-e4 #briefing-modal-body .brf-card-head strong {
    color: #f1f5f9;
}
body.era-e4 #briefing-modal-body .brf-card-desc {
    color: #cbd5e1;
}

body.era-e4 #briefing-modal-body .brf-quote {
    background: rgba(102, 126, 234, 0.10);
    color: #cbd5e1;
    border-left: 3px solid #a78bfa;
    border-radius: 0 10px 10px 0;
}

body.era-e4 #briefing-modal-body .brf-locked {
    background: rgba(15, 23, 42, 0.5);
    color: #94a3b8;
    border-left: 3px solid rgba(148, 163, 184, 0.4);
    border-radius: 0 10px 10px 0;
}

body.era-e4 #briefing-modal-body .brf-section-title {
    color: #cbd5e1;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
}

body.era-e4 #briefing-modal-body .brf-flavor {
    color: #94a3b8;
}

/* Tags im Dark-Mode etwas gedämpfter */
body.era-e4 #briefing-modal-body .brf-tag-cost {
    background: rgba(255, 193, 7, 0.18);
    color: #fde047;
}
body.era-e4 #briefing-modal-body .brf-tag-neutral {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}
body.era-e4 #briefing-modal-body .brf-tag-good {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}
body.era-e4 #briefing-modal-body .brf-tag-warn {
    background: rgba(245, 158, 11, 0.20);
    color: #fde047;
}
body.era-e4 #briefing-modal-body .brf-tag {
    border-radius: 6px;
    font-weight: 500;
}

/* Title-Bar Title im Briefing soll im Dark-Mode hell sein
   (wird durch eras.css schon meist gesetzt, hier defensiv) */
body.era-e4 #briefing-modal-body .title-bar .title {
    color: var(--title-text, #e2e8f0);
}

/* ============================================================
   FRAME-OVERRIDES — Era 2/3/4 (Window + Title-Bar)
   ============================================================
   Issue (Master Chief, v0.9.21.63):
   "Hauptsächlich ist der Background transparent und der Header
    deckt sich nicht mit dem Rest aus Ära 2 (in #briefing-modal-body)."

   Root-Cause:
   - eras.css definiert `body.era-eN .window` und `.title-bar`,
     aber `#briefing-modal-body` ist eine `.window.modal.focused`
     und der Inline-<style> in marketing-polish.js wird PER
     innerHTML später injected → bei gleicher Spezifität gewinnt
     der spätere Block. Wir brauchen also höhere Spezifität.
   - Selektor `body.era-eN #briefing-modal-body` (1 ID + 2 Classes)
     schlägt Default-`.window`-Regeln klar.
   - !important als Belt-and-Suspenders, falls zukünftige Inline-
     Styles in marketing-polish.js direkt Background setzen.
   ============================================================ */

/* -------- Era 2 — XP/Luna Frame -------- */
body.era-e2 #briefing-modal-body {
    background: var(--win-bg, #ece9d8) !important;
    border: 3px solid #00309c !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden;
}
body.era-e2 #briefing-modal-body .title-bar {
    background: var(--title-bar) !important;
    border-top: 1px solid #0875ff !important;
    border-radius: 5px 5px 0 0 !important;
    color: #fff !important;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6) !important;
    font-family: "Tahoma", sans-serif;
    font-weight: bold;
    padding: 3px 6px;
}
body.era-e2 #briefing-modal-body .title-bar .title {
    color: #fff !important;
}

/* -------- Era 3 — iOS-Flat Frame -------- */
body.era-e3 #briefing-modal-body {
    background: #ffffff !important;
    border: 1px solid rgba(60, 60, 67, 0.18) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden;
}
body.era-e3 #briefing-modal-body .title-bar {
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%) !important;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.12) !important;
    border-radius: 12px 12px 0 0 !important;
    color: #1c1c1e !important;
    font-family: var(--font-ui);
    font-weight: 600 !important;
    text-shadow: none !important;
    padding: 8px 12px;
    text-align: center;
}
body.era-e3 #briefing-modal-body .title-bar .title {
    color: #1c1c1e !important;
    font-weight: 600 !important;
    text-align: center;
    flex: 1;
}

/* -------- Era 4 — Dark-Glass Frame -------- */
body.era-e4 #briefing-modal-body {
    background: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border: 1px solid rgba(167, 139, 250, 0.25) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
    color: var(--text);
}
body.era-e4 #briefing-modal-body .title-bar {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.35) 0%, rgba(167, 139, 250, 0.32) 100%) !important;
    border-bottom: 1px solid rgba(167, 139, 250, 0.25) !important;
    border-radius: 13px 13px 0 0 !important;
    color: #f1f5f9 !important;
    font-family: var(--font-ui);
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    padding: 7px 12px;
}
body.era-e4 #briefing-modal-body .title-bar .title {
    color: #f1f5f9 !important;
    font-weight: 600 !important;
}
