/* Notification Badge Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.pulse .badge {
    animation: pulse 2s infinite;
}

/* Sidebar Module Indicator (Red Dot) */
.sidebar-menu li a.has-notifications {
    position: relative;
}

.sidebar-menu li a.has-notifications::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid #1e293b;
    /* Match sidebar background */
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.5);
}

/* Adjust for collapsed sidebar */
.sidebar.collapsed .sidebar-menu li a.has-notifications::after {
    top: 5px;
    right: 5px;
    border-color: #1e293b;
}

/* Dark mode adjustments */
.dark-mode .sidebar-menu li a.has-notifications::after {
    border-color: #1e293b;
    /* Adjust if dark mode sidebar bg is different */
}

/* Toast Container Z-Index */
#notification-toast-container {
    z-index: 9999;
}

/* Drawer Styles */
.notification-drawer .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.notification-drawer .list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.notification-drawer .list-group-item.bg-light-primary {
    background-color: rgba(13, 110, 253, 0.05);
    border-left-color: #0d6efd;
}

.notification-drawer .list-group-item.bg-light-primary:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* ========================================
   PINNED DRAWER FUNCTIONALITY
   ======================================== */

/* Pinned drawer state - fixed position, no overlay */
.notification-drawer.pinned {
    position: fixed !important;
    right: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    width: 400px !important;
    transform: none !important;
    visibility: visible !important;
    z-index: 1040 !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
}

/* Remove backdrop when pinned */
.notification-drawer.pinned+.offcanvas-backdrop {
    display: none !important;
}

/* Adjust main content when drawer is pinned */
body.drawer-pinned .main-content {
    margin-right: 400px !important;
    transition: margin-right 0.3s ease;
}

/* Responsive: smaller drawer on mobile */
@media (max-width: 768px) {
    .notification-drawer.pinned {
        width: 100% !important;
    }

    body.drawer-pinned .main-content {
        margin-right: 0 !important;
    }
}

/* Pin button styling */
#notification-pin-btn {
    color: #6c757d;
    padding: 0.25rem 0.5rem;
}

#notification-pin-btn:hover {
    color: #0d6efd;
}

#notification-pin-btn i.fa-times {
    color: #dc3545;
}