/* ─── Content Update Notification Popup ─── */

.notif-popup {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9998;
    max-width: 400px;
    width: calc(100% - 3rem);
    pointer-events: none;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-popup.notif-visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Outer glow wrapper */
.notif-card {
    position: relative;
    border-radius: 16px;
    padding: 2px; /* gradient border thickness */
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary, #a855f7), var(--accent-secondary));
    box-shadow:
        0 8px 32px rgba(0, 212, 255, 0.2),
        0 2px 12px rgba(168, 85, 247, 0.15);
    animation: notifGlow 3s ease-in-out infinite alternate;
}

@keyframes notifGlow {
    0%   { box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2), 0 2px 12px rgba(168, 85, 247, 0.15); }
    100% { box-shadow: 0 8px 40px rgba(0, 212, 255, 0.35), 0 2px 16px rgba(168, 85, 247, 0.25); }
}

/* Inner card */
.notif-inner {
    background: var(--card-bg, #252b33);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.25s ease;
}

.notif-inner:hover {
    background: var(--secondary-bg, #1a1f26);
}

/* Bell icon with pulse */
.notif-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(168, 85, 247, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: relative;
}

.notif-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    border: 2px solid var(--accent-primary);
    opacity: 0;
    animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(1.15); }
}

/* Badge count */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--danger, #ff4757);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Text body */
.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary, #00d4ff);
    margin-bottom: 0.2rem;
}

.notif-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary, #e1e5eb);
    line-height: 1.4;
    margin: 0;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary, #00ff88);
    transition: gap 0.2s ease;
}

.notif-inner:hover .notif-cta {
    gap: 0.5rem;
}

.notif-cta-arrow {
    transition: transform 0.2s ease;
}

.notif-inner:hover .notif-cta-arrow {
    transform: translateX(2px);
}

/* Close button */
.notif-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted, #6b7684);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    padding: 0;
}

.notif-close:hover {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger, #ff4757);
}

/* Progress bar (auto-dismiss timer) */
.notif-progress {
    position: absolute;
    bottom: 0;
    left: 2px;
    right: 2px;
    height: 3px;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
}

.notif-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 100%;
    transform-origin: left;
    animation: notifCountdown 15s linear forwards;
}

@keyframes notifCountdown {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ─── Responsive ─── */

@media (max-width: 480px) {
    .notif-popup {
        bottom: 1rem;
        right: 1rem;
        width: calc(100% - 2rem);
        max-width: none;
    }

    .notif-inner {
        padding: 0.85rem 1rem;
    }

    .notif-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .notif-text {
        font-size: 0.85rem;
    }
}
