/**
 * Notification Panel - Panneau latéral de notifications
 */

.notification-bell-container {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 16px;
}

.notification-bell-container:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-bell-container.has-notifications {
    animation: bellRing 1s ease-in-out;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

.notification-bell {
    width: 24px;
    height: 24px;
    color: var(--text-color, #fff);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #f44336;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.notification-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notification-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--card-bg, #1e1e1e);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-panel.open {
    right: 0;
}

.notification-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #333);
    background: var(--header-bg, #252525);
    flex-shrink: 0;
}

.notification-panel-header h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: var(--text-color, #fff);
}

.notification-panel-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.notification-panel-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

#markAllReadBtn {
    background: #2196f3;
    color: white;
}

#markAllReadBtn:hover {
    background: #1976d2;
}

#clearAllNotificationsBtn {
    background: #f44336;
    color: white;
}

#clearAllNotificationsBtn:hover {
    background: #d32f2f;
}

.notification-panel-close {
    margin-left: auto;
    background: transparent;
    color: var(--text-color, #fff);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.notification-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--item-bg, #252525);
    border-radius: 8px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.notification-item:hover {
    background: var(--item-hover-bg, #2a2a2a);
}

.notification-item.unread {
    background: var(--item-unread-bg, rgba(33, 150, 243, 0.1));
    border-left-color: #2196f3;
}

.notification-item.read {
    opacity: 0.7;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--icon-bg, rgba(255, 255, 255, 0.1));
}

.notification-icon.message { background: rgba(33, 150, 243, 0.2); }
.notification-icon.friend_request { background: rgba(76, 175, 80, 0.2); }
.notification-icon.friend_accept { background: rgba(76, 175, 80, 0.2); }
.notification-icon.friend_online { background: rgba(139, 195, 74, 0.2); }
.notification-icon.system { background: rgba(158, 158, 158, 0.2); }
.notification-icon.admin { background: rgba(255, 152, 0, 0.2); }
.notification-icon.warning { background: rgba(244, 67, 54, 0.2); }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color, #fff);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-muted, #999);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 11px;
    color: var(--text-dim, #666);
    margin-top: 4px;
}

.notification-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #2196f3;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(33, 150, 243, 0.6);
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted, #666);
}

.notification-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty-text {
    font-size: 14px;
}

.notification-panel-list::-webkit-scrollbar {
    width: 6px;
}

.notification-panel-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-panel-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.notification-panel-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .notification-panel {
        width: 100%;
        max-width: 100vw;
        right: -100%;
    }
}
