/* Notification Dropdown Styles - Theme Aligned */
#notificationDropdown {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(102, 126, 234, 0.1) !important;
    z-index: 9999 !important;
    width: 380px !important;
    max-height: 500px !important;
    overflow-y: auto !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    margin-top: 10px !important;
    font-family: var(--body-font) !important;
    /* Override any conflicting dropdown styles */
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Bell Icon - Theme Aligned */
.bell-icon {
    color: hsl(var(--white));
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.bell-icon:hover {
    color: hsl(var(--base-two));
    transform: scale(1.1);
}

.bell-icon.has-notifications::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, hsl(var(--base)), hsl(var(--base-two)));
    border-radius: 50%;
    border: 2px solid hsl(var(--white));
    box-shadow: 0 2px 4px hsl(var(--base) / 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Notification Items - Enhanced Design */
#notificationDropdown .notification-item {
    padding: 18px 24px !important;
    border-bottom: 1px solid rgba(102, 126, 234, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    background: rgba(255, 255, 255, 0.8) !important;
    cursor: pointer !important;
    list-style: none !important;
    margin: 0 !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

#notificationDropdown .notification-item:hover {
    background: rgba(102, 126, 234, 0.08) !important;
    transform: translateX(6px) !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15) !important;
    border-left: 3px solid #667eea !important;
}

#notificationDropdown .notification-item:last-child {
    border-bottom: none !important;
}

#notificationDropdown .notification-item.unread {
    background: hsl(var(--base-two) / 0.08) !important;
    border-left: 4px solid hsl(var(--base)) !important;
    position: relative !important;
}

#notificationDropdown .notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, hsl(var(--base)), hsl(var(--base-two)));
}

#notificationDropdown .notification-item.unread:hover {
    background: hsl(var(--base-two) / 0.12) !important;
}

/* Notification Content - Theme Aligned */
#notificationDropdown .notification-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

#notificationDropdown .notification-text {
    flex: 1 !important;
}

#notificationDropdown .notification-title {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: hsl(var(--heading-color)) !important;
    margin-bottom: 6px !important;
    line-height: 1.4 !important;
    font-family: var(--body-font) !important;
}

#notificationDropdown .notification-time {
    font-size: 12px !important;
    color: hsl(var(--body-color)) !important;
    font-weight: 500 !important;
    font-family: var(--body-font) !important;
}

#notificationDropdown .unread-indicator {
    width: 10px !important;
    height: 10px !important;
    background: linear-gradient(45deg, hsl(var(--base)), hsl(var(--base-two))) !important;
    border-radius: 50% !important;
    margin-left: 8px !important;
    box-shadow: 0 2px 4px hsl(var(--base) / 0.3) !important;
    animation: pulse 2s infinite !important;
}

/* Notification Header - Enhanced Design */
.notification-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 16px 16px 0 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notification-header h6 {
    margin: 0;
    font-weight: 700;
    color: #2d3748;
    font-size: 16px;
    font-family: var(--body-font);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-header h6 i {
    color: #667eea;
    font-size: 18px;
    animation: bellRing 2s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Notification Footer - Enhanced Design */
.notification-footer {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-radius: 0 0 12px 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.notification-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--body-font);
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.notification-footer a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s ease;
}

.notification-footer a:hover {
    color: #5a67d8;
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.notification-footer a:hover::before {
    left: 100%;
}

/* Empty and Error States - Theme Aligned */
.notification-empty {
    width: 100%;
    height: auto;
    padding: 1rem .2rem;
    margin: 0px;
    text-align: center;
    color: hsl(var(--body-color));
    font-family: var(--body-font);
}

.notification-error {
    padding: 20px;
    text-align: center;
    color: hsl(var(--base));
    background: hsl(var(--base-two) / 0.08);
    border-radius: 8px;
    margin: 10px;
    font-family: var(--body-font);
    border: 1px solid hsl(var(--base-two) / 0.2);
}

/* Scrollbar styling - Theme Aligned */
#notificationDropdown::-webkit-scrollbar {
    width: 6px;
}

#notificationDropdown::-webkit-scrollbar-track {
    background: hsl(var(--section-bg));
    border-radius: 3px;
}

#notificationDropdown::-webkit-scrollbar-thumb {
    background: hsl(var(--base) / 0.3);
    border-radius: 3px;
}

#notificationDropdown::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--base) / 0.5);
}

#notificationDropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Enhanced Theme Integration */
#notificationDropdown.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

/* Override any global dropdown styles */
#notificationDropdown,
#notificationDropdown * {
    box-sizing: border-box !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification item enhanced styling */
#notificationDropdown .notification-item {
    position: relative;
    overflow: hidden;
}

#notificationDropdown .notification-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsl(var(--white) / 0.2), transparent);
    transition: left 0.5s ease;
}

#notificationDropdown .notification-item:hover::after {
    left: 100%;
}

/* Enhanced unread notification styling */
#notificationDropdown .notification-item.unread {
    position: relative;
    background: linear-gradient(135deg, hsl(var(--base-two) / 0.08) 0%, hsl(var(--base) / 0.05) 100%) !important;
}

#notificationDropdown .notification-item.unread .notification-title {
    font-weight: 700 !important;
    color: hsl(var(--heading-color)) !important;
}

/* Theme-consistent button styling for footer */
.notification-footer a {
    position: relative;
    padding: 8px 16px;
    border-radius: 6px;
    background: hsl(var(--base) / 0.1);
    transition: all 0.3s ease;
}

.notification-footer a:hover {
    background: hsl(var(--base) / 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px hsl(var(--base) / 0.2);
}

/* Header icon styling */
.notification-header h6 i {
    color: hsl(var(--base));
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 767px) {
    #notificationDropdown {
        width: 320px;
        right: -60px;
    }
}

@media (max-width: 575px) {
    #notificationDropdown {
        width: 300px;
        right: -50px;
    }
}

@media (max-width: 400px) {
    #notificationDropdown {
        width: 280px;
        right: -80px;
    }
}
