/**
 * PWA Notification - CSS
 * Version: 5.0.0 (FIXED - No Conflict with Bell Icon)
 */

/* ============================================
   1. POPUP
   ============================================ */
#pwa-notification-popup {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 420px;
    max-width: 90vw;
    max-height: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pwa-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
}

.pwa-popup-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.pwa-popup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pwa-mark-all-read {
    padding: 4px 12px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #6366f1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-mark-all-read:hover {
    background: rgba(99, 102, 241, 0.08);
}

.pwa-popup-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.pwa-popup-close:hover {
    transform: rotate(90deg);
    color: #333;
}

.pwa-popup-filters {
    display: flex;
    gap: 4px;
    padding: 8px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: #fafafa;
}

.pwa-filter-btn {
    padding: 4px 14px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-filter-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.pwa-filter-btn.active {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.pwa-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    scroll-behavior: smooth;
}

.pwa-popup-body::-webkit-scrollbar {
    width: 4px;
}

.pwa-popup-body::-webkit-scrollbar-track {
    background: transparent;
}

.pwa-popup-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
}

.pwa-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: #909090;
    font-size: 13px;
}

.pwa-loader::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: pwaSpin 0.8s linear infinite;
}

@keyframes pwaSpin {
    to { transform: rotate(360deg); }
}

.pwa-popup-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
}

.pwa-footer-status {
    font-size: 11px;
    color: #9ca3af;
}

/* ============================================
   2. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    #pwa-notification-popup {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 80vh;
        border-radius: 16px 16px 0 0;
    }
}

@media (max-width: 480px) {
    #pwa-notification-popup {
        max-height: 70vh;
    }
}

/* ============================================
   3. DARK MODE
   ============================================ */
@media (prefers-color-scheme: dark) {
    #pwa-notification-popup {
        background: #1a1a2e;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    }
    
    .pwa-popup-header,
    .pwa-popup-filters,
    .pwa-popup-footer {
        background: #14142a;
        border-color: rgba(255, 255, 255, 0.06);
    }
    
    .pwa-popup-title {
        color: #e8e8e8;
    }
    
    .pwa-filter-btn {
        color: #9ca3af;
    }
    
    .pwa-filter-btn.active {
        background: rgba(99, 102, 241, 0.15);
        color: #a5b4fc;
    }
}