/**
 * Estilos Principais: Apuração CV - Eleições 2026
 * Design System: Comitê Virtual / PartidoVia
 * Layout TV Broadcast, Animações Suaves, Modo Dark/Light e Responsividade
 */

.apuracao-cv-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border-radius: 18px;
    padding: 24px;
    margin: 24px 0;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.apuracao-cv-wrapper * {
    box-sizing: border-box;
}

/* ==========================================================================
   TEMA ESCURO (PADRÃO COMITÊ VIRTUAL - NAVY BLUE & GOLD)
   ========================================================================== */
.apuracao-cv-wrapper.tema-dark {
    background: linear-gradient(150deg, #050d1a 0%, #0a182c 50%, #0f2442 100%);
    color: #f1f5f9;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.apuracao-cv-wrapper.tema-dark .acv-summary-card {
    background: rgba(5, 13, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.apuracao-cv-wrapper.tema-dark .acv-metric-item {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.apuracao-cv-wrapper.tema-dark .acv-candidate-card {
    background: rgba(10, 24, 44, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.apuracao-cv-wrapper.tema-dark .acv-candidate-card:hover {
    background: rgba(15, 36, 66, 0.9);
    border-color: #d4af37;
    box-shadow: 0 10px 28px rgba(212, 175, 55, 0.18);
    transform: translateY(-1px);
}

.apuracao-cv-wrapper.tema-dark select {
    background: #09172a;
    color: #ffffff;
    border: 1px solid #233b5d;
}

.apuracao-cv-wrapper.tema-dark select:focus {
    border-color: #d4af37;
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   TEMA CLARO (LIGHT MODE CLEAN & GOLD)
   ========================================================================== */
.apuracao-cv-wrapper.tema-light {
    background: linear-gradient(150deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    color: #0f172a;
    border: 1px solid #cbd5e1;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.apuracao-cv-wrapper.tema-light .acv-summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.apuracao-cv-wrapper.tema-light .acv-metric-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.apuracao-cv-wrapper.tema-light .acv-candidate-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.apuracao-cv-wrapper.tema-light .acv-candidate-card:hover {
    border-color: #0284c7;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.14);
    transform: translateY(-1px);
}

.apuracao-cv-wrapper.tema-light select {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

/* ==========================================================================
   HEADER DO WIDGET
   ========================================================================== */
.acv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.18);
}

.acv-brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.acv-logo-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid #d4af37;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    background: #000;
}

.acv-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.acv-title-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.acv-main-heading {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.acv-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.acv-pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: acvPulse 1.6s infinite;
}

@keyframes acvPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.acv-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Anel de Contagem Regressiva SVG */
.acv-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.12);
    color: #f3d078;
    border: 1px solid rgba(212, 175, 55, 0.28);
    font-variant-numeric: tabular-nums;
}

.acv-timer-circle {
    display: block;
    width: 22px;
    height: 22px;
    transform: rotate(-90deg);
}

.acv-timer-bg {
    fill: none;
    stroke: rgba(212, 175, 55, 0.2);
    stroke-width: 2.4;
}

.acv-timer-bar {
    fill: none;
    stroke: #e5c158;
    stroke-width: 2.6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s linear;
}

.acv-btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #c89b3c 0%, #e5c158 100%);
    color: #061121;
    box-shadow: 0 4px 14px rgba(200, 155, 60, 0.3);
    transition: all 0.2s ease;
}

.acv-btn-refresh:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(200, 155, 60, 0.45);
}

.acv-btn-refresh.spinning .acv-icon-spin {
    animation: acvSpin 0.8s linear infinite;
}

@keyframes acvSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   ABAS RÁPIDAS DE CARGOS (ESTILO PORTAL NOTÍCIAS)
   ========================================================================== */
.acv-cargo-tabs-wrap {
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.acv-cargo-tabs-wrap::-webkit-scrollbar {
    display: none;
}

.acv-cargo-tabs {
    display: flex;
    gap: 8px;
    min-width: max-content;
    padding-bottom: 4px;
}

.acv-cargo-tab {
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.apuracao-cv-wrapper.tema-light .acv-cargo-tab {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.acv-cargo-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.apuracao-cv-wrapper.tema-light .acv-cargo-tab:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.acv-cargo-tab.active {
    background: linear-gradient(135deg, #c89b3c 0%, #e5c158 100%) !important;
    color: #061121 !important;
    border-color: #d4af37 !important;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(200, 155, 60, 0.35);
}

.apuracao-cv-wrapper.tema-light .acv-cargo-tab.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   FILTROS DINÂMICOS
   ========================================================================== */
.acv-filters-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.acv-filter-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.acv-filter-col label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

.acv-filter-col select {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}

/* ==========================================================================
   ALERT BOX (SIMULAÇÃO / NOTIFICAÇÃO)
   ========================================================================== */
.acv-alert-box {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    line-height: 1.4;
}

/* ==========================================================================
   CARD DE ESTATÍSTICAS E RESUMO
   ========================================================================== */
.acv-summary-card {
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.acv-summary-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.acv-stat-label {
    font-size: 0.98rem;
    font-weight: 700;
}

.acv-stat-highlight {
    font-size: 1.65rem;
    font-weight: 900;
    color: #10b981;
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
}

.acv-last-update-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.acv-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 2px 7px;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 800;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.acv-live-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
}

.val-ultima-atualizacao {
    font-weight: 600;
    opacity: 0.85;
}

.acv-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(120, 120, 120, 0.2);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 18px;
}

.acv-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #0284c7 60%, #d4af37 100%);
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.acv-stats-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.acv-metric-item {
    padding: 12px 10px;
    border-radius: 10px;
    text-align: center;
}

.acv-metric-name {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 4px;
}

.acv-metric-number {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   LAYOUT TV / BROADCAST (DUELO DE LÍDERES LADO A LADO)
   ========================================================================== */
.acv-tv-duel-container {
    margin-bottom: 28px;
}

.acv-tv-duel-box {
    background: rgba(8, 20, 38, 0.85);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.apuracao-cv-wrapper.tema-light .acv-tv-duel-box {
    background: #ffffff;
    border: 1.5px solid #0284c7;
    box-shadow: 0 14px 32px rgba(2, 132, 199, 0.12);
}

.acv-tv-duel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.apuracao-cv-wrapper.tema-light .acv-tv-duel-header {
    border-bottom-color: #e2e8f0;
}

.acv-tv-duel-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.74rem;
    font-weight: 800;
    color: #ef4444;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.acv-tv-duel-advantage {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
}

.acv-tv-duel-advantage strong {
    font-size: 1rem;
    font-weight: 900;
    color: #34d399;
}

.apuracao-cv-wrapper.tema-light .acv-tv-duel-advantage {
    color: #059669;
}

.apuracao-cv-wrapper.tema-light .acv-tv-duel-advantage strong {
    color: #047857;
}

.acv-tv-duel-cards-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .acv-tv-duel-cards-grid {
        grid-template-columns: 1fr;
    }
}

.acv-tv-cand-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--cand-theme, #0284c7);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease;
}

.apuracao-cv-wrapper.tema-light .acv-tv-cand-card {
    background: #f8fafc;
}

.acv-tv-cand-card:hover {
    transform: translateY(-2px);
}

.acv-tv-cand-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--cand-theme, #0284c7);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.acv-tv-avatar-wrap {
    position: relative;
    width: 86px;
    height: 86px;
    margin-top: 10px;
    margin-bottom: 12px;
}

.acv-tv-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--cand-theme, #0284c7);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    background: #1e293b;
    display: block;
}

.acv-tv-party-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acv-tv-party-badge img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.acv-tv-cand-info {
    width: 100%;
}

.acv-tv-cand-name {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.acv-tv-cand-sub {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.acv-tv-number-tag {
    font-weight: 800;
    color: #d4af37;
}

.apuracao-cv-wrapper.tema-light .acv-tv-number-tag {
    color: #0284c7;
}

.acv-tv-cand-percent {
    font-size: 2.3rem;
    font-weight: 900;
    color: var(--cand-theme, #38bdf8);
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.acv-tv-cand-votes {
    font-size: 0.86rem;
    opacity: 0.85;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.acv-tv-vs-badge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.acv-tv-vs-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c89b3c 0%, #e5c158 100%);
    color: #061121;
    font-size: 1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(200, 155, 60, 0.4);
    border: 2px solid #ffffff;
}

/* Battle Bar Proporcional */
.acv-tv-battle-bar-wrap {
    width: 100%;
    height: 14px;
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.acv-tv-battle-bar-fill-left,
.acv-tv-battle-bar-fill-right {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.acv-others-heading {
    margin: 20px 0 14px 0;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* ==========================================================================
   LISTA DE CANDIDATOS (PADRÃO & COMPLETO)
   ========================================================================== */
.acv-candidates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.acv-candidate-card {
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.acv-candidate-card.eleito {
    border-left: 5px solid #10b981 !important;
}

.acv-candidate-card.segundo-turno {
    border-left: 5px solid #f59e0b !important;
}

.acv-cand-pos {
    font-size: 1.15rem;
    font-weight: 900;
    min-width: 32px;
    opacity: 0.65;
    text-align: center;
}

/* Avatar Wrap com Foto e Logo do Partido */
.acv-cand-avatar-wrap {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}

.acv-cand-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border: 2px solid var(--cand-accent, rgba(212, 175, 55, 0.4));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.acv-cand-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acv-cand-photo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
    background: #1e293b;
}

.acv-cand-party-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acv-cand-party-badge img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.acv-cand-info {
    flex: 1;
    min-width: 0;
}

.acv-cand-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.acv-cand-name {
    font-weight: 800;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acv-cand-number-tag {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(212, 175, 55, 0.2);
    color: #f3d078;
    border: 1px solid rgba(212, 175, 55, 0.35);
}

.apuracao-cv-wrapper.tema-light .acv-cand-number-tag {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.3);
}

.acv-badge-status {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
}

.acv-badge-eleito {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.acv-badge-2turno {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.acv-cand-party-text {
    font-size: 0.8rem;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.acv-cand-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.acv-cand-percent {
    font-size: 1.4rem;
    font-weight: 900;
    color: #38bdf8;
    font-variant-numeric: tabular-nums;
}

.apuracao-cv-wrapper.tema-light .acv-cand-percent {
    color: #0284c7;
}

.acv-cand-votes-text {
    font-size: 0.82rem;
    opacity: 0.8;
    font-variant-numeric: tabular-nums;
}

.acv-cand-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(120, 120, 120, 0.15);
    border-radius: 9999px;
    overflow: hidden;
}

.acv-cand-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* ==========================================================================
   RODAPÉ DO WIDGET
   ========================================================================== */
.acv-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(150, 150, 150, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.85;
    flex-wrap: wrap;
    gap: 8px;
}

.acv-divider {
    margin: 0 4px;
    opacity: 0.5;
}

.acv-tse-link {
    color: #38bdf8 !important;
    text-decoration: none;
    font-weight: 700;
}

.acv-tse-link:hover {
    text-decoration: underline;
}

/* Loader */
.acv-loader-placeholder {
    text-align: center;
    padding: 35px 20px;
    opacity: 0.8;
}

.acv-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: acvSpin 0.8s linear infinite;
    margin: 0 auto 12px;
}

/* Twitter Box */
.acv-twitter-card {
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
}

.acv-twitter-card.tema-dark {
    background: #061121;
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.acv-tw-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.acv-tw-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

/* ==========================================================================
   LINK DA LOGO COMITÊ VIRTUAL & PILL DE STATUS
   ========================================================================== */
.acv-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.acv-logo-link:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.acv-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: #e2e8f0;
}

.acv-stat-pill strong {
    color: #d4af37;
    font-weight: 800;
}

.apuracao-cv-wrapper.tema-light .acv-stat-pill {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.3);
    color: #0f172a;
}

.apuracao-cv-wrapper.tema-light .acv-stat-pill strong {
    color: #0284c7;
}

/* ==========================================================================
   DISPLAY HORIZONTAL (100% WIDTH DA DIV, MAX-HEIGHT 300PX)
   ========================================================================== */
.apuracao-cv-wrapper.modo-horizontal {
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    max-height: 300px !important;
    padding: 10px 16px !important;
    margin: 10px 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-header {
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-logo-img {
    height: 28px !important;
    max-height: 28px !important;
    width: auto !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-main-heading {
    font-size: 0.95rem !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-badge-live {
    font-size: 0.65rem !important;
    margin-bottom: 2px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-duel-container {
    margin-bottom: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-duel-box {
    padding: 8px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 0 !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-duel-header {
    margin-bottom: 6px !important;
    padding-bottom: 4px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-duel-live-tag {
    font-size: 0.68rem !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-duel-advantage {
    font-size: 0.76rem !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-duel-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    gap: 10px !important;
    margin-bottom: 6px !important;
    align-items: center !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-card {
    padding: 6px 12px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    min-height: 110px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-rank {
    top: 3px !important;
    right: 8px !important;
    font-size: 0.6rem !important;
    padding: 1px 5px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-avatar-wrap {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-avatar-img {
    width: 50px !important;
    height: 50px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-party-badge {
    width: 18px !important;
    height: 18px !important;
    bottom: -2px !important;
    right: -2px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-name {
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 0 2px 0 !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-sub {
    font-size: 0.7rem !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-percent {
    font-size: 1.25rem !important;
    line-height: 1.1 !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-votes {
    font-size: 0.72rem !important;
    margin-bottom: 2px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-badge-status {
    font-size: 0.65rem !important;
    padding: 1px 6px !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-vs-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-vs-circle {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.7rem !important;
}

.apuracao-cv-wrapper.modo-horizontal .acv-tv-battle-bar-wrap {
    height: 5px !important;
    margin-top: 4px !important;
}

/* Responsividade no display horizontal para telas ultra-compactas (< 520px) */
@media (max-width: 520px) {
    .apuracao-cv-wrapper.modo-horizontal .acv-tv-duel-cards-grid {
        gap: 6px !important;
    }
    .apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-card {
        padding: 4px 8px !important;
        gap: 6px !important;
        min-height: 95px !important;
    }
    .apuracao-cv-wrapper.modo-horizontal .acv-tv-avatar-wrap {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
    .apuracao-cv-wrapper.modo-horizontal .acv-tv-avatar-img {
        width: 40px !important;
        height: 40px !important;
    }
    .apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-name {
        font-size: 0.82rem !important;
    }
    .apuracao-cv-wrapper.modo-horizontal .acv-tv-cand-percent {
        font-size: 1.05rem !important;
    }
}
