/* Sliced Theme - Site Styles */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    z-index: 50;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: 72px;
}

/* Hide text elements when sidebar is collapsed */
.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-help-box {
    display: none;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.sidebar.collapsed .nav-menu .mud-nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .nav-menu .mud-nav-link .mud-nav-link-text {
    display: none;
}

.sidebar.collapsed .nav-menu .mud-nav-group {
    display: none;
}

.sidebar.collapsed .nav-menu {
    padding: 0 0.5rem;
}

[data-mode="dark"] .sidebar {
    border-right-color: #343331;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: 72px;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
}

/* Page Content */
.page-content {
    flex: 1;
}

/* Navigation Menu Styling */
.nav-menu .mud-nav-link {
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.nav-menu .mud-nav-link:hover {
    background-color: rgba(106, 105, 245, 0.1);
}

.nav-menu .mud-nav-link.active {
    background-color: rgba(106, 105, 245, 0.15);
    color: #6a69f5 !important;
}

/* Fix MudNavGroup styling - remove default indentation */
.nav-menu .mud-nav-group {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.nav-menu .mud-nav-group > .mud-collapse-wrapper {
    margin-left: 0 !important;
}

/* Only indent the child links inside expanded groups */
.nav-menu .mud-nav-group .mud-collapse-wrapper .mud-nav-link {
    padding-left: 2.5rem;
}

/* Fix the nav group header button */
.nav-menu .mud-expand-panel {
    margin: 0 !important;
    padding: 0 !important;
}

.nav-menu .mud-expand-panel-header {
    padding: 8px 16px !important;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.nav-menu .mud-expand-panel-header:hover {
    background-color: rgba(106, 105, 245, 0.1);
}

/* Dark mode navigation */
[data-mode="dark"] .nav-menu .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-mode="dark"] .nav-menu .mud-nav-link.active {
    background-color: rgba(106, 105, 245, 0.2);
}

/* Sidebar mode: dark */
[data-sidebar="dark"] .nav-menu .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Sidebar mode: brand */
[data-sidebar="brand"] .nav-menu .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Search Input */
.search-input .mud-input-outlined-border {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-mode="dark"] .search-input .mud-input-outlined-border {
    border-color: #343331;
}

.search-input input {
    background-color: #f9fbfd;
}

[data-mode="dark"] .search-input input {
    background-color: #151515;
}

/* Settings Panel */
.settings-panel {
    z-index: 100;
}

/* Quick Action Tiles */
.quick-action-tile {
    border-radius: 12px !important;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive: Mobile */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 60;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.sidebar-collapsed {
        margin-left: 0;
    }
}

/* MudBlazor Overrides for Theme */
.mud-theme-primary {
    background-color: #6a69f5 !important;
}

.mud-primary-text {
    color: #6a69f5 !important;
}

/* Card styling */
.mud-card {
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-mode="dark"] .mud-card {
    background-color: #1F1F1F;
    border-color: #343331;
}

/* Button styling */
.mud-button-filled.mud-button-primary {
    background-color: #6a69f5;
}

.mud-button-filled.mud-button-primary:hover {
    background-color: #5a59e5;
}

/* Table styling */
.mud-table {
    border-radius: 0.5rem;
    overflow: hidden;
}

[data-mode="dark"] .mud-table-container {
    background-color: #1F1F1F;
}

[data-mode="dark"] .mud-table-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dialog styling */
[data-mode="dark"] .mud-dialog {
    background-color: #1F1F1F;
}

/* Form inputs */
[data-mode="dark"] .mud-input {
    color: rgba(255, 255, 255, 0.87);
}

[data-mode="dark"] .mud-input-outlined .mud-input-outlined-border {
    border-color: #343331;
}

/* Drawer styling */
[data-mode="dark"] .mud-drawer {
    background-color: #1F1F1F;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #94989a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a69f5;
}

[data-mode="dark"] ::-webkit-scrollbar-thumb {
    background: #767273;
}
