/* Sidebar height fixes */
.sidebar-wrapper {
    position: relative;
    height: 100%;
}

/* Fix for offcanvas in desktop mode */
@media (min-width: 992px) {
    .offcanvas-lg {
        position: static;
        visibility: visible !important;
        transform: none !important;
        height: 100% !important;
        width: 280px !important;
        max-width: 280px !important;
        border-right: none !important;
    }

    .offcanvas-lg .offcanvas-header {
        display: none;
    }

    .offcanvas-backdrop {
        display: none !important;
    }
}

/* Fix for offcanvas in mobile mode */
@media (max-width: 991.98px) {
    .offcanvas-lg {
        width: 280px !important;
        height: 100vh !important;
    }
}

/* Sidebar container */
.sidebar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Inner content of sidebar */
.sidebar-container > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

/* Active link styling */
.nav-pills .nav-link.active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-weight: 500;
}

/* Hover effect for nav links */
.nav-pills .nav-link:not(.active):hover {
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
}

/* User section styling */
.user-section .nav-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

/* Admin section styling - subtle visual difference */
.admin-section .nav-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
}

.admin-section .nav-link.active {
    border-left-color: var(--bs-primary);
}

.nav-pills .collapse.nav-item.show .nav-link:not(.active) {
    background-color: transparent !important;
    color: var(--bs-body-color) !important;
}

/* Icon styling */
.nav-link i {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

/* Transition effects */
.nav-link, .dropdown-toggle {
    transition: all 0.2s ease;
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Modal loading state */
.modal-body:empty::before {
    content: "Loading...";
    display: block;
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}