/* ═══════════════════════════════════════════════════
   TVVote Pro — Public Styles (Frontend)
   Visual FAIXA COMPLETA — strip dourada
   ═══════════════════════════════════════════════════ */

/* ── Widget Wrapper — FAIXA COMPLETA ── */
.tvvote-widget-wrap {
    display: block;
    width: 100%;
    margin: 24px 0;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* ── FAIXA PRINCIPAL — strip inteira ── */
.tvi-reactions-widget {
    --strip-color-solid: #fff9e7;
    padding: 6px 18px !important;
    background: var(--strip-color-solid);
    border-radius: 20px !important;
    box-shadow: 0 10px 24px rgba(221, 162, 70, 0.18);
    min-height: 42px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.tvi-reactions-widget::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,249,231,1) 15%, rgba(255,249,231,0.55) 65%, rgba(255,249,231,0) 100%);
    pointer-events: none;
    border-radius: inherit;
    transition: opacity 0.3s ease;
}

/* ── Modo Dislike — faixa vermelha ── */
.tvi-reactions-widget.dislike-mode {
    --strip-color-solid: #ffe0e0;
    box-shadow: 0 10px 32px rgba(176, 6, 6, 0.45);
}

.tvi-reactions-widget.dislike-mode::after {
    background: linear-gradient(120deg, rgba(255,204,204,0.95) 10%, rgba(255,150,150,0.45) 60%, rgba(255,240,240,0) 100%);
}

.tvi-reactions-widget.dislike-mode .rw-reactions {
    background: linear-gradient(120deg, #ffe0e0 0%, #ffc6c6 55%, #ffb1b1 100%);
    border-color: rgba(195, 0, 0, 0.35);
    box-shadow: 0 0 25px rgba(221, 36, 36, 0.45);
    animation: rw-buzz 0.9s ease-in-out infinite;
}

@keyframes rw-buzz {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(-1px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, -1px); }
}

/* ── Container dos botões ── */
.tvi-reactions-widget .rw-reactions {
    display: flex;
    align-items: center;
    background: linear-gradient(120deg, #fffaf2 0%, #fff2dc 55%, #ffe7c4 100%);
    border-radius: 24px;
    border: 1px solid rgba(230, 189, 123, 0.45);
    box-shadow: 0 4px 12px rgba(209, 164, 93, 0.14);
    overflow: visible;
    position: relative;
    z-index: 2;
    transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

/* ── Botões ── */
.tvi-reactions-widget .rw-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Segoe UI', Roboto, -apple-system, Arial, sans-serif;
    color: #7c6332;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    overflow: visible;
    letter-spacing: 0.01em;
    line-height: 1;
}

.tvi-reactions-widget .rw-btn-like {
    border-radius: 24px 0 0 24px;
    padding-right: 16px;
}

.tvi-reactions-widget .rw-btn-dislike {
    border-radius: 0 24px 24px 0;
    padding-left: 16px;
}

.tvi-reactions-widget .rw-btn:hover {
    background: rgba(139, 109, 52, 0.08);
}

.tvi-reactions-widget .rw-btn:active {
    transform: scale(0.96);
}

.tvi-reactions-widget .rw-btn:focus-visible {
    outline: 2px solid #c98017;
    outline-offset: 2px;
}

/* ── Ícones SVG ── */
.tvi-reactions-widget .rw-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), fill 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    display: block;
}

.tvi-reactions-widget .rw-ico-filled {
    display: none;
}

/* ── Separador ── */
.tvi-reactions-widget .rw-sep {
    width: 1px;
    height: 26px;
    background: rgba(123, 98, 48, 0.25);
    flex-shrink: 0;
}

/* ═══════════════════════════════
   Estados Ativos
   ═══════════════════════════════ */

/* Like ativo */
.tvi-reactions-widget .rw-btn-like.is-active {
    color: #c98017;
    background: transparent;
    box-shadow: none;
}

.tvi-reactions-widget .rw-btn-like.is-active .rw-ico-outline {
    display: none;
}

.tvi-reactions-widget .rw-btn-like.is-active .rw-ico-filled {
    display: block;
    color: #c98017;
    fill: #c98017;
    filter: drop-shadow(0 2px 6px rgba(201, 128, 23, 0.25));
}

/* Dislike ativo */
.tvi-reactions-widget .rw-btn-dislike.is-active {
    color: #fff;
    background: #d62525;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.tvi-reactions-widget .rw-btn-dislike.is-active .rw-ico-outline {
    display: none;
}

.tvi-reactions-widget .rw-btn-dislike.is-active .rw-ico-filled {
    display: block;
    color: #fff;
    fill: #fff;
}

/* Não ativo */
.tvi-reactions-widget .rw-btn:not(.is-active) .rw-ico-outline {
    display: block;
}

.tvi-reactions-widget .rw-btn:not(.is-active) .rw-ico-filled {
    display: none;
}

/* ═══════════════════════════════
   Animações
   ═══════════════════════════════ */

/* Pop */
@keyframes rw-pop {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.3); }
    45%  { transform: scale(0.88); }
    65%  { transform: scale(1.12); }
    80%  { transform: scale(0.97); }
    100% { transform: scale(1); }
}

.tvi-reactions-widget .rw-btn.do-pop svg {
    animation: rw-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Partículas */
.tvi-reactions-widget .rw-particle {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    animation: rw-burst 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.tvi-reactions-widget .rw-particle--circle {
    border-radius: 50%;
}

.tvi-reactions-widget .rw-particle--star {
    border-radius: 1px;
    transform-origin: center;
}

@keyframes rw-burst {
    0%   { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
    60%  { opacity: 0.8; }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.1) rotate(var(--rot, 180deg)); }
}

/* Ring */
.tvi-reactions-widget .rw-ring {
    position: absolute;
    top: 50%;
    left: 28px;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    margin-left: -6px;
    border-radius: 50%;
    border: 2.5px solid #f7b556;
    pointer-events: none;
    animation: rw-ring-expand 0.55s ease-out forwards;
    z-index: 15;
}

.tvi-reactions-widget.dislike-mode .rw-ring {
    border-color: #ff5a5a;
}

@keyframes rw-ring-expand {
    0%   { opacity: 0.6; transform: scale(0.5); }
    50%  { opacity: 0.35; }
    100% { opacity: 0; transform: scale(5); }
}

/* Flash */
.tvi-reactions-widget .rw-flash {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 50%, rgba(247, 181, 86, 0.25), transparent 70%);
    pointer-events: none;
    animation: rw-flash-fade 0.6s ease-out forwards;
    z-index: 1;
}

.tvi-reactions-widget.dislike-mode .rw-flash {
    background: radial-gradient(circle at 50% 50%, rgba(255, 90, 90, 0.35), transparent 80%);
}

@keyframes rw-flash-fade {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* Contagem */
.tvi-reactions-widget .rw-count {
    display: inline-block;
    min-width: 10px;
    text-align: center;
    position: relative;
    z-index: 2;
    color: inherit;
}

@keyframes rw-count-bounce {
    0%   { opacity: 0; transform: translateY(10px) scale(0.8); }
    60%  { transform: translateY(-2px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tvi-reactions-widget .rw-count.do-count-anim {
    animation: rw-count-bounce 0.35s ease forwards;
}

/* ═══════════════════════════════
   Feedback
   ═══════════════════════════════ */
.tvvote-feedback {
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    text-align: right;
    margin-top: 8px;
    transition: opacity 0.3s ease;
}

.tvvote-feedback--like {
    color: #7c6332;
    background: rgba(201, 128, 23, 0.1);
}

.tvvote-feedback--dislike {
    color: #666;
    background: rgba(100, 100, 100, 0.08);
}

/* ═══════════════════════════════
   Content Gate (Lightbox)
   ═══════════════════════════════ */
.tvvote-gate {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tvvote-gate__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.tvvote-gate__panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: tvvote-gate-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes tvvote-gate-in {
    0%   { opacity: 0; transform: scale(0.85) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.tvvote-gate__icon {
    color: #c98017;
    margin-bottom: 12px;
}

.tvvote-gate__title {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 12px;
}

.tvvote-gate__message {
    font-size: 15px;
    color: #50575e;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tvvote-gate__widget {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.tvvote-gate__widget .tvvote-widget-wrap {
    margin: 0;
}

.tvvote-gate__footnote {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Slide-in */
.tvvote-gate--slide_in .tvvote-gate__panel {
    position: fixed;
    bottom: 0;
    right: 0;
    left: auto;
    top: auto;
    max-width: 420px;
    border-radius: 20px 20px 0 0;
    animation: tvvote-slide-up 0.5s ease forwards;
}

@keyframes tvvote-slide-up {
    0%   { opacity: 0; transform: translateY(100%); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════
   Dark Theme
   ═══════════════════════════════ */
.tvvote-theme-dark .tvi-reactions-widget {
    --strip-color-solid: #2c2a25;
}

.tvvote-theme-dark .tvi-reactions-widget::after {
    background: linear-gradient(110deg, rgba(44,42,37,1) 15%, rgba(44,42,37,0.55) 65%, rgba(44,42,37,0) 100%);
}

.tvvote-theme-dark .tvi-reactions-widget .rw-reactions {
    background: linear-gradient(120deg, #3a3830 0%, #35332b 55%, #2f2d26 100%);
    border-color: rgba(100, 80, 40, 0.45);
}

.tvvote-theme-dark .tvi-reactions-widget .rw-btn {
    color: #d4c5a0;
}

.tvvote-theme-dark .tvi-reactions-widget .rw-sep {
    background: rgba(180, 160, 100, 0.3);
}

/* ═══════════════════════════════
   Layouts Alternativos
   ═══════════════════════════════ */

/* Compacto */
.tvvote-layout-compact .tvi-reactions-widget {
    padding: 4px 12px !important;
    min-height: 36px !important;
}

.tvvote-layout-compact .rw-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.tvvote-layout-compact .rw-btn svg {
    width: 18px;
    height: 18px;
}

/* Mínimo */
.tvvote-layout-minimal .tvi-reactions-widget {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.tvvote-layout-minimal .tvi-reactions-widget::after {
    display: none;
}

/* ═══════════════════════════════
   Estrelas (Rating)
   ═══════════════════════════════ */
.tvvote-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 16px;
}

.tvvote-star-full  { color: #f0a500; }
.tvvote-star-half  { color: #f0a500; opacity: 0.6; }
.tvvote-star-empty { color: #ccc; }

.tvvote-rating-value {
    font-weight: 700;
    margin-left: 6px;
    font-size: 14px;
    color: #333;
}

.tvvote-rating-count {
    font-size: 12px;
    color: #999;
}

/* ═══════════════════════════════
   Listas (Shortcodes / Widgets)
   ═══════════════════════════════ */
.tvvote-top-list {
    margin: 0;
    padding: 0;
    list-style: decimal inside;
}

.tvvote-top-list li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.tvvote-top-list li:last-child {
    border-bottom: none;
}

.tvvote-top-stats {
    font-size: 12px;
    color: #888;
    margin-left: 6px;
}

.tvvote-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tvvote-recent-list li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f1;
}

.tvvote-recent-list li small {
    color: #999;
    font-size: 11px;
    margin-left: 6px;
}

/* ═══════════════════════════════
   Responsivo
   ═══════════════════════════════ */
@media (max-width: 600px) {
    .tvi-reactions-widget {
        padding: 6px 12px !important;
        justify-content: center !important;
    }

    .tvi-reactions-widget .rw-btn {
        padding: 8px 14px;
    }

    .tvvote-gate__panel {
        padding: 28px 20px 24px;
        width: 95%;
    }
}

/* ═══════════════════════════════
   ANTI-CONFLITO com temas
   Força o visual correto
   ═══════════════════════════════ */
.tvvote-widget-wrap *,
.tvvote-widget-wrap *::before,
.tvvote-widget-wrap *::after {
    box-sizing: border-box;
}

.tvvote-widget-wrap .tvi-reactions-widget {
    font-family: 'Segoe UI', Roboto, -apple-system, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.tvvote-widget-wrap button {
    margin: 0 !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: 0.01em !important;
    border: none !important;
    box-shadow: none !important;
    min-height: auto !important;
}

.tvvote-widget-wrap button:hover,
.tvvote-widget-wrap button:focus {
    text-decoration: none !important;
    box-shadow: none !important;
}

.tvvote-widget-wrap svg {
    max-width: none !important;
    vertical-align: middle !important;
}