/* =====================================================
   قائمة الإشعارات / Notifications Dropdown
   ===================================================== */
.notifications-dropdown .dropdown-menu {
    width: 380px;
    padding: 0;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.notifications-dropdown .dropdown-header {
    flex-shrink: 0;
    background: var(--bg-white);
    z-index: 2;
}

.notifications-dropdown .dropdown-body {
    padding: 0;
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none;
    /* Ensure no underline */
    color: var(--text-primary);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-light);
    text-decoration: none;
}

.notification-item.unread {
    background-color: rgba(11, 61, 145, 0.03);
    border-right: 3px solid var(--primary);
}

.notification-item .icon-wrapper {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background-color: var(--bg-light);
}

.notification-item .icon-wrapper.text-success {
    background-color: var(--success-light);
    color: var(--success);
}

.notification-item .icon-wrapper.text-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.notification-item .icon-wrapper.text-info {
    background-color: var(--info-light);
    color: var(--info);
}

.notification-item .icon-wrapper.text-primary {
    background-color: rgba(11, 61, 145, 0.1);
    color: var(--primary);
}

.notification-item .content {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.notification-item .title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.notification-item .message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item .time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: left;
    /* Make time aligned to left for contrast */
    direction: ltr;
    /* Keeping time LTR often looks better for numbers, or keep RTL */
}

/* Scrollbar for notifications */
.notifications-dropdown .dropdown-body::-webkit-scrollbar {
    width: 6px;
}

.notifications-dropdown .dropdown-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notifications-dropdown .dropdown-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.notifications-dropdown .dropdown-body::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .notifications-dropdown .dropdown-menu {
        width: 300px;
        right: -50px;
        /* Adjust positioning on small screens */
        left: auto;
    }
}