/* Dark theme, shared by every page (see templates/_theme.html). Bootstrap's own data-bs-theme="dark" handles
   its components; these rules cover the colours the pages set themselves. */
[data-bs-theme="dark"] body {
    background: #181a1d;
}
[data-bs-theme="dark"] .ral-label {
    color: var(--bs-secondary-color);
}
/* Drawn on the logo's light backing. */
[data-bs-theme="dark"] .operator-logo-fallback {
    color: #343a40;
}
[data-bs-theme="dark"] .section-switcher .nav-link:not(.active) {
    color: #ced4da;
}
[data-bs-theme="dark"] .section-switcher .nav-link:not(.active):hover {
    color: #fff;
}
/* Cards and tables marked bg-white stay white, so everything inside them keeps the light theme's colours. */
[data-bs-theme="dark"] .bg-white {
    --bs-body-bg: #fff;
    --bs-body-color: #212529;
    --bs-emphasis-color: #000;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-border-color: #dee2e6;
    --bs-link-color-rgb: 13, 110, 253;
    color: var(--bs-body-color);
}
/* Dark outline buttons would vanish on the dark page: draw them light instead. */
[data-bs-theme="dark"] .btn-outline-dark {
    --bs-btn-color: #dee2e6;
    --bs-btn-border-color: #adb5bd;
    --bs-btn-hover-color: #212529;
    --bs-btn-hover-bg: #dee2e6;
    --bs-btn-hover-border-color: #dee2e6;
    --bs-btn-active-color: #212529;
    --bs-btn-active-bg: #f8f9fa;
    --bs-btn-active-border-color: #f8f9fa;
}
/* Logos and pictures are drawn for a light page: keep them on a light backing. */
[data-bs-theme="dark"] .operator-logo,
[data-bs-theme="dark"] .landschaft-map {
    background-color: #e9ecef;
}
[data-bs-theme="dark"] .release + .release {
    border-top-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .language-option:hover,
[data-bs-theme="dark"] .language-option:focus-visible,
[data-bs-theme="dark"] .language-option.active {
    color: var(--bs-emphasis-color);
}
[data-bs-theme="dark"] .language-option.active {
    border-color: var(--bs-border-color);
}

/* The theme button beside the language switch. */
.theme-toggle {
    background: none;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    color: #6c757d;
    line-height: 1;
    padding: 0.2rem 0.4rem;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
    color: var(--bs-emphasis-color);
}
.language-switch-dark .theme-toggle {
    color: var(--header-muted, #adb5bd);
}
.language-switch-dark .theme-toggle:hover,
.language-switch-dark .theme-toggle:focus-visible {
    color: #fff;
}
.theme-toggle svg {
    height: 1rem;
    width: 1rem;
}
.theme-toggle .icon-sun,
[data-bs-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}
[data-bs-theme="dark"] .theme-toggle .icon-sun {
    display: inline;
}
