/* 
 * theme-integration.css 
 * Overrides for legacy styles to adopt the new Design System globally
 */

/* Force theme variables to apply */
body {
    background-color: var(--rr-bg) !important;
    color: var(--rr-text-primary) !important;
    font-family: var(--rr-font-family, inherit) !important;
}

/* Override legacy topbar if they pop up */
.rr-topbar {
    background-color: var(--rr-surface) !important;
    border-bottom: 1px solid var(--rr-border) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.rr-topbar-left, .rr-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rr-topbar a, .rr-topbar .nav-link {
    color: var(--rr-text-primary) !important;
}

.rr-topbar a:hover, .rr-topbar .nav-link:hover {
    color: var(--rr-primary) !important;
}

/* Topbar Notification and User Dropdowns */
.rr-topbar .dropdown-menu {
    background-color: var(--rr-surface) !important;
    border: 1px solid var(--rr-border) !important;
}

.rr-topbar .dropdown-item {
    color: var(--rr-text-primary) !important;
}

.rr-topbar .dropdown-item:hover {
    background-color: var(--rr-surface-hover) !important;
}

.rr-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--rr-border);
    background-color: var(--rr-surface-soft);
    color: var(--rr-text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rr-btn-icon:hover {
    background-color: var(--rr-surface-hover);
    color: var(--rr-primary);
}

.rr-user-menu {
    border: 1px solid var(--rr-border);
    border-radius: 8px;
    background-color: var(--rr-surface-soft);
    color: var(--rr-text-primary) !important;
}
.rr-user-menu:hover {
    background-color: var(--rr-surface-hover);
}

/* Prevent sidebar width issues from legacy css */
.rr-sidebar {
    background-color: var(--rr-surface) !important;
    border-right: 1px solid var(--rr-border) !important;
}

.rr-sidebar-header {
    background-color: var(--rr-surface) !important;
    border-bottom: 1px solid var(--rr-border) !important;
}

.rr-nav-link {
    color: var(--rr-text-primary) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    text-decoration: none !important;
}

.rr-nav-link:hover {
    background-color: var(--rr-surface-hover) !important;
}

.rr-nav-active {
    background-color: var(--rr-primary-light) !important;
    color: var(--rr-primary) !important;
    font-weight: 600;
}

.rr-nav-submenu {
    background-color: var(--rr-surface-soft) !important;
    border-left: 2px solid var(--rr-border);
    margin-left: 1rem;
}

/* Ensure mobile sidebar toggle uses rr-btn-icon style */
.sidebar-toggle-btn {
    background-color: transparent !important;
    border: none !important;
    color: var(--rr-text-primary) !important;
    font-size: 1.25rem;
    padding: 0.5rem;
}

/* Ensure existing dashboard container expands properly */
.wrapper-layout, .rr-dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--rr-bg);
}

#content, .rr-main {
    flex-grow: 1;
    background-color: var(--rr-bg) !important; /* overflow-y: auto removed to fix double scrollbar */
}


/* Custom Sidebar Hover & Icon Colors */
#sidebar.rr-sidebar .rr-nav-link i {
    color: var(--rr-text-secondary) !important;
}
#sidebar.rr-sidebar .rr-nav-link:hover {
    background-color: var(--rr-orange-light) !important;
    color: var(--rr-orange) !important;
}
#sidebar.rr-sidebar .rr-nav-link:hover i {
    color: var(--rr-orange) !important;
}
#sidebar.rr-sidebar .rr-nav-active {
    background-color: var(--rr-orange-light) !important;
    color: var(--rr-orange) !important;
    border-right: 3px solid var(--rr-orange);
}
#sidebar.rr-sidebar .rr-nav-active i {
    color: var(--rr-orange) !important;
}




