/* CallX Admin — dark mode overrides for custom layout (Bootstrap handles components). */

[data-bs-theme="dark"] body {
    background-color: #0f1419;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .sidebar {
    background: #1a2332;
    border-right-color: #2d3a4f;
}

[data-bs-theme="dark"] .sidebar .nav-link {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .sidebar .nav-link:hover {
    background: #243044;
    color: #60a5fa;
}

[data-bs-theme="dark"] .sidebar .nav-link.active {
    background: #3498db;
    color: #fff;
}

[data-bs-theme="dark"] .table {
    background: #1a2332;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .table th {
    background: #243044;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-menu {
    background: #1a2332;
    border: 1px solid #2d3a4f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background: #243044;
    color: #fff;
}

[data-bs-theme="dark"] .health-not-connected {
    color: #94a3b8;
}

[data-bs-theme="dark"] .billing-col-group {
    background: #1a2332;
    border-color: #2d3a4f;
}

[data-bs-theme="dark"] .billing-col-group-title {
    color: #94a3b8;
}

[data-bs-theme="dark"] #billingAwsTabs .nav-link {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] #billingAwsTabs .nav-link:hover,
[data-bs-theme="dark"] #billingAwsTabs .nav-link:focus,
[data-bs-theme="dark"] #billingAwsTabs .nav-link.active {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .billing-machines-meta {
    color: #94a3b8;
}

/* Navbar appearance picker: Light | System | Dark */
.theme-mode-picker {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.theme-mode-picker__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.theme-mode-picker__btn i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.theme-mode-picker__btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.theme-mode-picker__btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

/* Active selection — high contrast on the gradient navbar */
.theme-mode-picker__btn.is-active {
    background: #fff;
    color: #4c1d95;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-mode-picker__btn.is-active i {
    opacity: 1;
}

.theme-mode-picker__btn[data-theme-preference="light"].is-active i {
    color: #d97706;
}

.theme-mode-picker__btn[data-theme-preference="system"].is-active i {
    color: #2563eb;
}

.theme-mode-picker__btn[data-theme-preference="dark"].is-active i {
    color: #4c1d95;
}

.theme-mode-picker__hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    margin-left: 0.5rem;
    max-width: 10rem;
    line-height: 1.2;
}

@media (max-width: 991.98px) {
    .theme-mode-picker {
        margin: 0.5rem 0;
    }

    .theme-mode-picker__hint {
        display: block;
        margin: 0.35rem 0 0;
        max-width: none;
    }
}
