/* ==================== */
/* USER OFFCANVAS MENU */
/* ==================== */

#userOffcanvas {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(82, 4, 141, 0.1);
}

#userOffcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(82, 4, 141, 0.1);
    padding: 1rem 1.5rem;
}

#userOffcanvas .offcanvas-title {
    font-weight: 600;
    color: var(--dark-violet);
}

#userOffcanvas .offcanvas-body {
    padding: 1.5rem;
}

#userOffcanvas .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    color: #4a5568;
    font-weight: 500;
}

#userOffcanvas .list-group-item:hover {
    background: rgba(82, 4, 141, 0.05);
    color: var(--dark-violet);
}

#userOffcanvas .list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
}

#userOffcanvas .list-group-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

#userOffcanvas hr {
    margin: 1rem 0;
    border-color: rgba(82, 4, 141, 0.1);
}

/* ==================== */
/* NAVBAR OFFCANVAS MENU (MOBILE) */
/* ==================== */

#navbarOffcanvas {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(82, 4, 141, 0.1);
}

#navbarOffcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(82, 4, 141, 0.1);
    padding: 1rem 1.5rem;
}

#navbarOffcanvas .offcanvas-title {
    font-weight: 600;
    color: var(--dark-violet);
}

#navbarOffcanvas .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    color: #4a5568;
    font-weight: 500;
}

#navbarOffcanvas .list-group-item:hover {
    background: rgba(82, 4, 141, 0.05);
    color: var(--dark-violet);
}

#navbarOffcanvas .list-group-item.active {
    background: rgba(138, 43, 226, 0.1);
    color: var(--dark-violet);
}

#navbarOffcanvas .list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
}

#navbarOffcanvas .list-group-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Fix for user profile image to maintain circular shape */
.user-profile-image-container {
    flex-shrink: 0;
    margin-right: 1rem;
}

.user-profile-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #8a2be2;
}

.user-profile-info {
    flex-grow: 1;
    min-width: 0;
    /* Allow text to truncate */
}

.user-profile-name {
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
}

/* Toggle button ripple effect */
.sidebar-toggle-mobile {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
    background: transparent;
    border: none;
}

.sidebar-toggle-mobile:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.sidebar-toggle-mobile:active {
    transform: scale(0.95);
}

.toggle-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.sidebar-toggle-mobile:active .toggle-ripple {
    animation: ripple 0.6s ease-out;
}

/* Responsive adjustments for mobile */
@media (max-width: 991.98px) {
    #navbarOffcanvas .offcanvas-body {
        padding: 1rem;
    }

    #navbarOffcanvas .list-group-item {
        padding: 0.75rem 1rem;
    }
}

/* Animation for ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}