/**
 * Notification UI Styles
 * 
 * Components:
 * - Notification panel (sidebar)
 * - Toast notifications (temporary popups)
 * - Notification badge (unread count)
 * - Bell icon
 */

/* ==================== Notification Bell Icon ==================== */

.notification-bell {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f39c12;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notification-bell:hover {
    background-color: #e67e22;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.notification-bell:active {
    transform: scale(0.95);
}

/* ==================== Notification Badge ==================== */

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.notification-badge.hidden {
    display: none;
}

.notification-badge:not(.hidden) {
    animation: badgePulse 0.5s ease;
}

@keyframes badgePulse {
    0% { transform: scale(1.2); }
    50% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* ==================== Notification Panel ==================== */

.notification-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    border-left: 4px solid #f39c12;
}

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

.notification-panel.disconnected {
    opacity: 0.6;
}

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

.notification-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.notification-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.notification-panel-close:hover {
    color: #2c3e50;
}

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

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #95a5a6;
    font-size: 14px;
}

.notification-panel-footer {
    padding: 15px 20px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 10px;
    background-color: #f8f9fa;
}

.notification-panel-btn {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    background-color: white;
    color: #2c3e50;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.notification-panel-btn:hover {
    background-color: #ecf0f1;
    border-color: #95a5a6;
}

.notification-panel-btn.danger {
    border-color: #e74c3c;
    color: #e74c3c;
}

.notification-panel-btn.danger:hover {
    background-color: #fadbd8;
}

/* ==================== Notification List Items ==================== */

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    gap: 12px;
    transition: background-color 0.2s ease;
}

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

.notification-item.unread {
    background-color: #fef5e7;
    border-left: 3px solid #f39c12;
    padding-left: 12px;
}

.notification-item-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.notification-item-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 4px;
}

.notification-item-message {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 6px;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.notification-item-time {
    color: #95a5a6;
    font-size: 11px;
}

.notification-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.notification-item-btn {
    background: none;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.notification-item-btn:hover {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

/* ==================== Toast Notifications ==================== */

.notification-toasts {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.notification-toast {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    border-left: 4px solid #f39c12;
}

.notification-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.notification-toast-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 3px;
}

.notification-toast-message {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.4;
}

.notification-toast-close {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.notification-toast-close:hover {
    color: #2c3e50;
}

/* ==================== Animations ==================== */

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ==================== Responsive ==================== */

@media (max-width: 600px) {
    .notification-panel {
        width: 100%;
        right: -100%;
    }
    
    .notification-bell {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .notification-toast {
        min-width: 280px;
        max-width: 90vw;
        margin: 0 auto;
    }
    
    .notification-toasts {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* ==================== Scrollbar Styling ==================== */

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

.notification-panel-list::-webkit-scrollbar-track {
    background-color: #f8f9fa;
}

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

.notification-panel-list::-webkit-scrollbar-thumb:hover {
    background-color: #95a5a6;
}