/*
 * GECA WooCommerce Social Proof Pro
 * Version 4.0.0
 *
 * This file is intentionally standalone.
 * Edit this file to change the appearance without changing the PHP/JS.
 *
 * Main placement:
 * .geca-sp-viewers  = before product title
 * .geca-sp-rating   = after product price
 * .geca-sp-bought   = before cart section
 * .geca-sp-sales24  = immediately before add-to-cart button
 * .geca-sp-love     = after add-to-cart form
 */

/* ==============================
   EASY CUSTOMIZATION
   ============================== */

:root {
    --geca-sp-text: #222;
    --geca-sp-muted: #6b7280;
    --geca-sp-accent: #ff5a36;
    --geca-sp-accent-soft: #fff1ec;
    --geca-sp-green: #16a34a;
    --geca-sp-green-soft: #ecfdf3;
    --geca-sp-yellow: #f59e0b;
    --geca-sp-yellow-soft: #fff8e7;
    --geca-sp-pink: #ec4899;
    --geca-sp-pink-soft: #fff0f7;

    --geca-sp-font-size: 14px;
    --geca-sp-small-size: 12px;
    --geca-sp-number-size: 16px;

    --geca-sp-radius: 999px;
    --geca-sp-gap: 8px;
    --geca-sp-block-gap: 12px;
}

/* ==============================
   BASE
   ============================== */

.geca-sp-block {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--geca-sp-gap);
    margin: var(--geca-sp-block-gap) 0;
    color: var(--geca-sp-text);
    font-size: var(--geca-sp-font-size);
    line-height: 1.4;
    transition: transform .2s ease, opacity .2s ease;
}

.geca-sp-block strong {
    font-weight: 800;
}

/* ==============================
   VIEWERS — BEFORE TITLE
   ============================== */

.geca-sp-viewers {
    width: fit-content;
    padding: 7px 12px 7px 9px;
    border-radius: var(--geca-sp-radius);
    background: var(--geca-sp-green-soft);
    color: #166534;
    box-shadow: 0 2px 8px rgba(22, 163, 74, .08);
    animation: gecaSpViewerEntrance .5s ease both;
}

.geca-sp-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
    animation: gecaSpLivePulse 1.8s infinite;
    flex: 0 0 auto;
}

.geca-sp-viewer-number {
    font-size: var(--geca-sp-number-size);
    font-weight: 900;
    min-width: 22px;
    display: inline-block;
    text-align: center;
}

.geca-sp-viewer-text {
    font-weight: 600;
}

.geca-sp-live-label {
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .08em;
    padding: 4px 5px;
    border-radius: 5px;
    background: #22c55e;
    color: #fff;
}

.geca-sp-number-pulse {
    animation: gecaSpNumberPulse .7s ease;
}

/* ==============================
   RATING — AFTER PRICE
   ============================== */

.geca-sp-rating {
    padding: 5px 0;
    gap: 6px;
}

.geca-sp-rating-stars {
    color: var(--geca-sp-yellow);
    font-size: 15px;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(245, 158, 11, .18);
}

.geca-sp-rating-reviews {
    color: var(--geca-sp-muted);
    font-size: 13px;
}

/* ==============================
   CUSTOMERS BOUGHT
   ============================== */

.geca-sp-bought {
    width: fit-content;
    padding: 7px 11px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.geca-sp-bag {
    font-size: 15px;
}

/* ==============================
   24H SALES — BEFORE BUTTON
   ============================== */

.geca-sp-sales24 {
    padding: 8px 11px;
    border-radius: 8px;
    background: var(--geca-sp-accent-soft);
    color: #9a3412;
    border-left: 3px solid var(--geca-sp-accent);
    animation: gecaSpSalesEntrance .5s ease both;
}

.geca-sp-fire {
    font-size: 16px;
    animation: gecaSpFire 1.6s ease-in-out infinite;
}

/* ==============================
   LOVE — AFTER CART FORM
   ============================== */

.geca-sp-love {
    width: fit-content;
    padding: 7px 11px;
    border-radius: 8px;
    background: var(--geca-sp-pink-soft);
    color: #9d174d;
    border: 1px solid #fbcfe8;
}

.geca-sp-heart {
    color: var(--geca-sp-pink);
    font-size: 16px;
    animation: gecaSpHeart 1.8s ease-in-out infinite;
}

/* ==============================
   ANIMATIONS
   ============================== */

@keyframes gecaSpLivePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes gecaSpNumberPulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

@keyframes gecaSpViewerEntrance {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gecaSpSalesEntrance {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gecaSpFire {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.12) rotate(-3deg); }
}

@keyframes gecaSpHeart {
    0%, 100% { transform: scale(1); }
    12% { transform: scale(1.15); }
    24% { transform: scale(1); }
}

/* ==============================
   MOBILE
   ============================== */

@media (max-width: 480px) {
    .geca-sp-block {
        font-size: 13px;
    }

    .geca-sp-viewers {
        max-width: 100%;
    }

    .geca-sp-live-label {
        display: none;
    }
}

/* ==============================
   ACCESSIBILITY
   ============================== */

@media (prefers-reduced-motion: reduce) {
    .geca-sp-block,
    .geca-sp-live-dot,
    .geca-sp-number-pulse,
    .geca-sp-fire,
    .geca-sp-heart {
        animation: none !important;
        transition: none !important;
    }
}
