/**
 * TF Product Viewers - Estilos
 * Compatível com Flatsome Theme
 */

.tfpv-viewers-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    margin: 12px 0 18px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.2px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    border: 0;
    transition: opacity 0.3s ease;
    /* fallback caso CSS inline não carregue */
    background: #fde8ec;
    color: #333;
    border-radius: 6px;
}

.tfpv-viewers-box .tfpv-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.tfpv-viewers-box .tfpv-icon svg {
    width: 20px;
    height: 20px;
    /* fallback */
    stroke: #e91e63;
}

.tfpv-viewers-box .tfpv-text {
    flex: 1;
    margin: 0;
    padding: 0;
}

.tfpv-viewers-box .tfpv-count {
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.tfpv-viewers-box .tfpv-count.tfpv-pulse {
    animation: tfpvPulse 0.6s ease;
}

@keyframes tfpvPulse {
    0%   { opacity: 0.4; transform: scale(0.92); }
    50%  { opacity: 1;   transform: scale(1.06); }
    100% { opacity: 1;   transform: scale(1); }
}

.tfpv-count {
    display: inline-block;
}

/* Mobile */
@media (max-width: 549px) {
    .tfpv-viewers-box {
        padding: 10px 14px;
        font-size: 12px;
        gap: 8px;
    }
    .tfpv-viewers-box .tfpv-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================
   Flatsome-specific fixes
   ============================ */

/* Garante que o box fique dentro da .product-info / .summary do Flatsome */
.product-info .tfpv-viewers-box,
.summary .tfpv-viewers-box,
.product-page-content .tfpv-viewers-box {
    clear: both;
}

/* Evita conflito com sticky-add-to-cart do Flatsome */
.sticky-add-to-cart .tfpv-viewers-box,
.product-footer .tfpv-viewers-box {
    display: none !important;
}

/* Evita que o texto seja afetado por estilos globais do Flatsome em strong */
.tfpv-viewers-box strong {
    color: inherit;
    font-weight: 700;
}

/* Garante visibilidade quando o tema usa visibility:hidden em elementos novos */
.tfpv-viewers-box {
    visibility: visible !important;
    opacity: 1;
}

/* RTL */
.rtl .tfpv-viewers-box {
    direction: rtl;
}
