/**
 * Social Proof & Urgency Elements
 * Conversion-optimized notification system
 */

/* ========================================
   Social Proof Notifications
   ======================================== */

.social-proof-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    z-index: 9998;
    transform: translateX(-120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid #e5e7eb;
}

.social-proof-notification.show {
    transform: translateX(0);
}

.notification-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1.25rem;
}

.notification-content {
    flex: 1;
}

.notification-message {
    font-size: 0.875rem;
    color: #18181b;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-message strong {
    font-weight: 600;
    color: #7c3aed;
}

.notification-time {
    font-size: 0.75rem;
    color: #71717a;
}

.notification-close {
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    color: #18181b;
}

/* Mobile */
@media (max-width: 768px) {
    .social-proof-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        bottom: 80px; /* Above mobile nav */
    }
}

/* ========================================
   Live Visitor Counter
   ======================================== */

.live-visitors-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    font-size: 0.875rem;
    color: #16a34a;
    font-weight: 500;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.live-visitor-count {
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
}

.live-visitor-count.pulse {
    animation: number-pulse 0.5s;
}

@keyframes number-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
        color: #059669;
    }
}

/* ========================================
   Urgency Banners
   ======================================== */

.urgency-banner {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: white;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.urgency-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.urgency-banner .icon {
    display: inline-block;
    margin-right: 0.5rem;
    animation: shake 2s infinite;
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* ========================================
   Countdown Timers
   ======================================== */

.countdown-timer {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.countdown-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(124, 58, 237, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    min-width: 50px;
}

.countdown-unit strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1;
}

.countdown-timer.compact .countdown-unit {
    flex-direction: row;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    min-width: auto;
}

.countdown-timer.compact .countdown-unit strong {
    font-size: 1rem;
}

.expired {
    color: #ef4444;
    font-weight: 600;
}

/* ========================================
   Limited Spots Indicator
   ======================================== */

.limited-spots {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(249, 115, 22, 0.1));
    border: 2px solid #ef4444;
    border-radius: 10px;
    font-weight: 600;
    color: #991b1b;
    transition: all 0.3s;
}

.limited-spots.flash {
    animation: flash-border 1s;
}

@keyframes flash-border {
    0%, 100% {
        border-color: #ef4444;
        transform: scale(1);
    }
    50% {
        border-color: #f59e0b;
        transform: scale(1.05);
    }
}

.limited-spots-icon {
    font-size: 1.25rem;
    color: #ef4444;
}

.limited-spots-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: #dc2626;
    min-width: 30px;
    text-align: center;
}

.limited-spots-label {
    font-size: 0.875rem;
}

/* ========================================
   Urgency Badge
   ======================================== */

.urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.urgency-badge i {
    animation: ring 1.5s infinite;
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40% {
        transform: rotate(10deg);
    }
}

/* ========================================
   Trust Badges
   ======================================== */

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.trust-badge-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.trust-badge-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.trust-badge-label {
    font-size: 0.875rem;
    color: #ffffff;
    font-weight: 500;
}

/* ========================================
   Floating Social Proof
   ======================================== */

.floating-social-proof {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    max-width: 280px;
    z-index: 1000;
    border: 1px solid #e5e7eb;
}

.floating-social-proof .stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f4f4f5;
}

.floating-social-proof .stat-item:last-child {
    border-bottom: none;
}

.floating-social-proof .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.floating-social-proof .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #18181b;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.floating-social-proof .stat-label {
    font-size: 0.75rem;
    color: #71717a;
}

/* ========================================
   Testimonial Pop-up
   ======================================== */

.testimonial-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 9998;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid #e5e7eb;
}

.testimonial-popup.show {
    transform: translateY(0);
}

.testimonial-popup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-popup-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.testimonial-popup-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #18181b;
}

.testimonial-popup-info .role {
    font-size: 0.75rem;
    color: #71717a;
}

.testimonial-popup-stars {
    color: #f59e0b;
    margin-bottom: 0.75rem;
}

.testimonial-popup-text {
    font-size: 0.875rem;
    color: #3f3f46;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.testimonial-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.testimonial-popup-close:hover {
    color: #18181b;
}

/* ========================================
   Offer Banner (Sticky Top)
   ======================================== */

.offer-banner {
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.offer-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.offer-banner-text {
    font-size: 1rem;
    font-weight: 600;
}

.offer-banner-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-banner .btn {
    background: white;
    color: #7c3aed;
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.offer-banner .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* ========================================
   Scarcity Indicators
   ======================================== */

.scarcity-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.05);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    margin: 1rem 0;
}

.scarcity-indicator i {
    font-size: 1.5rem;
    color: #ef4444;
}

.scarcity-indicator-text {
    flex: 1;
}

.scarcity-indicator-title {
    font-weight: 600;
    color: #18181b;
    margin-bottom: 0.25rem;
}

.scarcity-indicator-desc {
    font-size: 0.875rem;
    color: #71717a;
}

/* ========================================
   Progress Bar (Spots Filling)
   ======================================== */

.spots-progress {
    margin: 1rem 0;
}

.spots-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.spots-progress-bar {
    height: 12px;
    background: #f4f4f5;
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.spots-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 100px;
    transition: width 1s ease;
    position: relative;
}

.spots-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
    .floating-social-proof {
        display: none; /* Hide on mobile to avoid clutter */
    }

    .testimonial-popup {
        right: 10px;
        left: 10px;
        max-width: none;
        bottom: 80px;
    }

    .offer-banner-content {
        flex-direction: column;
        gap: 1rem;
    }

    .trust-badges {
        gap: 1rem;
    }

    .trust-badge-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .trust-badge-value {
        font-size: 1.5rem;
    }
}
