/* === POP Social Proof Frontend Styles === */

/* Recent Sales Popup */
.popsp-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100050;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    padding: 14px 40px 14px 14px;
    max-width: 340px;
    transform: translateX(-120%);
    transition: transform .5s cubic-bezier(.4,0,.2,1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
}
.popsp-popup.popsp-show {
    transform: translateX(0);
}
body.de-modal-open[data-de-popup="upsell"] .popsp-popup,
body.de-modal-open[data-de-popup="spin"] .popsp-popup {
    visibility: hidden;
}
body.desc-has-flash .popsp-popup {
    bottom: 52px;
}
.popsp-popup-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}
.popsp-popup-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.popsp-popup-img img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
}
.popsp-popup-title {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.3;
}
.popsp-popup-meta {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Live Visitors */
.popsp-live-visitors {
    display: inline-flex;
    align-items: center;
    background: #f0fdf4;
    color: #15803d;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.popsp-visitor-count {
    transition: all .3s ease;
    margin-right: 0.35em;
}
.popsp-visitor-label {
    font-weight: 600;
}

/* Sales Count Badge */
.popsp-sales-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 6px;
}

/* Stock Urgency */
.popsp-urgency {
    margin: 14px 0;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}
.popsp-urgency-text {
    font-size: 14px;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 8px;
}
.popsp-urgency-bar {
    height: 8px;
    background: #fee2e2;
    border-radius: 4px;
    overflow: hidden;
}
.popsp-urgency-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Trust Badges */
.popsp-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}
.popsp-trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}
.popsp-trust-icon svg {
    width: 18px;
    height: 18px;
    color: #2563eb;
}

/* Countdown Timer */
.popsp-countdown {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    margin: 12px 0;
    text-align: center;
}
.popsp-countdown-label {
    font-size: 13px;
    margin-bottom: 8px;
    opacity: .9;
}
.popsp-countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.popsp-cd-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.popsp-cd-num {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.popsp-cd-lbl {
    font-size: 10px;
    text-transform: uppercase;
    opacity: .7;
    margin-top: 2px;
}
.popsp-cd-sep {
    font-size: 24px;
    font-weight: 700;
    margin: 0 2px;
    opacity: .5;
}

/* Hero Banner — compact inline on product page, not a full-width overlay */
#popsp-hero-banner {
    position: static;
    display: block;
    margin: 10px 0 28px;
    z-index: auto;
    background: #eef2ff;
    color: #312e81;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    transform: none;
}
.popsp-hero-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 12px;
    max-width: 100%;
    margin: 0;
    flex-wrap: wrap;
}
.popsp-hero-text {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    min-width: 160px;
}
.popsp-hero-btn {
    display: inline-block;
    background: #4338ca;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    line-height: 1.4;
}
.popsp-hero-btn:hover {
    color: #fff;
    opacity: .9;
}
.popsp-hero-close {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    margin-left: auto;
}
.popsp-hero-close:hover {
    color: #312e81;
}

/* Mobile */
@media (max-width: 600px) {
    .popsp-popup {
        left: 10px;
        right: 10px;
        max-width: none;
        bottom: 10px;
    }
    .popsp-trust-badges {
        gap: 10px;
    }
    .popsp-trust-badge {
        font-size: 11px;
    }
    .popsp-hero-text {
        font-size: 12px;
        text-align: left;
    }
    .popsp-cd-num {
        font-size: 22px;
    }
    .popsp-hero-inner {
        padding: 8px 10px;
    }
}
