/* Notification System Styling */

/* Notification badge animations */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none;
}

.notification-badge.notification-pulse {
    animation: urgent-pulse 0.5s 3;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 65, 108, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 65, 108, 0);
    }
}

@keyframes urgent-pulse {
    0%, 100% {
        transform: scale(1);
        background: linear-gradient(135deg, #ff416c, #ff4b2b);
    }
    50% {
        transform: scale(1.2);
        background: linear-gradient(135deg, #ff0000, #ff4b2b);
    }
}

/* Notification dropdown styling */
#notificationsDropdown .dropdown-menu {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.notification-item:hover {
    border-left-color: #6f42c1;
    background-color: rgba(111, 66, 193, 0.05);
}

.notification-item.unread {
    border-left-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.notification-item .notification-content {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.notification-item .notification-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Mark read button */
.mark-read-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-item:hover .mark-read-btn {
    opacity: 1;
}

/* Notification list page */
.notification-item.list-group-item-info {
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 4px solid #0d6efd;
}

/* Toast notification styling */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    border-left: 4px solid #6f42c1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification .toast-header {
    background: linear-gradient(135deg, #6f42c1, #0d6efd);
    color: white;
    border-radius: 8px 8px 0 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #notificationsDropdown .dropdown-menu {
        min-width: 280px;
        max-width: 90vw;
        right: 0;
        left: auto;
    }
    
    .notification-badge {
        font-size: 0.65rem;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
    }
}

/* Dark mode support */
[data-bs-theme="dark"] .notification-item {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .notification-item:hover {
    background-color: rgba(111, 66, 193, 0.1);
}

[data-bs-theme="dark"] .notification-item.unread {
    background-color: rgba(13, 110, 253, 0.1);
}

[data-bs-theme="dark"] .toast-notification {
    background: #2d3748;
    color: #e2e8f0;
}
