/* Notification Badge Fix */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
    border-radius: 10px;
    background-color: #dc3545 !important;
    color: white !important;
    display: inline-block;
    z-index: 10;
}

.notification-badge:empty,
.notification-badge.d-none {
    display: none !important;
}

/* Make parent position relative */
#notificationsDropdown {
    position: relative;
}

/* Animation for new notifications */
.notification-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Notification dropdown improvements */
.notification-dropdown {
    width: 350px;
    max-height: 500px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.notification-body {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e8f4fd;
    border-left: 3px solid #0066cc;
    font-weight: 500;
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.notification-text {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    color: #999;
    font-size: 11px;
}

.no-notifications {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.notification-loading {
    padding: 40px 20px;
    text-align: center;
}

/* RTL Support */
[dir="rtl"] .notification-icon {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .notification-item.unread {
    border-left: none;
    border-right: 3px solid #0066cc;
}

[dir="rtl"] .notification-badge {
    right: auto;
    left: -8px;
}

/* Responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        width: 90vw;
        max-width: 350px;
    }
}
