/**
 * EkaivaKriti Social Proof Popup Styles
 * Beautiful, animated popup notifications for social proof
 */

.social-proof-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 350px;
    min-width: 280px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(-120%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.social-proof-popup.hide {
    transform: translateX(-120%);
    opacity: 0;
}

.popup-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    position: relative;
}

.popup-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.popup-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    padding-right: 30px;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Animation keyframes */
@keyframes slideInLeft {
    from {
        transform: translateX(-120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-120%);
        opacity: 0;
    }
}

/* Pulse animation for icon */
.popup-icon i {
    animation: iconPulse 2s infinite;
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .social-proof-popup {
        left: 10px;
        right: 10px;
        max-width: none;
        min-width: auto;
        bottom: 10px;
    }
    
    .popup-content {
        padding: 14px 16px;
    }
    
    .popup-message {
        font-size: 13px;
        padding-right: 25px;
    }
    
    .popup-icon {
        width: 36px;
        height: 36px;
        margin-right: 10px;
        font-size: 14px;
    }
}

/* Tablet responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .social-proof-popup {
        max-width: 320px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .social-proof-popup {
        border: 2px solid white;
    }
    
    .popup-icon {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .social-proof-popup {
        transition: opacity 0.2s ease;
    }
    
    .popup-icon i {
        animation: none;
    }
    
    .social-proof-popup.show {
        transform: translateX(0);
    }
    
    .social-proof-popup.hide {
        transform: translateX(0);
        opacity: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .social-proof-popup {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
}

/* Print styles */
@media print {
    .social-proof-popup {
        display: none !important;
    }
}

/* Hover effects for desktop */
@media (hover: hover) {
    .social-proof-popup:hover {
        transform: translateX(0) scale(1.02);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    }
    
    .social-proof-popup:hover .popup-icon {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Focus styles for accessibility */
.popup-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Multiple popup stacking */
.social-proof-popup:nth-child(n+2) {
    bottom: calc(20px + (80px * var(--popup-index, 0)));
}

@media (max-width: 768px) {
    .social-proof-popup:nth-child(n+2) {
        bottom: calc(10px + (70px * var(--popup-index, 0)));
    }
}

/* Gradient variations for different message types */
.social-proof-popup.download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.social-proof-popup.signup {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.social-proof-popup.testimonial {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.social-proof-popup.milestone {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.social-proof-popup.urgency {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}