/* Notification System Styles */

.notification-container {
    position: relative;
    display: inline-block;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.notification-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dark theme support for notification icon */
body.dark .notification-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    display: none;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    /* max-height: 500px; */
    background: var(--dropdown-bg, white);
    border: 1px solid var(--dropdown-border, #ddd);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.notification-dropdown::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 var(--dropdown-arrow, white);
}

/* Dark theme support for notification dropdown */
body.dark .notification-dropdown {
    background: #2C394B;
    border: 1px solid #334756;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark .notification-dropdown::before {
    border-bottom: 8px solid #2C394B;
}

.notification-header {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Dark theme support for notification header */
body.dark .notification-header {
    border-bottom: 1px solid #334756;
    background-color: #334756;
}

body.dark .notification-header h5 {
    color: #ffffff;
}

.notification-header .btn {
    font-size: 12px;
    padding: 4px 8px;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    position: relative;
}

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

.notification-item.unread {
    background-color: #f0f8ff;
    border-left: 3px solid #007bff;
}

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

/* Dark theme support for notification items */
body.dark .notification-item {
    border-bottom: 1px solid #334756;
    background-color: #2C394B;
}

body.dark .notification-item:hover {
    background-color: #334756;
}

body.dark .notification-item.unread {
    background-color: rgba(0, 123, 255, 0.1);
    border-left: 3px solid #007bff;
}

.notification-content {
    /* padding-right: 50px; */
}

.notification-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.notification-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 5px;
}

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

/* Dark theme support for notification text */
body.dark .notification-title {
    color: #ffffff;
}

body.dark .notification-message {
    color: #d0d0d0;
}

body.dark .notification-time {
    color: #999;
}

.notification-related {
    margin-top: 5px;
}

.notification-related a {
    color: #007bff;
    text-decoration: none;
}

.notification-related a:hover {
    text-decoration: underline;
}

.notification-actions {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    gap: 5px;
}

.notification-actions .btn {
    font-size: 11px;
    padding: 2px 6px;
    min-width: auto;
}

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

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.notification-empty p {
    margin: 0;
    font-size: 14px;
}

/* Dark theme support for empty state */
body.dark .notification-empty {
    color: #d0d0d0;
}

body.dark .notification-empty i {
    color: #999;
}

/* Notification type badges */
.notification-type-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 3px;
    margin-right: 5px;
}

.notification-type-badge.price_alert {
    background-color: #dc3545;
    color: white;
}

.notification-type-badge.news {
    background-color: #28a745;
    color: white;
}

.notification-type-badge.market_update {
    background-color: #17a2b8;
    color: white;
}

.notification-type-badge.system {
    background-color: #6c757d;
    color: white;
}

.notification-type-badge.portfolio {
    background-color: #fd7e14;
    color: white;
}

.notification-type-badge.watchlist {
    background-color: #6f42c1;
    color: white;
}

.notification-type-badge.general {
    background-color: #6c757d;
    color: white;
}

/* Priority badges */
.priority-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 3px;
    margin-left: 5px;
}

.priority-badge.low {
    background-color: #6c757d;
    color: white;
}

.priority-badge.medium {
    background-color: #ffc107;
    color: #212529;
}

.priority-badge.high {
    background-color: #fd7e14;
    color: white;
}

.priority-badge.urgent {
    background-color: #dc3545;
    color: white;
}

/* Scrollbar styling for notification list */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

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

.notification-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Dark theme scrollbar styling */
body.dark .notification-list::-webkit-scrollbar-track {
    background: #334756;
}

body.dark .notification-list::-webkit-scrollbar-thumb {
    background: #4a5568;
}

body.dark .notification-list::-webkit-scrollbar-thumb:hover {
    background: #5a6c7a;
}

/* Notification footer styling */
.notification-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    text-align: center;
    background-color: #f8f9fa;
}

/* Dark theme support for notification footer */
body.dark .notification-footer {
    border-top: 1px solid #334756;
    background-color: #334756;
}

/* Responsive design */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .notification-dropdown::before {
        right: 70px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 280px;
        right: -80px;
    }
    
    .notification-dropdown::before {
        right: 100px;
    }
    
    .notification-item {
        padding: 12px 15px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
} 