/* =====================================================
   SOCIAL PROOF WIDGETS - Keybyte.hu
   ===================================================== */

/* =====================================================
   1. LIVE VIEWERS COUNTER
   ===================================================== */
.social-proof-viewers {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    margin-bottom: 16px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.social-proof-viewers .viewer-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.social-proof-viewers .viewer-icon .eye-icon {
    animation: blink 3s ease-in-out infinite;
}

.social-proof-viewers .viewer-text {
    flex: 1;
}

.social-proof-viewers .viewer-count {
    font-weight: 800;
    color: #92400e;
    font-size: 16px;
}

.social-proof-viewers .viewer-label {
    color: #a16207;
    font-size: 13px;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }
}

@keyframes blink {
    0%, 90%, 100% {
        opacity: 1;
    }
    95% {
        opacity: 0.3;
    }
}

/* =====================================================
   2. LOW STOCK WARNING
   ===================================================== */
.social-proof-stock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    border-radius: 10px;
    margin-bottom: 16px;
    animation: shake-gentle 0.5s ease-in-out;
}

.social-proof-stock .stock-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    animation: bounce-small 1s ease-in-out infinite;
}

.social-proof-stock .stock-text {
    flex: 1;
}

.social-proof-stock .stock-warning {
    font-weight: 800;
    color: #991b1b;
    font-size: 15px;
}

.social-proof-stock .stock-subtext {
    color: #b91c1c;
    font-size: 12px;
}

@keyframes shake-gentle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes bounce-small {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* =====================================================
   3. RECENT PURCHASE POPUP
   ===================================================== */
.social-proof-popup {
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    overflow: hidden;
    transform: translateX(-400px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-proof-popup.active {
    transform: translateX(0);
    opacity: 1;
}

.social-proof-popup .popup-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.social-proof-popup .popup-header-text {
    color: white;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.social-proof-popup .popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s;
}

.social-proof-popup .popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.social-proof-popup .popup-body {
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-proof-popup .popup-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.social-proof-popup .popup-image-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 24px;
}

.social-proof-popup .popup-content {
    flex: 1;
}

.social-proof-popup .popup-city {
    font-weight: 700;
    color: #1f2937;
    font-size: 14px;
    margin-bottom: 4px;
}

.social-proof-popup .popup-product {
    color: #4b5563;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.social-proof-popup .popup-time {
    color: #9ca3af;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.social-proof-popup .popup-time::before {
    content: '🕐';
    font-size: 10px;
}

/* Progress bar animation */
.social-proof-popup .popup-progress {
    height: 3px;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.social-proof-popup .popup-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    width: 100%;
    animation: progress-shrink 5s linear forwards;
}

@keyframes progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* =====================================================
   4. VERIFIED BADGE
   ===================================================== */
.verified-purchase-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #3b82f6;
    border-radius: 20px;
    font-size: 10px;
    color: #1e40af;
    font-weight: 600;
}

.verified-purchase-badge::before {
    content: '✓';
    background: #3b82f6;
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

/* =====================================================
   5. RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
    .social-proof-popup {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 80px;
    }
    
    .social-proof-viewers,
    .social-proof-stock {
        padding: 8px 12px;
    }
    
    .social-proof-viewers .viewer-icon,
    .social-proof-stock .stock-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .social-proof-viewers .viewer-count,
    .social-proof-stock .stock-warning {
        font-size: 14px;
    }
}

/* =====================================================
   6. DARK MODE SUPPORT (if implemented)
   ===================================================== */
@media (prefers-color-scheme: dark) {
    .social-proof-popup {
        background: #1f2937;
    }
    
    .social-proof-popup .popup-city {
        color: #f9fafb;
    }
    
    .social-proof-popup .popup-product {
        color: #d1d5db;
    }
}

