/* Partial: _dark-theme.css.j2 — Dark theme overrides for trace-edit */
/* Class-based: JS adds .dark-theme to <html> based on user preference or system */

.dark-theme body {
    color: #e9ecef;
    background: #1a1d21;
}

.dark-theme .header {
    background: #212529;
    border-bottom-color: #343a40;
}

.dark-theme .header-title { color: #f8f9fa; }

.dark-theme .search-box input {
    background: #2b3035;
    border-color: #495057;
    color: #e9ecef;
}

.dark-theme .search-box input:focus {
    background: #343a40;
    border-color: #0d6efd;
}

.dark-theme .search-results {
    background: #2b3035;
    border-color: #495057;
}

.dark-theme .search-result-item { border-bottom-color: #343a40; }
.dark-theme .search-result-item:hover { background: #343a40; }
.dark-theme .search-result-title { color: #adb5bd; }

.dark-theme .nav-panel {
    background: #212529;
    border-right-color: #343a40;
}

.dark-theme .nav-tabs { border-bottom-color: #343a40; }

.dark-theme .nav-tab { color: #adb5bd; }
.dark-theme .nav-tab:hover { color: #e9ecef; background: #2b3035; }
.dark-theme .nav-tab.active { color: #6ea8fe; border-bottom-color: #6ea8fe; }

.dark-theme .toolbar {
    background: #212529;
    border-bottom-color: #343a40;
}

.dark-theme .toolbar .filter-select {
    background: #343a40;
    border-color: #495057;
    color: #adb5bd;
}

.dark-theme .stat-badge:hover { box-shadow: 0 0 0 2px rgba(255,255,255,0.15); }
.dark-theme .stat-badge.active { box-shadow: 0 0 0 2px #6ea8fe; }
.dark-theme .stat-sep { color: #495057; }

.dark-theme .nav-tree-row { color: #adb5bd; }
.dark-theme .nav-tree-row:hover { background: #2b3035; }
.dark-theme .nav-tree-row.selected { background: #1a2d42; border-left-color: #6ea8fe; }
.dark-theme .nav-tree-id { color: #6ea8fe; }
.dark-theme .nav-tree-title { color: #868e96; }

/* Test/result rows in dark mode */
.dark-theme .nav-tree-test { background: rgba(13, 202, 240, 0.04); }
.dark-theme .nav-tree-test:hover { background: rgba(13, 202, 240, 0.10); }
.dark-theme .nav-tree-result { background: rgba(108, 117, 125, 0.03); }
.dark-theme .nav-tree-result:hover { background: rgba(108, 117, 125, 0.08); }
.dark-theme .nav-tree-result-badge.passed { background: #1a3328; color: #5cb85c; }
.dark-theme .nav-tree-result-badge.failed, .dark-theme .nav-tree-result-badge.fail, .dark-theme .nav-tree-result-badge.failure { background: #3d1f24; color: #e77681; }
.dark-theme .nav-tree-result-badge.error { background: #3d3019; color: #f0c75e; }
.dark-theme .nav-tree-result-badge.skipped, .dark-theme .nav-tree-result-badge.skip { background: #2b3035; color: #868e96; }

.dark-theme .divider { background: #343a40; }
.dark-theme .divider:hover, .dark-theme .divider.dragging { background: #6ea8fe; }

.dark-theme .card-stack-panel { background: #1a1d21; }
.dark-theme .card-stack-header {
    background: #212529;
    border-bottom-color: #343a40;
    color: #adb5bd;
}

.dark-theme .req-card {
    background: #212529;
    border-color: #343a40;
}

.dark-theme .req-card.focused {
    border-color: #6ea8fe;
    box-shadow: 0 0 0 2px rgba(110,168,254,0.15);
}

.dark-theme .req-card-header {
    background: #2b3035;
    border-bottom-color: #343a40;
}

.dark-theme .req-card-header:hover { background: #343a40; }
.dark-theme .req-card-id { color: #6ea8fe; }
.dark-theme .req-card-title-display { color: #e9ecef; }

.dark-theme .card-meta-key { color: #adb5bd; }
.dark-theme .card-meta-value { color: #e9ecef; }

.dark-theme .card-assertion { background: #2b3035; }
.dark-theme .card-assertion-label { background: #1a2d42; color: #6ea8fe; }
.dark-theme .card-assertion-text { color: #adb5bd; }

.dark-theme .card-parent-link {
    background: #1a2d42;
    border-color: #2b5f96;
    color: #6ea8fe;
}
.dark-theme .card-parent-link:hover { background: #254a73; }

.dark-theme .card-child-link {
    background: #2b3035;
    border-color: #495057;
    color: #adb5bd;
}
.dark-theme .card-child-link:hover { background: #343a40; color: #6ea8fe; }

.dark-theme .card-add-assertion-btn { border-color: #495057; color: #adb5bd; }
.dark-theme .card-add-assertion-btn:hover { border-color: #6ea8fe; color: #6ea8fe; background: #1a2d42; }

.dark-theme .status-badge.draft { background: #1a2d42; color: #6ea8fe; }
.dark-theme .status-badge.active { background: #1a3328; color: #5cb85c; }
.dark-theme .status-badge.deprecated { background: #3d1f24; color: #e77681; }
.dark-theme .status-badge.proposed { background: #3d3019; color: #f0c75e; }
.dark-theme .status-badge.active.val-green { background: #146c43; color: #d1e7dd; }
.dark-theme .status-badge.active.val-yellow-green { background: #4a7a2e; color: #d4edbc; }
.dark-theme .status-badge.active.val-yellow { background: #997a00; color: #fff3cd; }
.dark-theme .status-badge.active.val-red { background: #a52834; color: #f8d7da; }
.dark-theme .status-badge.active.val-orange { background: #b35b0e; color: #ffe5d0; }
.dark-theme .status-badge[data-tip]::after { background: #f8f9fa; color: #212529; }

.dark-theme .btn {
    background: #2b3035;
    border-color: #495057;
    color: #adb5bd;
}
.dark-theme .btn:hover { background: #343a40; }
.dark-theme .btn-primary { background: #0d6efd; color: white; border-color: #0d6efd; }
.dark-theme .btn-primary:hover { background: #0b5ed7; }

.dark-theme .edit-toggle {
    border-color: #495057;
    background: #2b3035;
    color: #adb5bd;
}
.dark-theme .edit-toggle.active {
    border-color: #6ea8fe;
    background: #1a2d42;
    color: #6ea8fe;
}

.dark-theme body.edit-mode .editable-field { background: rgba(110, 168, 254, 0.08); }
.dark-theme body.edit-mode .editable-field:hover { background: rgba(110, 168, 254, 0.15); }
.dark-theme body.edit-mode .editable-field:focus { background: #2b3035; box-shadow: 0 0 0 2px rgba(110, 168, 254, 0.3); }
.dark-theme body.edit-mode .editable-field.dirty { background: rgba(240, 199, 94, 0.12); }

.dark-theme body.edit-mode .status-select {
    background: rgba(110, 168, 254, 0.08);
    border-color: rgba(110, 168, 254, 0.3);
    color: #e9ecef;
}
.dark-theme body.edit-mode .status-select option { background: #2b3035; color: #e9ecef; }

.dark-theme .file-viewer-panel { background: #212529; border-left-color: #343a40; }
.dark-theme .file-viewer-header { background: #2b3035; border-bottom-color: #343a40; }
.dark-theme .file-viewer-path { color: #adb5bd; }
.dark-theme .fv-status.on-disk { background: #064e3b; color: #a7f3d0; }
.dark-theme .fv-status.has-mutations { background: #78350f; color: #fde68a; }

.dark-theme .line-num { color: #6c757d; border-right-color: #343a40; background: #2b3035; }
.dark-theme .line-content { color: #e9ecef; }
.dark-theme .source-line:hover { background: #2b3035; }
.dark-theme .source-line.highlighted { background: #3d3019; }
.dark-theme .source-line.highlighted:hover { background: #4a3a1f; }
.dark-theme .file-viewer-lang { background: #343a40; color: #adb5bd; }
.dark-theme .file-viewer-btn { color: #adb5bd; }
.dark-theme .file-viewer-btn:hover { background: #343a40; }
.dark-theme .file-viewer-mode-toggle { background: #343a40; }
.dark-theme .file-viewer-mode-btn { color: #adb5bd; }
.dark-theme .file-viewer-mode-btn.active { background: #495057; color: #e9ecef; box-shadow: none; }
.dark-theme .file-viewer-close-btn { color: #adb5bd; }
.dark-theme .file-viewer-close-btn:hover { color: #e77681; background: #3d1f24; }
.dark-theme .line-content.rendered-line code { background: #343a40; }

.dark-theme .toast.success { background: #1a3328; color: #5cb85c; border-color: #2d5a3e; }
.dark-theme .toast.error { background: #3d1f24; color: #e77681; border-color: #5a2d33; }
.dark-theme .toast.info { background: #1a3040; color: #6ea8fe; border-color: #2d4a6e; }

.dark-theme .card-stack-empty { color: #6c757d; }
.dark-theme .card-section-label { color: #868e96; }

/* Legend modal */
.dark-theme .modal { background: #2b3035; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5); }
.dark-theme .modal-title { color: #e9ecef; }
.dark-theme .modal-close { color: #adb5bd; }
.dark-theme .modal-close:hover { color: #e9ecef; }
.dark-theme .legend-section h4 { color: #adb5bd; border-bottom-color: #495057; }
.dark-theme .legend-item { color: #e9ecef; }

/* Nav tree actions */
.dark-theme .nav-tree-action { color: #6c757d; }
.dark-theme .nav-tree-action:hover { color: #adb5bd; }

/* Hamburger menu */
.dark-theme .hamburger-dropdown { background: #2b3035; border-color: #495057; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.dark-theme .hamburger-item { color: #adb5bd; }
.dark-theme .hamburger-item:hover { background: #343a40; color: #e9ecef; }
.dark-theme .hamburger-label { color: #6c757d; }
.dark-theme .hamburger-divider { background: #495057; }
.dark-theme #font-size-display { color: #adb5bd; }
.dark-theme .theme-btn.active { background: #1a2d42 !important; border-color: #6ea8fe !important; color: #6ea8fe !important; }

/* Journey cards */
.dark-theme .journey-card-kind { background: #495057; color: #e9ecef; }
.dark-theme .journey-card-description { color: #adb5bd; }

/* Assertion implemented + validation buttons */
.dark-theme .assertion-implemented-btn,
.dark-theme .assertion-validation-btn {
    border-color: #495057;
    color: #868e96;
}
.dark-theme .assertion-implemented-btn:hover,
.dark-theme .assertion-validation-btn:hover {
    background: #343a40;
    border-color: #6c757d;
}

.dark-theme .assertion-implemented-btn.implemented-yes { border-color: #2b5f96; color: #6ea8fe; }
.dark-theme .assertion-implemented-btn.implemented-yes:hover { background: #1a2d42; }
.dark-theme .assertion-implemented-btn.implemented-yes.active { background: #2b5f96; color: #e7f1ff; }

.dark-theme .assertion-implemented-btn.implemented-no { border-color: #495057; color: #6c757d; }
.dark-theme .assertion-implemented-btn.implemented-no:hover { background: #343a40; }

.dark-theme .assertion-validation-btn.validation-pass { border-color: #2d6a4f; color: #5cb85c; }
.dark-theme .assertion-validation-btn.validation-pass:hover { background: #1a3328; }
.dark-theme .assertion-validation-btn.validation-pass.active { background: #2d6a4f; color: #d1e7dd; }

.dark-theme .assertion-validation-btn.validation-partial { border-color: #7c6a1e; color: #f0c75e; }
.dark-theme .assertion-validation-btn.validation-partial:hover { background: #3d3019; }
.dark-theme .assertion-validation-btn.validation-partial.active { background: #7c6a1e; color: #fef3c7; }

.dark-theme .assertion-validation-btn.validation-fail { border-color: #842029; color: #e77681; }
.dark-theme .assertion-validation-btn.validation-fail:hover { background: #3d1f24; }
.dark-theme .assertion-validation-btn.validation-fail.active { background: #842029; color: #f8d7da; }

.dark-theme .assertion-validation-btn.validation-unknown { border-color: #495057; color: #868e96; }
.dark-theme .assertion-validation-btn.validation-unknown:hover { background: #343a40; }
.dark-theme .assertion-validation-btn.validation-unknown.active { background: #495057; color: #e9ecef; }

/* Assertion code panels */
.dark-theme .assertion-code-panel {
    background: #1a2232;
    border-left-color: #2b5f96;
}

/* Assertion test panels */
.dark-theme .assertion-tests-panel {
    background: #1a1d21;
    border-left-color: #495057;
}

.dark-theme .assertion-tests-loading,
.dark-theme .assertion-tests-empty { color: #868e96; }

.dark-theme .assertion-test-item { border-bottom-color: rgba(255,255,255,0.04); }
.dark-theme .assertion-test-item.test-passed { color: #5cb85c; }
.dark-theme .assertion-test-item.test-failed { color: #e77681; }
.dark-theme .assertion-test-item.test-no-result { color: #868e96; }

.dark-theme .assertion-test-link { color: #6ea8fe; }
.dark-theme a.assertion-test-link:hover { color: #9ec5fe; }

.dark-theme .assertion-result-file-link { color: #868e96; }
.dark-theme .assertion-result-file-link:hover { color: #6ea8fe; }
