/**
 * Notifications Center Styles
 * 
 * Bell icon with dropdown and notifications list
 */

/* =============================================
   Notification Bell Icon
   ============================================= */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.notification-bell:hover {
    background: var(--bg-hover, #f5f5f5);
}

.notification-bell i {
    font-size: 20px;
    color: var(--text-secondary, #666);
}

.notification-bell:hover i {
    color: var(--text-primary, #191919);
}

/* Notification badge count */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #cc1016;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-badge.hidden {
    display: none;
}

/* Bell shake animation when new notification */
.notification-bell.has-new i {
    animation: bell-shake 0.5s ease;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-10deg); }
}

/* =============================================
   Notification Dropdown
   ============================================= */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 12px;
    box-shadow: var(--shadow-xl, 0 12px 48px rgba(0, 0, 0, 0.15));
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: all 0.2s ease;
    overflow: hidden;
}

.notification-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown header */
.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-tertiary, #f3f2ef);
}

.notification-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #191919);
    margin: 0;
}

.notification-header-actions {
    display: flex;
    gap: 12px;
}

.mark-all-read {
    font-size: 13px;
    color: var(--color-primary, #0a66c2);
    cursor: pointer;
    transition: color 0.2s;
}

.mark-all-read:hover {
    color: var(--color-primary-hover, #004182);
    text-decoration: underline;
}

/* Notification list */
.notification-list {
    max-height: 380px;
    overflow-y: auto;
}

/* Empty state */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary, #999);
}

.notification-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 14px;
}

/* =============================================
   Notification Item
   ============================================= */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-hover, #f5f5f5);
}

.notification-item.unread {
    background: var(--color-info-bg, #e8f4fd);
}

.notification-item.unread:hover {
    background: #d4e8f9;
}

/* Notification icon */
.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon i {
    font-size: 18px;
}

/* Icon colors by type */
.notification-icon.blue { background: #e8f4fd; color: #0a66c2; }
.notification-icon.green { background: #e6f4ed; color: #057642; }
.notification-icon.purple { background: #f3e8fd; color: #7c3aed; }
.notification-icon.orange { background: #fdf2e8; color: #b24020; }
.notification-icon.red { background: #fce8e8; color: #cc1016; }
.notification-icon.yellow { background: #fef9e8; color: #8b6914; }
.notification-icon.cyan { background: #e8f8fd; color: #0891b2; }
.notification-icon.gray { background: #f3f2ef; color: #666; }

/* Notification content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #191919);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 12px;
    color: var(--text-tertiary, #999);
}

/* Unread indicator */
.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-primary, #0a66c2);
    border-radius: 50%;
}

.notification-item {
    position: relative;
}

/* =============================================
   Notification Footer
   ============================================= */
.notification-footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-tertiary, #f3f2ef);
}

.notification-footer a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary, #0a66c2);
    text-decoration: none;
    transition: color 0.2s;
}

.notification-footer a:hover {
    color: var(--color-primary-hover, #004182);
    text-decoration: underline;
}

/* =============================================
   Notifications Page
   ============================================= */
.notifications-page {
    max-width: 800px;
    margin: 0 auto;
}

.notifications-page .notification-item {
    background: var(--card-bg, #fff);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
}

.notifications-page .notification-item:hover {
    border-color: var(--color-primary, #0a66c2);
}

/* Filter tabs */
.notification-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.notification-filter {
    padding: 8px 16px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary, #666);
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-filter:hover {
    border-color: var(--color-primary, #0a66c2);
    color: var(--color-primary, #0a66c2);
}

.notification-filter.active {
    background: var(--color-primary, #0a66c2);
    border-color: var(--color-primary, #0a66c2);
    color: white;
}

/* Delete button */
.notification-delete {
    opacity: 0;
    padding: 8px;
    color: var(--text-tertiary, #999);
    transition: all 0.2s ease;
    border-radius: 50%;
}

.notification-item:hover .notification-delete {
    opacity: 1;
}

.notification-delete:hover {
    background: var(--color-error-bg, #fce8e8);
    color: var(--color-error, #cc1016);
}

/* =============================================
   Toast Notifications
   ============================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12));
    border-left: 4px solid var(--color-info, #0a66c2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-color: var(--color-success, #057642); }
.toast.error { border-color: var(--color-error, #cc1016); }
.toast.warning { border-color: var(--color-warning, #b24020); }

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon { color: var(--color-success, #057642); }
.toast.error .toast-icon { color: var(--color-error, #cc1016); }
.toast.warning .toast-icon { color: var(--color-warning, #b24020); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary, #191919);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.toast-close {
    padding: 4px;
    cursor: pointer;
    color: var(--text-tertiary, #999);
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary, #191919);
}

/* =============================================
   Mobile Responsive
   ============================================= */
@media (max-width: 480px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
    
    .notification-item {
        padding: 12px 16px;
    }
    
    .notification-icon {
        width: 40px;
        height: 40px;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast {
        max-width: none;
    }
}

