/* Notification System Styles */

/* Bell Container */
.notification-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Bell Button */
.notification-bell {
    background: transparent;
    border: none;
    padding: 0.5rem;
    color: var(--text-color, #1a202c);
    font-size: 1.1rem;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.notification-bell:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color, #0066cc);
}

.notification-bell:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* Badge */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc3545;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Badge pulse animation for new notifications */
.notification-badge.has-new {
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0);
    }
}

/* Dropdown Menu */
.notification-dropdown {
    width: 360px;
    max-width: 90vw;
    padding: 0;
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-header-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-mark-all {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.notification-mark-all:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Notification List */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Individual Notification Item */
.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color, #e0e6ed);
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

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

.notification-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.08);
}

.notification-item.unread:hover {
    background: rgba(102, 126, 234, 0.12);
}

/* Notification Icon */
.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.notification-icon.type-info {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.notification-icon.type-success {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.notification-icon.type-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #d39e00;
}

.notification-icon.type-error {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color, #1a202c);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Site indicator in dropdown */
.notification-site {
    font-weight: 500;
    color: var(--primary-color, #0066cc);
}

.notification-site.broadcast {
    color: #ef4444;
}

/* Category badge */
.notification-category {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color, #0066cc);
    margin-left: 0.5rem;
    text-transform: uppercase;
    font-weight: 500;
}

/* Empty State */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: #999;
    gap: 0.5rem;
}

.notification-empty i {
    font-size: 2rem;
    opacity: 0.5;
}

.notification-empty span {
    font-size: 0.85rem;
}

/* Loading State */
.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: #666;
    gap: 0.5rem;
}

.notification-loading i {
    font-size: 1rem;
}

.notification-loading span {
    font-size: 0.85rem;
}

/* Footer with View All link */
.notification-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color, #e0e6ed);
    text-align: center;
}

.notification-view-all {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color, #0066cc);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.notification-view-all:hover {
    color: var(--secondary-color, #667eea);
    text-decoration: none;
}

.notification-view-all i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.notification-view-all:hover i {
    transform: translateX(3px);
}

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

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

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

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

/* Mobile responsiveness */
@media (max-width: 576px) {
    .notification-dropdown {
        width: 100vw;
        max-width: none;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: var(--pc-header-height, 68px) !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        transform: none !important;
    }

    .notification-list {
        max-height: 60vh;
    }
}
