/* ==================== SOCIAL PROOF STYLES ==================== */

/* Stats Widget (Top Right) */
.social-proof-stats {
    position: fixed;
    top: 90px;
    right: 20px;
    background: linear-gradient(315deg, #162b53 0%, #114a7f 100%);
    color: white;
    padding: 18px 28px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 380px;
    z-index: 999;
    animation: slideInRight 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-proof-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(17, 74, 127, 0.3);
}

.sp-stats-icon {
    position: relative;
    width: 60px;
    -webkit-filter: drop-shadow(0 0 0 rgb(255 255 255 / 65%)) contrast(135%);
    filter: drop-shadow(0 0 0 rgb(255 255 255 / 65%)) contrast(135%);
    transition: .05s ease;
}

.sp-stats-content {
    flex: 1;
}

.sp-stats-number {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sp-stats-text {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.4;
}

.sp-stats-secondary {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-pulse-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
}

.sp-active-dot {
    width: 8px;
    height: 8px;
    background: #60a5fa;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}

#sp-current-users {
    margin-top: 4px;
}

/* Modal Base Styles */
.sp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.sp-modal.active {
    display: flex;
}

.sp-modal-content {
    background: linear-gradient(315deg, #162b53 0%, #114a7f 100%);
    color: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.sp-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.sp-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.sp-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-modal-title img {
    width: 40px;
    height: 40px;
}

.sp-modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.sp-modal-stat-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sp-modal-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 4px;
}

.sp-modal-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

.sp-modal-text {
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 16px;
}

.sp-modal-highlight {
    background: rgba(74, 222, 128, 0.2);
    border-left: 3px solid #4ade80;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.sp-modal-cta {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    opacity: 0.8;
}

.sp-modal-cta a {
    color: #4ade80;
    text-decoration: underline;
    cursor: pointer;
}

.sp-modal-cta a:hover {
    color: #22c55e;
}

/* Activity Details Modal Specific */
.sp-activity-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.sp-activity-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-activity-detail-row:last-child {
    border-bottom: none;
}

.sp-activity-label {
    font-weight: 600;
    opacity: 0.8;
    font-size: 14px;
}

.sp-activity-value {
    font-weight: 700;
    color: #4ade80;
    font-size: 14px;
}

.sp-modal-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.sp-trust-badge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sp-trust-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.sp-trust-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-trust-text strong {
    font-size: 11px;
    font-weight: 700;
}

.sp-trust-text span {
    font-size: 9px;
    opacity: 0.8;
}

/* Live Activity Notifications (Bottom Left) */
.social-proof-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 60vh;
    overflow: hidden;
}

.sp-notification {
    background: linear-gradient(315deg, #162b53 0%, #114a7f 100%);
    color: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 30px rgba(17, 74, 127, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 320px;
    max-width: 400px;
    animation: slideInLeft 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #3b82f6;
}

.sp-notification:hover {
    transform: translateX(5px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

.sp-notification.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.sp-notification.spoof-type {
    border-left-color: #4ade80;
}

.sp-notification.spoof-type:hover {
    box-shadow: 0 12px 40px rgba(74, 222, 128, 0.4);
}

.sp-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.sp-content {
    flex: 1;
    min-width: 0;
}

.sp-title {
    font-weight: 600;
    font-size: 15px;
    color: #f0f9ff;
    margin-bottom: 4px;
}

.sp-user {
    color: #60a5fa;
    font-weight: 700;
}

.sp-notification.spoof-type .sp-user {
    color: #4ade80;
}

.sp-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 4px;
    font-weight: 500;
}

.sp-product {
    color: #f0f9ff;
    font-weight: 600;
}

.sp-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sp-time::before {
    content: '⚡';
    font-size: 11px;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-proof-stats {
        top: 70px;
        right: 10px;
        left: auto;
        max-width: 280px;
        padding: 14px 18px;
    }
    
    .sp-stats-icon {
        width: 45px;
    }
    
    .sp-stats-number {
        font-size: 24px;
    }
    
    .sp-stats-text {
        font-size: 12px;
    }

    .sp-stats-secondary {
        font-size: 10px;
    }

    #sp-current-users {
        margin-top: 3px;
    }
    
    .social-proof-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-height: 50vh;
    }
    
    .sp-notification {
        min-width: auto;
        max-width: calc(100vw - 20px);
        width: 100%;
        padding: 12px 16px;
    }

    .sp-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .sp-title {
        font-size: 14px;
    }

    .sp-description {
        font-size: 12px;
    }

    .sp-modal-content {
        padding: 24px;
        margin: 20px;
    }

    .sp-modal-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sp-modal-trust-badges {
        grid-template-columns: 1fr;
    }

    .sp-trust-badge {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .sp-trust-icon {
        font-size: 32px;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .social-proof-stats {
        top: 60px;
        max-width: 240px;
        padding: 12px 16px;
        gap: 10px;
    }

    .sp-stats-icon {
        width: 38px;
    }

    .sp-stats-number {
        font-size: 20px;
    }

    .sp-stats-text {
        font-size: 11px;
    }

    .sp-notification {
        padding: 10px 14px;
        gap: 12px;
    }

    .sp-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .sp-modal-title {
        font-size: 20px;
    }

    .sp-modal-stat-number {
        font-size: 24px;
    }

    .sp-activity-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .social-proof-stats,
    .sp-notification,
    .sp-pulse-dot,
    .sp-modal,
    .sp-modal-content {
        animation: none !important;
        transition: none !important;
    }
}