/**
 * ESM Notification System Styles
 * Styling for notification dropdown matching template design
 */

/* ============================================ */
/* NOTIFICATION BELL & BADGE                   */
/* ============================================ */

/* Notification badge - hidden by default, shown via JavaScript */
#notification-badge {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: bold;
    text-align: center;
    line-height: 14px;
}

/* Show badge when JavaScript sets display: inline-block */
#notification-badge[style*="inline-block"] {
    display: inline-block !important;
}

/* ============================================ */
/* NOTIFICATION DROPDOWN                       */
/* ============================================ */

/* Mark all as read button styling */
.mark-all-read-btn {
    transition: all 0.3s ease;
}

.mark-all-read-btn:hover {
    background-color: #f8f9fa !important;
    color: #667eea !important;
}

/* Notification list container */
#notification-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Custom scrollbar for notification list */
#notification-list::-webkit-scrollbar {
    width: 5px;
}

#notification-list::-webkit-scrollbar-track {
    background: #f1f3f5;
}

#notification-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

#notification-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================ */
/* NOTIFICATION ITEMS (Template Style)         */
/* ============================================ */

.notification-item {
    transition: background-color 0.2s ease;
    text-decoration: none !important;
}

.notification-item:hover {
    background-color: #f8f9fa !important;
}

/* Ensure preview icons match template style */
.preview-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.preview-icon i {
    font-size: 24px;
}

/* Text ellipsis for long messages */
.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================ */
/* ANIMATIONS                                  */
/* ============================================ */

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-3px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(3px);
    }
}

.bell-shake {
    animation: shake 0.5s ease;
    display: inline-block;
}

/* ============================================ */
/* RESPONSIVE DESIGN                           */
/* ============================================ */

@media (max-width: 768px) {
    #notification-list {
        max-height: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bell-shake {
        animation: none !important;
    }
}
