/* Notification System Styles */

/* Floating Notification Bell */
.notification-bell-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
}

.notification-bell-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a42a0);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.notification-bell-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.notification-bell-btn.has-notifications {
    animation: bellShake 2s infinite;
}

@keyframes bellShake {
    0%, 50%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

/* Offcanvas Customization */
#notificationOffcanvas {
    width: 400px;
    max-width: 90vw;
}

#notificationOffcanvas .offcanvas-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

#notificationOffcanvas .offcanvas-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

#notificationOffcanvas .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#notificationOffcanvas .btn-close:hover {
    opacity: 1;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-actions .btn {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.875rem;
}

.notification-actions .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Offcanvas Body */
#notificationOffcanvas .offcanvas-body {
    padding: 0;
    overflow-y: auto;
}

/* Notification List */
#notificationsList {
    min-height: 200px;
}

/* Individual Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.8));
    border-left: 4px solid #667eea;
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.06), rgba(248, 249, 250, 0.9));
}

/* Notification Avatar */
.notification-avatar {
    flex-shrink: 0;
    margin-right: 1rem;
    width: 48px;
    height: 48px;
}

.notification-avatar .avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.notification-avatar .avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #e9ecef;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    gap: 0.5rem;
}

.notification-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
}

.notification-time {
    font-size: 0.75rem;
    color: #718096;
    white-space: nowrap;
    flex-shrink: 0;
}

.notification-message {
    font-size: 0.875rem;
    color: #4a5568;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.notification-link {
    font-size: 0.875rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.notification-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Unread Indicator */
.unread-indicator {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Load More Button */
#loadMoreContainer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

#loadMoreNotifications {
    width: 100%;
    border-color: #667eea;
    color: #667eea;
    font-weight: 500;
}

#loadMoreNotifications:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Empty State */
.notification-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #718096;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading State */
.notification-loading {
    text-align: center;
    padding: 2rem 1.5rem;
}

.notification-loading .spinner-border {
    color: #667eea;
}

/* Error State */
.notification-error {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #e53e3e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-bell-container {
        bottom: 80px; /* Avoid mobile bottom navigation */
        left: 15px;
    }
    
    .notification-bell-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    #notificationOffcanvas {
        width: 100%;
        max-width: 100vw;
    }
    
    .notification-item {
        padding: 0.875rem 1rem;
    }
    
    .notification-avatar {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .notification-avatar .avatar-img,
    .notification-avatar .avatar-placeholder {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .notification-title {
        font-size: 0.9rem;
    }
    
    .notification-message {
        font-size: 0.8rem;
    }
}

/* Smooth Animations */
.notification-item {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Focus States for Accessibility */
.notification-bell-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.notification-item:focus {
    outline: none;
    background: #e6f3ff;
}

/* Dark Theme Support (if needed) */
@media (prefers-color-scheme: dark) {
    .notification-item {
        background: #2d3748;
        border-bottom-color: #4a5568;
        color: #e2e8f0;
    }
    
    .notification-item:hover {
        background: #374151;
    }
    
    .notification-item.unread {
        background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), rgba(45, 55, 72, 0.8));
    }
    
    .notification-title {
        color: #f7fafc;
    }
    
    .notification-message {
        color: #cbd5e0;
    }
    
    .notification-time {
        color: #a0aec0;
    }
    
    #loadMoreContainer {
        background: #374151;
        border-top-color: #4a5568;
    }
} 