/*
 * DCS Demo — sub-portal overlay (injected by nginx sub_filter).
 *
 * Most inherited Pipelet portals already ship the Momentum lightBronzeWebex
 * theme (pipelet-theme.css / momentum.css) natively. The two DCS-specific
 * sub-portals, however, ship their own token sets:
 *   - status.dcs-demo.de  (DCS Service Monitor) → Untitled-UI tokens
 *       (untitled-ui-tokens.css: --brand-25..950, --button-*, --badge-brand-*)
 *   - docs.dcs-demo.de    (DCS Developer Portal, data-theme-storage=
 *       "developer-theme") → --accent / --accent-hover / --accent-muted
 *
 * This file does two jobs:
 *   A) demo-overlay chrome (banner, language switch, hide app-switcher) —
 *      kept verbatim from the original override.
 *   B) Momentum lightBronzeWebex normalisation — self-hosted fonts, a
 *      Webex-blue brand ramp centred on #1170cf, blue button/badge accents,
 *      the bronze-cream page background and the Source-Serif/Inter/JetBrains
 *      type stack. These remaps are written so they are SAFE NO-OPS on the
 *      momentum-based portals (cpms/fleet/driver/admin/sim): those portals
 *      do not consume --brand-* at all (momentum.css defines no --brand-*),
 *      and they already use #1170cf for --accent, so re-pinning is harmless.
 */

/* ================================================================
   A. DEMO-OVERLAY CHROME  (unchanged from the original override)
   ================================================================ */

/* ---- A1. Demo banner — Momentum bronze→Webex-blue ---- */
body { padding-top: 28px !important; }
body::before {
    content: "DCS DEMO · SALES DEMO · NO REAL DATA · dcs-demo.de";
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    height: 28px; line-height: 28px;
    background: linear-gradient(90deg, #a65e00 0%, #1170cf 100%);
    color: #fff;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12px; font-weight: 600;
    text-align: center; letter-spacing: 0.06em;
    pointer-events: none;
}

/* ---- A2. DE/EN language switcher (Momentum pill) ---- */
.dcs-lang-switch {
    position: fixed !important; top: 36px !important; right: 16px !important;
    z-index: 9998 !important;
    display: inline-flex !important; align-items: center !important; gap: 2px !important;
    border: 1px solid rgba(0,0,0,0.13) !important;
    border-radius: 9999px !important; padding: 2px !important;
    background: rgba(255,255,255,0.92) !important; backdrop-filter: blur(8px) !important;
    font-family: "Inter", system-ui, sans-serif !important;
    font-size: 12px !important; font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.10) !important;
}
.dcs-lang-switch button {
    border: none !important; background: transparent !important;
    color: rgba(0,0,0,0.70) !important;
    padding: 4px 12px !important; border-radius: 9999px !important;
    cursor: pointer !important; font: inherit !important; line-height: 1.2 !important;
}
.dcs-lang-switch button.active { background: #1170cf !important; color: #fff !important; }
.dcs-lang-switch button:not(.active):hover { color: #1170cf !important; }

/* ---- A3. Hide the upstream app-switcher (links to *.pipelet.com) ---- */
.pipelet-switcher,
#pipelet-switcher,
[id="pipelet-switcher"] { display: none !important; }

/* ================================================================
   B. MOMENTUM lightBronzeWebex NORMALISATION
   ================================================================ */

/* ---- B1. Self-hosted fonts (copied 1:1 from /dcs-branding/momentum.css) ---- */
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('/dcs-branding/fonts/inter-400.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('/dcs-branding/fonts/inter-500.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('/dcs-branding/fonts/inter-600.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('/dcs-branding/fonts/inter-700.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:800;font-display:swap;src:url('/dcs-branding/fonts/inter-800.woff2') format('woff2')}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:300;font-display:swap;src:url('/dcs-branding/fonts/source-serif-4-300.ttf') format('truetype')}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:400;font-display:swap;src:url('/dcs-branding/fonts/source-serif-4-400.ttf') format('truetype')}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:500;font-display:swap;src:url('/dcs-branding/fonts/source-serif-4-500.ttf') format('truetype')}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:700;font-display:swap;src:url('/dcs-branding/fonts/source-serif-4-700.ttf') format('truetype')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/dcs-branding/fonts/jetbrains-mono-400.woff2') format('woff2')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/dcs-branding/fonts/jetbrains-mono-500.woff2') format('woff2')}

/* ---- B2. Webex-blue brand ramp (centred on #1170cf) ----
 * Remaps the Untitled-UI --brand-* ramp used by status.dcs-demo.de.
 * !important because the upstream sets these inline via :root.
 * SAFE NO-OP on momentum portals: momentum.css does NOT define or read
 * --brand-* (it uses --accent), so overriding it there changes nothing. */
:root {
    --brand-25:  #f0f7ff !important;   /* lightest tint */
    --brand-50:  #dbf0ff !important;
    --brand-100: #bfe3ff !important;
    --brand-200: #8ecbff !important;
    --brand-300: #64b4fa !important;
    --brand-400: #3492eb !important;
    --brand-500: #1170cf !important;   /* Webex blue (accent) */
    --brand-600: #1170cf !important;   /* primary action */
    --brand-700: #0353a8 !important;   /* hover / pressed */
    --brand-800: #0a274a !important;   /* darker shade */
    --brand-900: #091b33 !important;
    --brand-950: #060f1e !important;   /* darkest shade */

    /* Accent / primary buttons → solid Webex blue, white text.
     * (status portal: --button-primary-* is near-black by default; remap to
     *  blue so primary CTAs match the unified Webex-blue look.) */
    --button-primary-bg:        #1170cf !important;
    --button-primary-bg-hover:  #0353a8 !important;
    --button-primary-fg:        #ffffff !important;
    --button-primary-border:    #1170cf !important;

    --button-accent-bg:         #1170cf !important;
    --button-accent-bg-hover:   #0353a8 !important;
    --button-accent-fg:         #ffffff !important;
    --button-accent-border:     #1170cf !important;

    /* Brand badge / tag → blue family */
    --badge-brand-bg:     #dbf0ff !important;
    --badge-brand-fg:     #0353a8 !important;
    --badge-brand-border: #8ecbff !important;

    /* Docs developer-theme accent tokens (docs.dcs-demo.de) → Webex blue.
     * These are no-ops everywhere the tokens aren't read; on docs they
     * re-pin the already-blue accent (and keep it blue should the upstream
     * default drift). */
    --accent:       #1170cf !important;
    --accent-hover: #0353a8 !important;
    --accent-muted: rgba(17, 112, 207, 0.08) !important;
}

/* ---- B3. Page background + Momentum type stack ----
 * Scoped to safe global element selectors. The brand-token remaps above are
 * no-ops on portals that don't use --brand-*; these element rules simply
 * re-assert the bronze-cream gradient and the Source-Serif/Inter/JetBrains
 * stack, which every Momentum portal already uses — so they stay consistent
 * and don't fight cpms/fleet. */
body {
    background: linear-gradient(180deg, #f5efe4 0%, #ffffff 100%) fixed !important;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}
h1, h2, h3, h4 {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif !important;
}
code, pre, .mono {
    font-family: "JetBrains Mono", ui-monospace, Menlo, monospace !important;
}
