/* ══════════════════════════════════════════════════════════════════════
   WAVE5 PORT — Bootstrap "variable shim"
   ──────────────────────────────────────────────────────────────────────
   OLD is Syncfusion-v19 + Bootstrap (no asetrix theme.css). Rather than
   hand-rewriting every rule below, we resolve the asetrix design tokens
   this file references to concrete Bootstrap-flavoured hex values, scoped
   to the dialog root so nothing leaks into the rest of OLD. (Lucide icons
   were re-skinned to Font Awesome <i class="fas …"> in the .razor; the
   [data-lucide] selectors below are inert but harmless, and the plain
   `i` selectors still colour the FA glyphs.)
   ══════════════════════════════════════════════════════════════════════ */
.app-error-dialog {
    --surface: #ffffff;
    --text-primary: #212529;
    --border-primary: #dee2e6;
    --error: #dc3545;
    --on-accent: #ffffff;
    --accent-primary: #0d6efd;
    --accent-secondary: #0b5ed7;
    --chrome-bg: #212529;
    --chrome-text: #f8f9fa;
    --chrome-border: rgba(255, 255, 255, 0.12);
    --chrome-hover: rgba(255, 255, 255, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.18);
    --shadow-accent-sm: 0 2px 8px rgba(13, 110, 253, 0.20);
    --shadow-accent-md: 0 4px 16px rgba(13, 110, 253, 0.25);
}

/* ════════════════════════════════════════════════════════════════════
   App-wide error dialog styling. Uses theme tokens throughout so the
   modal adapts to light/dark without overrides. Visual language echoes
   the check-in and silo-picker dialogs (chrome header + accent strip)
   so users recognise the dialog shape instantly.
   ════════════════════════════════════════════════════════════════════ */

.app-error-dialog.e-dialog {
    border-radius: 14px !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-xl) !important;
    overflow: hidden !important;
    background: var(--surface) !important;
}

.app-error-dialog .e-dlg-header-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    background: var(--chrome-bg) !important;
    border-bottom: none !important;
    color: var(--chrome-text) !important;
}

.app-error-dialog .e-dlg-header {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    color: var(--chrome-text) !important;
}

.app-error-dialog .e-dlg-content {
    padding: 0 !important;
    background: var(--surface) !important;
}

/* ── Header bar ──────────────────────────────────────────────────── */
.app-error-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--chrome-bg);
    border-bottom: 2px solid var(--error);
    color: var(--chrome-text);
}

.app-error-dialog-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--chrome-text) !important;
}

.app-error-dialog-header-title i,
.app-error-dialog-header-title [data-lucide],
.app-error-dialog-header-title svg,
.app-error-dialog-header-title svg path {
    color: var(--error) !important;
    stroke: var(--error) !important;
    width: 18px;
    height: 18px;
}

.app-error-dialog-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--chrome-border);
    background: var(--chrome-hover);
    color: var(--chrome-text) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.app-error-dialog-close:hover {
    background: var(--error) !important;
    color: var(--on-accent) !important;
    border-color: var(--error) !important;
}

.app-error-dialog-close i,
.app-error-dialog-close svg,
.app-error-dialog-close svg path {
    width: 14px;
    height: 14px;
    stroke: currentColor !important;
    color: inherit !important;
}

/* ── Body ─────────────────────────────────────────────────────────── */
.app-error-dialog-body {
    padding: 22px 24px 4px;
    color: var(--text-primary);
}

.app-error-dialog-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ── Actions ─────────────────────────────────────────────────────── */
.app-error-dialog-actions {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px 20px;
    gap: 10px;
}

.app-error-dialog-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--on-accent);
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-accent-sm);
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.app-error-dialog-btn:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-accent-md);
}

.app-error-dialog-btn:active {
    transform: translateY(1px);
}

.app-error-dialog-btn i,
.app-error-dialog-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}
