/* /Components/Layout/MainLayoutSF.razor.rz.scp.css */
/* Syncfusion MainLayout Styles */

#sidebar-wrapper[b-3ub9athdw5] {
    --morse-background-color: #07519C;
    
}

.defaultToolbar[b-3ub9athdw5] {
    background-color: var(--morse-background-color, #07519C);
    color: #fff;
    border-bottom: 1px solid var(--rz-border-color, #dee2e6);
    padding: 0.5rem 1rem;
    position: relative; /* ensure z-index works */
    z-index: 99999 !important; /* keep toolbar above the sidebar */
    height: 60px; /* ensure consistent height */
    min-height: 60px;
}

/* Scoped toolbar items background - apply within sidebar-wrapper only */
#sidebar-wrapper[b-3ub9athdw5]  .defaultToolbar .e-toolbar-items {
    background: var(--morse-background-color) !important;
}

#sidebar-wrapper[b-3ub9athdw5]  .defaultToolbar.e-toolbar {
    background-color: var(--morse-background-color) !important;
}

/* Ensure toolbar buttons are on top and visible */
.defaultToolbar .e-btn[b-3ub9athdw5],
.defaultToolbar .e-button[b-3ub9athdw5],
.defaultToolbar .e-toolbar-item[b-3ub9athdw5] {
    position: relative;
    z-index: 100000 !important;
    pointer-events: auto !important; /* ensure click events work */
    cursor: pointer;
}

/* Specific fix for menu button */
.defaultToolbar .e-btn.e-outline[b-3ub9athdw5] {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
    visibility: visible !important;
    display: inline-flex !important;
    opacity: 1 !important;
}

.defaultToolbar .e-btn.e-outline:hover[b-3ub9athdw5] {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ensure toolbar icon color is visible */
.defaultToolbar .e-icons[b-3ub9athdw5] {
    color: #fff !important;
    font-size: 20px;
}

/* Menu button specific styles */
.defaultToolbar .e-menu[b-3ub9athdw5] {
    color: #fff !important;
}

.defaultToolbar .e-toolbar-item[b-3ub9athdw5] {
    color: #fff;
}

.e-folder-name[b-3ub9athdw5] {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Scoped ::deep selectors - only apply within sidebar-wrapper */
#sidebar-wrapper[b-3ub9athdw5]  .e-sidebar.e-left {
    top: 40px !important;
    background-color: var(--morse-background-color, #07519C);
}

/* Only apply to TreeView in the sidebar */
.default-sidebar[b-3ub9athdw5]  .e-treeview .e-list-text {
    color: #fff !important;
    font-size: 14px;
}

.default-sidebar[b-3ub9athdw5]  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-collapsible,
.default-sidebar[b-3ub9athdw5]  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-expandable {
    color: #fff !important;
}

.default-sidebar[b-3ub9athdw5]  .e-treeview .e-list-item.e-active > .e-fullrow {
    background-color: #f0eded85 !important;
}

.default-sidebar[b-3ub9athdw5]  .e-treeview .e-list-item.e-active.e-hover > .e-fullrow,
.default-sidebar[b-3ub9athdw5]  .e-treeview .e-list-item.e-active.e-node-focus > .e-fullrow {
    background-color: #f0eded85 !important;
    border-color: #f0eded85 !important;
}

.default-sidebar[b-3ub9athdw5] {
    background-color: var(--morse-background-color);
    border-right: 1px solid var(--rz-border-color, #dee2e6);
    box-sizing: border-box;
    position: relative;
    top: 40px;
    /* prevent shrinking/gaps when flex layout changes */
    flex-shrink: 0;
    z-index: 1000 !important; /* keep below toolbar */
}

/* Remove width forcing so SfSidebar can animate open/close properly */
.default-sidebar .e-sidebar[b-3ub9athdw5],
.default-sidebar .e-content-animation[b-3ub9athdw5] {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    background-color: inherit !important; /* ensure no white track shows */
}

/* Only the actual scroll container should reserve gutter */
.sidebar-scroll[b-3ub9athdw5],
.default-sidebar .e-treeview[b-3ub9athdw5],
.default-sidebar [style*="overflow-y: auto"][b-3ub9athdw5],
.default-sidebar .e-sidebar[b-3ub9athdw5],
.default-sidebar .e-content-animation[b-3ub9athdw5] {
    scrollbar-gutter: stable; /* not both-edges */
    box-sizing: border-box;
}

/* Slight padding so content doesn't sit under the thumb */
.sidebar-scroll[b-3ub9athdw5],
.default-sidebar [style*="overflow-y: auto"][b-3ub9athdw5],
.default-sidebar .e-treeview[b-3ub9athdw5] {
    padding-right: 4px;
    background-clip: padding-box;
}

/* Custom Scrollbar Styles for Sidebar - WebKit browsers */
.default-sidebar[b-3ub9athdw5]::-webkit-scrollbar {
    width: 6px;
}

/* Make the track use the sidebar background so underlying page color cannot show through */
.default-sidebar[b-3ub9athdw5]::-webkit-scrollbar-track {
    background: var(--rz-sidebar-background-color, #f8f9fa);
    margin: 4px 0;
}

.default-sidebar[b-3ub9athdw5]::-webkit-scrollbar-thumb {
    background-color: rgba(7, 81, 156, 0.4);
    border-radius: 3px;
}

.default-sidebar[b-3ub9athdw5]::-webkit-scrollbar-thumb:hover {
    background-color: rgba(7, 81, 156, 0.6);
}

/* Apply to Syncfusion sidebar content wrapper */
.default-sidebar .e-sidebar[b-3ub9athdw5],
.default-sidebar .e-content-animation[b-3ub9athdw5] {
    scrollbar-width: thin;
    scrollbar-color: rgba(7, 81, 156, 0.4) var(--rz-sidebar-background-color, #f8f9fa);
}

.default-sidebar .e-sidebar[b-3ub9athdw5]::-webkit-scrollbar,
.default-sidebar .e-content-animation[b-3ub9athdw5]::-webkit-scrollbar {
    width: 6px;
}

.default-sidebar .e-sidebar[b-3ub9athdw5]::-webkit-scrollbar-track,
.default-sidebar .e-content-animation[b-3ub9athdw5]::-webkit-scrollbar-track {
    background: var(--rz-sidebar-background-color, #f8f9fa);
    margin: 4px 0;
}

.default-sidebar .e-sidebar[b-3ub9athdw5]::-webkit-scrollbar-thumb,
.default-sidebar .e-content-animation[b-3ub9athdw5]::-webkit-scrollbar-thumb {
    background-color: rgba(7, 81, 156, 0.4);
    border-radius: 3px;
}

.default-sidebar .e-sidebar[b-3ub9athdw5]::-webkit-scrollbar-thumb:hover,
.default-sidebar .e-content-animation[b-3ub9athdw5]::-webkit-scrollbar-thumb:hover {
    background-color: rgba(7, 81, 156, 0.6);
}

/* Apply to TreeView container inside sidebar */
.default-sidebar .e-treeview[b-3ub9athdw5],
.default-sidebar [style*="overflow-y: auto"][b-3ub9athdw5] {
    scrollbar-width: thin;
    scrollbar-color: rgba(7, 81, 156, 0.4) var(--rz-sidebar-background-color, #f8f9fa);
}

.default-sidebar .e-treeview[b-3ub9athdw5]::-webkit-scrollbar,
.default-sidebar [style*="overflow-y: auto"][b-3ub9athdw5]::-webkit-scrollbar {
    width: 6px;
}

.default-sidebar .e-treeview[b-3ub9athdw5]::-webkit-scrollbar-track,
.default-sidebar [style*="overflow-y: auto"][b-3ub9athdw5]::-webkit-scrollbar-track {
    background: var(--rz-sidebar-background-color, #f8f9fa);
    margin: 4px 0;
}

.default-sidebar .e-treeview[b-3ub9athdw5]::-webkit-scrollbar-thumb,
.default-sidebar [style*="overflow-y: auto"][b-3ub9athdw5]::-webkit-scrollbar-thumb {
    background-color: rgba(7, 81, 156, 0.4);
    border-radius: 3px;
}

.default-sidebar .e-treeview[b-3ub9athdw5]::-webkit-scrollbar-thumb:hover,
.default-sidebar [style*="overflow-y: auto"][b-3ub9athdw5]::-webkit-scrollbar-thumb:hover {
    background-color: rgba(7, 81, 156, 0.6);
}

/* Remove pseudo border that could contribute to visual gap */
/* .default-sidebar::after { removed } */

.default-sidebar .e-menu-wrapper[b-3ub9athdw5] {
    background-color: transparent;
}

.default-sidebar .e-menu-item[b-3ub9athdw5] {
    padding: 0.75rem 1rem;
}

.default-sidebar .e-menu-item:hover[b-3ub9athdw5] {
    background-color: var(--rz-sidebar-item-hover-background-color, rgba(0, 0, 0, 0.05));
}

.default-sidebar .e-menu-item.e-selected[b-3ub9athdw5] {
    background-color: var(--rz-sidebar-item-selected-background-color, #07519C);
    color: #fff;
}

.maincontent[b-3ub9athdw5] {
    background-color: var(--rz-body-background-color, #fff);
}

/* Profile Menu Dropdown Styles */
.e-dropdown-btn.e-caret-hide[b-3ub9athdw5]::after {
    content: none;
}

.e-dropdown-btn .e-user[b-3ub9athdw5] {
    font-size: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .default-sidebar[b-3ub9athdw5] {
        width: 100% !important;
    }
}

/* Alert Console Styles */
.alert[b-3ub9athdw5] {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-danger[b-3ub9athdw5] {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Button Styles */
.e-primary[b-3ub9athdw5] {
    background-color: #07519C;
    border-color: #07519C;
    color: #fff;
}

.e-primary:hover[b-3ub9athdw5] {
    background-color: #05407d;
    border-color: #05407d;
}

/* Notification Button States */
.e-info[b-3ub9athdw5] {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.e-outline.e-info[b-3ub9athdw5] {
    background-color: transparent;
    border-color: #17a2b8;
    color: #17a2b8;
}

.e-outline.e-info:hover[b-3ub9athdw5] {
    background-color: #17a2b8;
    color: #fff;
}
