/**
 * Notification System Styles
 * Custom styles for real-time market event notifications
 */

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    display: none;
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Notification Dropdown */
.dropdown-menu.dropdown-navbar {
    max-height: 400px;
    overflow-y: auto;
    min-width: 350px;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.notification-item.unread {
    background: rgba(29, 140, 248, 0.1);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* Notification Icon */
.notification-item i {
    font-size: 20px;
    margin-right: 12px;
    margin-top: 2px;
    min-width: 20px;
}

/* Notification Content */
.notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-title {
    font-size: 14px;
    line-height: 1.4;
}

.notification-title strong {
    color: var(--white);
    font-weight: 600;
}

.notification-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
}

.notification-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px !important;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 10px;
}

.empty-state p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 20px !important;
}

.loading-state p {
    margin: 0;
    font-size: 13px;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 40px 20px !important;
}

.error-state i {
    display: block;
    margin-bottom: 10px;
}

.error-state p {
    margin-bottom: 10px;
    font-size: 13px;
}

/* View All Link */
.dropdown-navbar .nav-link.text-center:last-child {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    padding-top: 12px !important;
}

.dropdown-navbar .nav-link.text-center:last-child a {
    color: var(--primary);
    font-size: 13px;
    padding: 8px 0 !important;
}

.dropdown-navbar .nav-link.text-center:last-child a:hover {
    color: var(--info);
    background: transparent !important;
}

/* Scrollbar Styling */
.dropdown-menu.dropdown-navbar::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu.dropdown-navbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dropdown-menu.dropdown-navbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.dropdown-menu.dropdown-navbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Priority Indicators */
.notification-item[data-priority="high"] i {
    color: var(--danger) !important;
}

.notification-item[data-priority="medium"] i {
    color: var(--warning) !important;
}

.notification-item[data-priority="low"] i {
    color: var(--info) !important;
}

/* Type-specific styling */
.notification-item[data-notification-type="signal"] {
    border-left: 3px solid var(--primary);
}

.notification-item[data-notification-type="sentiment"] {
    border-left: 3px solid var(--warning);
}

.notification-item[data-notification-type="portfolio"] {
    border-left: 3px solid var(--success);
}

.notification-item[data-notification-type="opportunity"] {
    border-left: 3px solid var(--danger);
}

.notification-item[data-notification-type="system"] {
    border-left: 3px solid var(--info);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dropdown-menu.dropdown-navbar {
        min-width: 280px;
        max-height: 300px;
    }
    
    .notification-item {
        padding: 10px 15px !important;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}

/* Animation for new notifications */
@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item.new {
    animation: slideInNotification 0.3s ease-out;
}
