/* ============================================================
   ANESFHS dark-red theme – Radzen Layout overrides
   ============================================================ */

/* --- Override Radzen primary colour (buttons, sliders, focus rings, etc.) --- */
:root {
    --rz-primary: #9b0801;
    --rz-primary-darker: #5a0301;
    --rz-primary-lighter: #c41000;
}

/* --- Sidebar: vertical dark-red gradient --- */
.rz-sidebar {
    background: linear-gradient(180deg, #9b0801 0%, #5a0301 50%, #510400 100%) !important;
    color: #ffffff !important;
}

/* --- Header: horizontal dark-red gradient --- */
.rz-header {
    background: linear-gradient(90deg, #9b0801 0%, #5a0301 50%, #510400 100%) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.35) !important;
}

.rz-header a,
.rz-header .rz-button-box {
    color: #ffffff !important;
}

.rz-header a:hover {
    color: #ffd6d4 !important;
}

/* --- Panel menu: white text and hover/active states on red sidebar --- */
.rz-sidebar .rz-panel-menu {
    background: transparent !important;
}

/* Remove all borders between nav items - the gradient background provides sufficient separation */
.rz-sidebar .rz-navigation-item-wrapper,
.rz-sidebar .rz-navigation-item,
.rz-sidebar .rz-panel-menu-item {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
}

.rz-sidebar .rz-navigation-item-text {
    color: #ffffff !important;
}

.rz-sidebar .rz-navigation-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.rz-sidebar .rz-navigation-item.rz-state-active {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* --- Sub-menu items (children of expanded panel groups) must keep the sidebar background --- */
/* Override the CSS variable so 2nd-level wrappers don't paint a dark box */
.rz-sidebar {
    --rz-panel-menu-item-2nd-level-background-color: transparent;
    --rz-panel-menu-item-2nd-level-hover-background-color: rgba(255, 255, 255, 0.1);
    --rz-panel-menu-item-2nd-level-active-background-color: rgba(255, 255, 255, 0.2);
}

/* Belt-and-braces: also target the rendered elements directly */
.rz-sidebar .rz-panel-menu .rz-navigation-menu,
.rz-sidebar .rz-panel-menu .rz-navigation-menu .rz-navigation-item-wrapper {
    background-color: transparent !important;
}

.rz-sidebar .rz-panel-menu .rz-navigation-menu .rz-navigation-item-text {
    color: #ffffff !important;
}

/* --- Bootstrap primary colour override for any remaining Bootstrap-based elements --- */
[data-bs-theme=dark] {
    --bs-primary: #9b0801;
    --bs-primary-rgb: 155, 8, 1;
    --bs-primary-text-emphasis: #ffd6d4;
    --bs-primary-bg-subtle: rgba(155, 8, 1, 0.1);
    --bs-primary-border-subtle: rgba(155, 8, 1, 0.25);
    --bs-link-color: var(--bs-primary);
    --bs-link-hover-color: #7a0501;
}

/* --- Pin Radzen text colours in light mode.
   html[data-bs-theme=light] has specificity (0,1,1) which outranks :root (0,1,0) used
   by Radzen's material-dark.css, so these values win even if that sheet leaks through. --- */
html[data-bs-theme=light] {
    --rz-base-50: #fafafa;
    --rz-base-800: #424242;
    --rz-base-900: #212121;
    --rz-text-color: #424242;
    --rz-text-title-color: #212121;
    --rz-text-secondary-color: #757575;
    --rz-body-background-color: #f5f5f5;
}
