/* NORSU Alumni System - Notification Styles */

/* Modern Notification Bell - Flex Column Design */
.notification-dropdown {
    margin-right: 0.75rem;
}

.notification-dropdown .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    position: relative;
    text-decoration: none;
    gap: 0.25rem;
    white-space: nowrap;
}

.notification-dropdown .nav-link span {
    font-size: 0.875rem;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
}

.notification-dropdown .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-dropdown .nav-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.notification-dropdown .nav-link i {
    font-size: 1rem;
    transition: all 0.2s ease;
    opacity: 0.9;
    position: relative; /* Ensure bell icon can serve as positioning reference */
}

.notification-dropdown .nav-link:hover i {
    opacity: 1;
    transform: scale(1.1);
}





/* Notification Badge - Attached to Bell Icon */
.notification-badge {
    font-size: 0.625rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    line-height: 16px; /* Adjusted for better text centering */
    text-align: center;
    border: 2px solid white;
    animation: notificationPulse 2s infinite;
    position: absolute !important;
    z-index: 10;
    /* Position directly on the bell icon (top-right corner) */
    top: -6px !important;
    right: -6px !important;
    transform: none !important;
    /* Ensure badge expands for larger numbers */
    padding: 0 4px;
    white-space: nowrap;
    box-sizing: border-box;
}

@keyframes notificationPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8; 
    }
}

/* Notification Dropdown Menu */
.notification-dropdown-menu {
    width: 380px;
    max-width: 90vw;
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-top: 0.5rem;
    background: white;
    backdrop-filter: blur(10px);
}

.notification-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* Notification Header */
.notification-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: var(--font-weight-semibold);
    font-size: 0.9375rem;
}

.notification-header h6 {
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
}

.notification-header .btn-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-normal);
}

.notification-header .btn-link:hover {
    color: white;
    transform: scale(1.1);
}

/* Notification List */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Individual Notification Items */
.notification-item {
    transition: var(--transition-normal);
    position: relative;
}

.notification-item:hover {
    background: rgba(43, 60, 107, 0.02);
}

.notification-item.notification-unread {
    background: rgba(43, 60, 107, 0.03);
    border-left: 3px solid var(--primary-color);
}

.notification-content {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-normal);
}

.notification-content:hover {
    background: rgba(43, 60, 107, 0.05);
}

.notification-content:last-child {
    border-bottom: none;
}

/* Notification Avatar */
.notification-avatar img {
    border: 2px solid rgba(43, 60, 107, 0.1);
    transition: var(--transition-normal);
}

.notification-item:hover .notification-avatar img {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Notification Body */
.notification-body {
    min-width: 0; /* Allows text truncation */
}

.notification-title {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-message {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: var(--font-weight-normal);
}

.notification-time i {
    opacity: 0.7;
}

/* Notification Dot (Unread Indicator) */
.notification-dot {
    flex-shrink: 0;
    animation: notificationDotPulse 2s infinite;
}

@keyframes notificationDotPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.2); 
    }
}

/* No Notifications State */
#no-notifications {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

#no-notifications i {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

#no-notifications p {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
}

/* Notification Footer */
.notification-footer {
    background: rgba(248, 249, 250, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-footer .dropdown-item {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    color: var(--primary-color);
    text-align: center;
    padding: 0.75rem 1rem;
    transition: var(--transition-normal);
}

.notification-footer .dropdown-item:hover {
    background: rgba(43, 60, 107, 0.05);
    color: var(--primary-dark);
}

/* Large Desktop Responsive */
@media (min-width: 1200px) {
    .notification-badge {
        /* Optimal positioning for large screens - attached to bell */
        top: -6px !important;
        right: -6px !important;
    }
}

/* Tablet Responsive */
@media (max-width: 991.98px) {
    .notification-badge {
        /* Slightly adjust positioning for tablet screens - attached to bell */
        top: -6px !important;
        right: -6px !important;
    }
}

/* Modern Mobile Responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        margin-right: 0.5rem;
    }

    .notification-dropdown .nav-link {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.85rem;
        border-radius: 6px;
    }

    .notification-dropdown .nav-link i {
        font-size: 1rem;
    }

    .notification-dropdown .nav-link span {
        font-size: 0.8rem;
        margin-top: 0.2rem;
    }

    .notification-badge {
        min-width: 16px;
        height: 16px;
        line-height: 14px; /* Adjusted for better text centering on mobile */
        font-size: 0.5rem;
        /* Maintain attachment to bell icon on mobile */
        top: -4px !important;
        right: -4px !important;
        padding: 0 3px; /* Reduced padding for mobile */
    }



    .notification-dropdown-menu {
        width: 320px;
        right: -10px !important;
        left: auto !important;
    }

    .notification-dropdown-menu::before {
        right: 50px;
    }

    .notification-content {
        padding: 0.625rem 0.75rem;
    }

    .notification-avatar img {
        width: 35px !important;
        height: 35px !important;
    }

    .notification-title {
        font-size: 0.75rem;
    }

    .notification-message {
        font-size: 0.6875rem;
    }

    .notification-time {
        font-size: 0.625rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .notification-dropdown-menu {
        border: 2px solid var(--primary-color);
    }
    
    .notification-item.notification-unread {
        border-left-width: 4px;
    }
    
    .notification-badge {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .notification-badge,
    .notification-dot {
        animation: none;
    }

    .notification-dropdown .nav-link:hover,
    .notification-dropdown .nav-link:hover i,
    .notification-item:hover .notification-avatar img {
        transform: none;
    }

    .notification-header .btn-link:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .notification-dropdown,
    .notification-dropdown-menu {
        display: none !important;
    }
}

/* Focus Styles for Accessibility */
.notification-content:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.notification-header .btn-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Loading State */
.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
}

.notification-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
