/* Blazor Error UI Tuning */
#blazor-error-ui.alert {
    border-left: 4px solid rgba(220, 53, 69, .9);
}

body.dark-mode #blazor-error-ui {
    background-color: #3a3a4a;
    color: #fff;
    border-left-color: #ff6b6b;
}

/* Sidebar-Jurisdiction Look */
.sidebar-jurisdiction {
    background: rgba(255, 255, 255, 0.03);
}

/* Collapsed Mode: Text ausblenden, nur Icon/Flagge zeigen */
.sidebar-mini.sidebar-collapse .sidebar .sidebar-jurisdiction .lh-1,
.sidebar-mini.sidebar-collapse .sidebar .sidebar-jurisdiction .text-muted,
.sidebar-mini.sidebar-collapse .sidebar .sidebar-jurisdiction strong {
    display: none;
}

.sidebar-mini.sidebar-collapse .sidebar .sidebar-jurisdiction {
    text-align: center;
    padding: .5rem 0;
}

/* Sidebar soll volle Höhe einnehmen und Flex-Layout bekommen */
.main-sidebar .sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Bei layout-fixed: Höhe um Header reduzieren (57px ist AdminLTE-Default) */
.layout-fixed .main-sidebar .sidebar {
    height: calc(100vh - 57px) !important; /* ggf. anpassen, wenn Navbar-Höhe anders ist */
}

/* Hellerer Sidebar-Footer */
.sidebar-jurisdiction {
    background: rgba(255,255,255,.06); /* leicht aufhellen */
    border-top: 1px solid rgba(255,255,255,.18);
}

    .sidebar-jurisdiction .text-muted {
        color: rgba(255,255,255,.7) !important; /* Label heller */
    }

    .sidebar-jurisdiction strong {
        color: rgba(255,255,255,.95); /* Wert fast weiß */
    }

    /* Flag etwas hervorheben */
    .sidebar-jurisdiction .fs-5 {
        filter: drop-shadow(0 0 2px rgba(0,0,0,.25));
    }


/* A11y helper (falls nicht schon vorhanden, z. B. via Bootstrap) */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Easter-Egg Bombe */
.egg-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin: 0 .25rem;
    opacity: .65;
    text-decoration: none !important;
    outline: none;
    transition: transform .15s ease, opacity .15s ease, filter .15s ease;
}

    /* die Bombe als SVG-Icon (hell/dunkel neutral) */
    .egg-link::before {
        content: "";
        width: 12px;
        height: 12px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        /* einfache, saubere Bombe als Inline-SVG (monochrom) */
        background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'>\
<circle cx='11' cy='14' r='7'/>\
<path d='M16.5 6.5l1.5-1.5 1 1 1-1 1.5 1.5-1 1 1 1-1.5 1.5-1-1-1 1-1.5-1.5 1-1-1-1z'/>\
<rect x='14' y='9' width='2.5' height='3' rx='1'/>\
</svg>");
    }

    /* Hover/Focus: dezentes Wackeln/Farbe */
    .egg-link:hover,
    .egg-link:focus {
        opacity: 1;
        transform: rotate(-8deg) scale(1.05);
        filter: none;
    }

    /* Tastaturfokus sichtbar machen */
    .egg-link:focus {
        box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
        border-radius: 50%;
    }

/* Dark-Mode Anpassung (falls du .dark-mode verwendest) */
body.dark-mode .egg-link::before {
    /* etwas hellere Farbe im Dark-Mode */
    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23adb5bd'>\
<circle cx='11' cy='14' r='7'/>\
<path d='M16.5 6.5l1.5-1.5 1 1 1-1 1.5 1.5-1 1 1 1-1.5 1.5-1-1-1 1-1.5-1.5 1-1-1-1z'/>\
<rect x='14' y='9' width='2.5' height='3' rx='1'/>\
</svg>");
}

/* Bewegungsreduktion respektieren */
@media (prefers-reduced-motion: reduce) {
    .egg-link {
        transition: none;
    }

        .egg-link:hover, .egg-link:focus {
            transform: none;
        }
}

/* Company configuration import progress modal */
.import-progress-backdrop {
    z-index: 1070;
    background-color: #212529;
    opacity: 0.65;
}

.import-progress-modal {
    z-index: 1075;
}

.import-progress-dialog {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.import-progress-modal .modal-content {
    border-radius: 0.75rem;
}

/* Interpretation modal adjustments */
.interpretation-modal .modal-dialog {
    width: 60vw;
    max-width: 60vw;
}

.interpretation-modal .modal-content {
    height: 80vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.interpretation-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
}

@media (max-width: 992px) {
    .interpretation-modal .modal-dialog {
        width: 95vw;
        max-width: 95vw;
    }

    .interpretation-modal .modal-content {
        height: 85vh;
        max-height: 85vh;
    }
}

.import-progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
}

.import-progress-step + .import-progress-step {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-mode .import-progress-step + .import-progress-step {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.import-progress-step.running span {
    font-weight: 600;
}

.import-progress-step.failed span {
    color: #dc3545;
}

.import-progress-step.completed span {
    color: #198754;
}

/* ===== Windows 3.11 Look (namespaced to .msw-container) ===== */
:root {
    --win-bg: #c0c0c0;
    --win-light: #ffffff;
    --win-highlight: #d4d0c8;
    --win-shadow: #808080;
    --win-dark: #404040;
}

.msw-container.win311 {
    font-family: 'MS Sans Serif', Tahoma, 'Segoe UI', sans-serif;
    color: #000;
}

.msw-container {
    max-width: min(100%, 980px);
    margin: 8px auto;
}

.chart-card .chart-body {
    position: relative;
    min-height: 320px;
}

/* Chart: feste Größe, kein automatisches Skalieren über CSS */
.chart-card .chart-canvas {
    display: block;
    width: 100%;
}

    .msw-container .win-bar {
        background: var(--win-bg);
        padding: 6px;
        border-top: 2px solid var(--win-light);
        border-left: 2px solid var(--win-light);
        border-right: 2px solid var(--win-dark);
        border-bottom: 2px solid var(--win-dark);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .msw-container .win-frame {
        margin-top: 6px;
        background: var(--win-bg);
        padding: 6px;
        border-top: 2px solid var(--win-light);
        border-left: 2px solid var(--win-light);
        border-right: 2px solid var(--win-dark);
        border-bottom: 2px solid var(--win-dark);
    }

    .msw-container .win-led {
        display: inline-block;
        min-width: 56px;
        text-align: right;
        padding: 2px 6px;
        margin-right: 6px;
        background: #000;
        color: #ff0000;
        border-top: 2px solid var(--win-dark);
        border-left: 2px solid var(--win-dark);
        border-right: 2px solid var(--win-light);
        border-bottom: 2px solid var(--win-light);
        font-variant-numeric: tabular-nums;
    }

    .msw-container .win-pill {
        padding: 2px 6px;
        background: var(--win-highlight);
        border-top: 2px solid var(--win-light);
        border-left: 2px solid var(--win-light);
        border-right: 2px solid var(--win-dark);
        border-bottom: 2px solid var(--win-dark);
    }

    .msw-container .win-select,
    .msw-container .win-input,
    .msw-container .win-btn {
        height: 24px;
        padding: 2px 6px;
        background: var(--win-bg);
        border-top: 2px solid var(--win-light);
        border-left: 2px solid var(--win-light);
        border-right: 2px solid var(--win-dark);
        border-bottom: 2px solid var(--win-dark);
    }

        .msw-container .win-btn:active {
            border-top: 2px solid var(--win-dark);
            border-left: 2px solid var(--win-dark);
            border-right: 2px solid var(--win-light);
            border-bottom: 2px solid var(--win-light);
        }

    /* Board */
    .msw-container .msw-board {
        display: grid;
        gap: 0;
        user-select: none;
        touch-action: manipulation;
    }

    .msw-container .cell {
        width: 18px;
        height: 18px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--win-bg);
        border-top: 2px solid var(--win-light);
        border-left: 2px solid var(--win-light);
        border-right: 2px solid var(--win-dark);
        border-bottom: 2px solid var(--win-dark);
        font-weight: 700;
        font-size: 12px;
        line-height: 1;
    }

        .msw-container .cell:focus {
            outline: 1px dotted #000;
            outline-offset: -3px;
        }

        .msw-container .cell.revealed {
            border-top: 2px solid var(--win-dark);
            border-left: 2px solid var(--win-dark);
            border-right: 2px solid var(--win-light);
            border-bottom: 2px solid var(--win-light);
            background: var(--win-highlight);
        }

    /* Numbers (classic colors) */
    .msw-container .n1 {
        color: #0000ff;
    }

    .msw-container .n2 {
        color: #008000;
    }

    .msw-container .n3 {
        color: #ff0000;
    }

    .msw-container .n4 {
        color: #000080;
    }

    .msw-container .n5 {
        color: #800000;
    }

    .msw-container .n6 {
        color: #008080;
    }

    .msw-container .n7 {
        color: #000000;
    }

    .msw-container .n8 {
        color: #808080;
    }

    /* Inline SVG icons */
    .msw-container .ico {
        width: 12px;
        height: 12px;
        display: block;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 12px 12px;
    }

        .msw-container .ico.flag {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><rect fill='none' width='12' height='12'/><path d='M3 10V2' stroke='%23404040' stroke-width='1'/><path d='M4 3 L10 2 L7 5 L10 6 L4 7 Z' fill='%23d00000'/></svg>");
        }

        .msw-container .ico.mine {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><g fill='%23000000'><circle cx='6' cy='6' r='3'/><rect x='5.5' y='0.5' width='1' height='3'/><rect x='5.5' y='8.5' width='1' height='3'/><rect x='0.5' y='5.5' width='3' height='1'/><rect x='8.5' y='5.5' width='3' height='1'/><rect x='2' y='2' width='2' height='1' transform='rotate(45 3 2.5)'/><rect x='8' y='2' width='2' height='1' transform='rotate(-45 9 2.5)'/><rect x='2' y='9' width='2' height='1' transform='rotate(-45 3 9.5)'/><rect x='8' y='9' width='2' height='1' transform='rotate(45 9 9.5)'/></g><circle cx='5' cy='5' r='1' fill='%23ffffff'/></svg>");
        }

    .msw-container .msw-footer {
        margin-top: .5rem;
    }

@media (max-width: 480px) {
    .msw-container .cell {
        width: 16px;
        height: 16px;
    }
}
/* ===== End Minesweeper block ===== */



.markdown-content {
    line-height: 1.6;
    font-size: 1rem;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content blockquote {
    margin-bottom: 1rem;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
}

.markdown-content pre {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    overflow-x: auto;
}

/* Chart: feste Größe, keine Autoskalierung */
.chart-fixed canvas {
    display: block;
    width: 100%;
}
