/**
 * Notification System Styles
 * Custom styles for the notification bell and dropdown panel
 */

/* Notification Badge Styles */
.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Notification Dropdown Styles */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
    transform-origin: top right;
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.notification-dropdown.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.notification-dropdown:not(.hidden) {
    opacity: 1;
    transform: scale(1);
    display: block;
    pointer-events: auto;
}

/* Notification Item Styles */
.notification-item {
    border-left: 3px solid transparent;
}

.notification-item.bg-blue-50 {
    border-left-color: #3b82f6;
    background-color: #eff6ff;
}

/* Text truncation for long messages */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom scrollbar for notification list */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Notification Bell Animation */
.notification-bell-shake {
    animation: bell-shake 0.5s ease-in-out;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-5deg); }
    20%, 40%, 60%, 80% { transform: rotate(5deg); }
}

/* Notification Icon Containers */
.notification-icon-container {
    flex-shrink: 0;
    margin-right: 12px;
    margin-top: 2px;
}

/* Unread Indicator Dot */
.notification-unread-dot {
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    margin-left: 8px;
    margin-top: 8px;
    flex-shrink: 0;
}

/* Loading State */
.notification-loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 280px;
        right: -20px;
    }
}

@media (max-width: 640px) {
    .notification-dropdown {
        width: 260px;
        right: -30px;
    }
}

/* Explicitly disable hover effects */
.notification-item:hover {
    background-color: inherit !important;
}

.notification-item.bg-blue-50:hover {
    background-color: #eff6ff !important;
}



/* Focus styles for accessibility */
.notification-item:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: -2px;
}

button:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Animation for new notifications */
.notification-new {
    animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}