:root {
    color-scheme: light;
    --brand-950: #071a33;
    --brand-900: #08264b;
    --brand-800: #0b3970;
    --brand-700: #10529b;
    --brand-100: #dbeafe;
    --brand-50: #eff6ff;
    --success-700: #087443;
    --success-600: #0b8f53;
    --success-100: #d8f5e6;
    --warning-700: #9a5b05;
    --warning-100: #fff1cc;
    --danger-700: #b42318;
    --danger-100: #fee4e2;
    --slate-950: #101828;
    --slate-800: #1d2939;
    --slate-700: #344054;
    --slate-600: #475467;
    --slate-500: #667085;
    --slate-400: #98a2b3;
    --slate-300: #d0d5dd;
    --slate-200: #eaecf0;
    --slate-100: #f2f4f7;
    --slate-50: #f8fafc;
    --surface: #ffffff;
    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --shadow-widget: 0 24px 70px rgba(15, 35, 62, 0.14), 0 4px 16px rgba(15, 35, 62, 0.06);
    --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 3px 10px rgba(16, 24, 40, 0.03);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: #eef2f7;
}

body {
    margin: 0;
    color: var(--slate-950);
    background:
        radial-gradient(circle at 15% 10%, rgba(16, 82, 155, 0.09), transparent 30%),
        linear-gradient(180deg, #f7f9fc 0%, #edf1f6 100%);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
}

button,
select {
    font: inherit;
}

.widget-container,
.widget-horizontal {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 82, 155, 0.12);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-widget);
}

.widget-header,
.bloco-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-800) 100%);
}

.widget-header {
    padding: 24px;
}

.header-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.header-copy {
    min-width: 0;
}

.header-kicker {
    display: block;
    margin-bottom: 5px;
    color: #b9d9ff;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.widget-header h2,
.bloco-header h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.25rem, 4vw, 1.65rem);
    font-weight: 780;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.produto-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    transition: border-color 160ms ease, background-color 160ms ease;
}

.produto-link:hover {
    border-color: rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.2);
}

.produto-link:focus-visible {
    outline: 3px solid rgba(142, 197, 255, 0.42);
    outline-offset: 2px;
}

.produto-link-curto {
    display: none;
}

.controles {
    display: grid;
    grid-template-columns: 0.85fr 1.35fr 1fr;
    gap: 10px;
}

.controles select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 34px 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 9px;
    outline: 0;
    color: #fff;
    background-color: rgba(3, 20, 42, 0.42);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23dbeafe' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
    appearance: none;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.controles select:hover {
    border-color: rgba(255, 255, 255, 0.42);
    background-color: rgba(3, 20, 42, 0.62);
}

.controles select:focus-visible {
    border-color: #8ec5ff;
    box-shadow: 0 0 0 3px rgba(142, 197, 255, 0.24);
}

.controles select:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.controles option {
    color: var(--slate-950);
    background: #fff;
}

.status-geral,
.bloco-status {
    background: #fff;
}

.status-geral {
    padding: 22px 24px 18px;
}

.info-topo,
.status-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--slate-800);
    font-size: 0.88rem;
    font-weight: 750;
}

.info-topo > span:last-child,
.status-topo > span:last-child {
    color: var(--brand-800);
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.status-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-600);
    box-shadow: 0 0 0 4px var(--success-100);
}

.is-loading .status-dot {
    animation: pulsarStatus 1.2s ease-in-out infinite;
}

.barra-progresso-total,
.barra-total-bg {
    overflow: hidden;
    border-radius: 999px;
    background: var(--slate-100);
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.07);
}

.barra-progresso-total {
    height: 9px;
}

.preenchimento-total,
.barra-total-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success-700), #21b26f);
    box-shadow: 0 0 12px rgba(11, 143, 83, 0.28);
    transition: width 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.data-hora {
    display: block;
    margin-top: 9px;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 0.72rem;
    font-weight: 560;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aviso-fonte-dados {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    border-bottom: 1px solid transparent;
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1.3;
    letter-spacing: 0.025em;
    text-align: center;
}

.aviso-fonte-dados[hidden] {
    display: none !important;
}

.aviso-fonte-dados--simulacao {
    color: #9b1c1c;
    border-color: #f4aaa3;
    background: #fff0ee;
}

.aviso-fonte-dados--oficial {
    color: #05603a;
    border-color: #a8dfc3;
    background: #e7f8ef;
}

.resumo-votos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-block: 1px solid var(--slate-200);
    background: var(--slate-50);
}

.resumo-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 15px 10px;
    text-align: center;
}

.resumo-item:not(:last-child)::after {
    position: absolute;
    top: 24%;
    right: 0;
    width: 1px;
    height: 52%;
    background: var(--slate-200);
    content: "";
}

.resumo-item > span:first-child {
    margin-bottom: 5px;
    color: var(--slate-500);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.resumo-valor {
    color: var(--brand-900);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: pre-line;
    font-variant-numeric: tabular-nums;
}

.resumo-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-bottom: 1px solid var(--slate-200);
    color: var(--brand-700);
    background: var(--slate-50);
    font-size: 0.69rem;
    font-weight: 750;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease;
}

.resumo-toggle:hover {
    color: var(--brand-900);
    background: var(--brand-50);
}

.resumo-toggle:focus-visible,
.carregar-mais:focus-visible {
    outline: 3px solid rgba(16, 82, 155, 0.25);
    outline-offset: -3px;
}

.resumo-votos.oculto {
    display: none;
}

.lista-candidatos {
    padding: 22px 24px 24px;
    background: #fff;
}

.eleicao-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 0 0 14px;
    color: var(--slate-500);
    font-size: 0.7rem;
    font-weight: 680;
}

.eleicao-meta > span {
    color: var(--slate-300);
}

.candidato-card {
    position: relative;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.ranking-cand {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: var(--brand-800);
    background: var(--brand-100);
    box-shadow: 0 2px 6px rgba(16, 82, 155, 0.16);
    font-size: 0.62rem;
    font-weight: 900;
}

.candidato-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}

.candidato-flex {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    gap: 13px;
}

.foto-container {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    color: var(--brand-800);
    background: linear-gradient(145deg, var(--brand-100), var(--slate-100));
    box-shadow: 0 0 0 1px var(--slate-200), 0 3px 10px rgba(16, 24, 40, 0.08);
    font-size: 0.72rem;
    font-weight: 850;
}

.candidato-iniciais {
    position: absolute;
}

.foto-cand {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-textos,
.info-cand {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.nome-cand {
    overflow: hidden;
    color: var(--slate-950);
    font-size: 1rem;
    font-weight: 820;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.015em;
}

.numero-cand {
    margin: 3px 0 6px;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 0.72rem;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.percentual {
    flex: 0 0 auto;
    color: var(--brand-900);
    font-size: 1.55rem;
    font-weight: 860;
    line-height: 1;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
}

.barra-cand-bg,
.card-barra-bg {
    overflow: hidden;
    border-radius: 999px;
    background: var(--slate-100);
}

.barra-cand-bg {
    height: 7px;
    margin-bottom: 9px;
}

.barra-cand-fill,
.card-barra-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-900), var(--brand-700));
}

.votos-absolutos {
    display: flex;
    flex-direction: column;
    color: var(--slate-500);
    font-size: 0.74rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.vice-suplentes {
    display: block;
    margin-top: 5px;
    color: var(--slate-600);
    font-size: 0.7rem;
    line-height: 1.35;
}

.eleito-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    padding: 3px 7px;
    overflow: hidden;
    border-radius: 999px;
    font-size: 0.56rem;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-verde {
    color: #05603a;
    background: var(--success-100);
}

.badge-amarelo {
    color: var(--warning-700);
    background: var(--warning-100);
}

.badge-neutro {
    color: var(--slate-600);
    background: var(--slate-100);
}

.badge-virada {
    color: #fff;
    background: #d92d20;
}

.estado-eleicao {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 130px;
    padding: 22px;
    border: 1px dashed var(--slate-300);
    border-radius: var(--radius-lg);
    color: var(--slate-600);
    background: var(--slate-50);
    text-align: center;
}

.estado-aguardando {
    color: #77520a;
    border-color: #efcf78;
    background: #fffaeb;
}

.estado-erro {
    color: var(--danger-700);
    border-color: #f4b4ae;
    background: #fff5f4;
}

.estado-icone {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
    font-size: 1.2rem;
}

.loading-overlay,
.loading-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 100px;
    color: var(--slate-500);
    font-size: 0.78rem;
    font-weight: 650;
}

.loading-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid var(--brand-100);
    border-top-color: var(--brand-700);
    border-radius: 50%;
    animation: girar 700ms linear infinite;
}

.carregar-mais {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #b8cce5;
    border-radius: var(--radius-md);
    color: var(--brand-800);
    background: var(--brand-50);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.carregar-mais:hover {
    color: #fff;
    border-color: var(--brand-800);
    background: var(--brand-800);
    transform: translateY(-1px);
}

/* Formato horizontal */
.widget-horizontal {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-lg);
    background: var(--slate-50);
}

.bloco-header {
    display: flex;
    flex: 0 0 238px;
    flex-direction: column;
    justify-content: center;
    padding: 10px 13px;
}

.bloco-header .header-brand {
    align-items: center;
    margin-bottom: 7px;
}

.bloco-header .header-kicker {
    margin-bottom: 1px;
    font-size: 0.5rem;
}

.bloco-header h2 {
    font-size: 0.92rem;
    letter-spacing: -0.02em;
}

.bloco-header .produto-link {
    padding: 3px 6px;
    font-size: 0.55rem;
}

.bloco-header .produto-link-amplo {
    display: none;
}

.bloco-header .produto-link-curto {
    display: inline;
}

.bloco-header .controles {
    grid-template-columns: 48px minmax(90px, 1fr) 49px;
    gap: 5px;
}

.bloco-header .controles select {
    height: 27px;
    padding: 0 18px 0 7px;
    border-radius: 6px;
    background-position: right 5px center;
    background-size: 10px;
    font-size: 0.64rem;
}

.bloco-status {
    display: flex;
    flex: 0 0 190px;
    flex-direction: column;
    justify-content: center;
    padding: 10px 13px;
    border-right: 1px solid var(--slate-200);
}

body[data-widget="horizontal"] .aviso-fonte-dados {
    position: absolute;
    top: 0;
    right: 0;
    left: 428px;
    z-index: 5;
    height: 20px;
    min-height: 20px;
    padding: 2px 10px;
    overflow: hidden;
    border-bottom-width: 1px;
    font-size: 0.49rem;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-widget="horizontal"] .tem-aviso-dados .bloco-carrossel {
    padding-top: 24px;
    padding-bottom: 4px;
}

body[data-widget="horizontal"] .tem-aviso-dados .card-cand {
    height: 64px;
}

.status-topo {
    margin-bottom: 6px;
    font-size: 0.7rem;
}

.status-topo > span:last-child {
    font-size: 0.86rem;
}

.barra-total-bg {
    height: 5px;
}

.bloco-status .data-hora {
    margin-top: 6px;
    font-size: 0.56rem;
}

.bloco-carrossel {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    gap: 9px;
    padding: 8px 12px;
    overflow-x: auto;
    scroll-behavior: auto;
    scrollbar-width: none;
    will-change: scroll-position;
}

.bloco-carrossel::-webkit-scrollbar {
    display: none;
}

.bloco-carrossel .eleicao-meta {
    flex: 0 0 145px;
    width: 145px;
    margin: 0;
    padding: 8px;
    font-size: 0.61rem;
    text-align: center;
}

.card-cand {
    position: relative;
    display: flex;
    flex: 0 0 252px;
    align-items: center;
    gap: 9px;
    height: 72px;
    padding: 8px 10px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.card-cand .ranking-cand {
    top: 5px;
    left: 5px;
    width: 18px;
    height: 18px;
    font-size: 0.52rem;
}

.card-cand .foto-container {
    width: 42px;
    height: 42px;
}

.card-topo {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 3px;
}

.card-nome {
    overflow: hidden;
    color: var(--slate-900);
    font-size: 0.7rem;
    font-weight: 820;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.card-pct {
    flex: 0 0 auto;
    color: var(--brand-900);
    font-size: 0.86rem;
    font-weight: 860;
    letter-spacing: -0.035em;
}

.card-barra-bg {
    height: 4px;
    margin-bottom: 3px;
}

.card-votos,
.card-complemento {
    max-width: 170px;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 0.54rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-complemento {
    color: var(--slate-600);
}

.card-cand > .eleito-badge {
    position: absolute;
    right: 8px;
    bottom: 5px;
    max-width: 90px;
    padding: 2px 5px;
    font-size: 0.45rem;
}

.bloco-carrossel .carregar-mais {
    flex: 0 0 145px;
    width: 145px;
}

.bloco-carrossel .estado-eleicao {
    min-width: 100%;
    min-height: 68px;
    padding: 10px;
    font-size: 0.7rem;
}

/* Formatos compactos */
body[data-widget="300x250"] .widget-container,
body[data-widget="300x600"] .widget-container {
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 35, 62, 0.16);
}

body[data-widget="300x250"] .widget-header {
    flex: 0 0 auto;
    padding: 9px 10px 8px;
}

body[data-widget="300x250"] .header-brand {
    align-items: center;
    margin-bottom: 6px;
}

body[data-widget="300x250"] .header-kicker {
    margin-bottom: 0;
    font-size: 0.48rem;
}

body[data-widget="300x250"] .widget-header h2 {
    font-size: 0.9rem;
}

body[data-widget="300x250"] .produto-link {
    padding: 3px 6px;
    font-size: 0.53rem;
}

body[data-widget="300x250"] .produto-link-amplo,
body[data-widget="300x600"] .produto-link-amplo {
    display: none;
}

body[data-widget="300x250"] .produto-link-curto,
body[data-widget="300x600"] .produto-link-curto {
    display: inline;
}

body[data-widget="300x250"] .controles {
    grid-template-columns: 0.8fr 1.35fr;
    gap: 4px;
}

body[data-widget="300x250"] .controles select {
    height: 25px;
    padding: 0 18px 0 7px;
    border-radius: 6px;
    background-position: right 5px center;
    background-size: 9px;
    font-size: 0.61rem;
}

body[data-widget="300x250"] .controles .select-full {
    grid-column: 1 / -1;
}

body[data-widget="300x250"] .status-geral {
    flex: 0 0 auto;
    padding: 7px 10px 6px;
}

body[data-widget="300x250"] .aviso-fonte-dados {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 0.47rem;
    line-height: 1.2;
}

body[data-widget="300x250"] .info-topo {
    margin-bottom: 5px;
    font-size: 0.65rem;
}

body[data-widget="300x250"] .info-topo > span:last-child {
    font-size: 0.76rem;
}

body[data-widget="300x250"] .status-dot {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 0 2px var(--success-100);
}

body[data-widget="300x250"] .barra-progresso-total {
    height: 4px;
}

body[data-widget="300x250"] .data-hora {
    display: inline;
    margin: 0;
    font-size: 0.6rem;
    line-height: normal;
}

body[data-widget="300x250"] .resumo-toggle {
    width: calc(100% - 16px);
    min-height: 24px;
    margin: 5px 8px;
    padding: 3px 8px;
    border: 1px solid var(--slate-200);
    border-radius: 6px;
    font-size: 0.58rem;
}

body[data-widget="300x250"] .resumo-votos {
    flex: 0 0 auto;
    width: calc(100% - 16px);
    margin: 0 8px 5px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: 7px;
}

body[data-widget="300x250"] .resumo-item {
    padding: 6px 3px;
}

body[data-widget="300x250"] .resumo-item > span:first-child {
    margin-bottom: 2px;
    font-size: 0.45rem;
}

body[data-widget="300x250"] .resumo-valor {
    font-size: 0.56rem;
}

body[data-widget="300x250"] .lista-candidatos {
    flex: 1;
    min-height: 0;
    padding: 7px 8px;
    overflow-y: scroll;
    scrollbar-color: rgba(152, 162, 179, 0.55) transparent;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
}

body[data-widget="300x250"] .lista-candidatos::-webkit-scrollbar,
body[data-widget="300x600"] .lista-candidatos::-webkit-scrollbar {
    width: 1px;
}

body[data-widget="300x250"] .lista-candidatos::-webkit-scrollbar-track,
body[data-widget="300x600"] .lista-candidatos::-webkit-scrollbar-track {
    background: transparent;
}

body[data-widget="300x250"] .lista-candidatos::-webkit-scrollbar-thumb,
body[data-widget="300x600"] .lista-candidatos::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(152, 162, 179, 0.55);
}

body[data-widget="300x250"] .eleicao-meta {
    margin-bottom: 6px;
    font-size: 0.55rem;
}

body[data-widget="300x250"] .candidato-card {
    width: 100%;
    margin-bottom: 6px;
    margin-left: auto;
    margin-right: auto;
    padding: 7px;
    border-radius: 8px;
}

body[data-widget="300x250"] .ranking-cand {
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    font-size: 0.47rem;
}

body[data-widget="300x250"] .candidato-info {
    gap: 6px;
    margin-bottom: 5px;
}

body[data-widget="300x250"] .candidato-flex {
    gap: 7px;
}

body[data-widget="300x250"] .foto-container {
    width: 34px;
    height: 34px;
    font-size: 0.5rem;
}

body[data-widget="300x250"] .nome-cand {
    font-size: 0.68rem;
}

body[data-widget="300x250"] .numero-cand {
    margin: 1px 0 2px;
    font-size: 0.51rem;
}

body[data-widget="300x250"] .eleito-badge {
    padding: 2px 4px;
    font-size: 0.42rem;
}

body[data-widget="300x250"] .percentual {
    font-size: 0.9rem;
}

body[data-widget="300x250"] .barra-cand-bg {
    height: 4px;
    margin-bottom: 4px;
}

body[data-widget="300x250"] .votos-absolutos,
body[data-widget="300x250"] .vice-suplentes {
    font-size: 0.5rem;
}

body[data-widget="300x250"] .estado-eleicao,
body[data-widget="300x250"] .loading-overlay {
    min-height: 58px;
    padding: 8px;
    font-size: 0.6rem;
}

body[data-widget="300x600"] .widget-header {
    padding: 18px 16px 15px;
}

body[data-widget="300x600"] .header-brand {
    align-items: center;
    margin-bottom: 13px;
}

body[data-widget="300x600"] .header-kicker {
    font-size: 0.56rem;
}

body[data-widget="300x600"] .widget-header h2 {
    font-size: 1.04rem;
}

body[data-widget="300x600"] .produto-link {
    padding: 4px 7px;
    font-size: 0.58rem;
}

body[data-widget="300x600"] .controles {
    grid-template-columns: 1fr;
    gap: 6px;
}

body[data-widget="300x600"] .controles select {
    height: 32px;
    font-size: 0.7rem;
}

body[data-widget="300x600"] .status-geral {
    flex: 0 0 auto;
    padding: 13px 15px 11px;
}

body[data-widget="300x600"] .aviso-fonte-dados {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 0.51rem;
    line-height: 1.25;
}

body[data-widget="300x600"] .info-topo {
    margin-bottom: 7px;
    font-size: 0.73rem;
}

body[data-widget="300x600"] .info-topo > span:last-child {
    font-size: 0.9rem;
}

body[data-widget="300x600"] .barra-progresso-total {
    height: 6px;
}

body[data-widget="300x600"] .data-hora {
    margin-top: 6px;
    font-size: 0.61rem;
}

body[data-widget="300x600"] .resumo-toggle {
    width: calc(100% - 24px);
    min-height: 28px;
    margin: 7px 12px;
    padding: 4px 8px;
    border: 1px solid var(--slate-200);
    border-radius: 7px;
    font-size: 0.62rem;
}

body[data-widget="300x600"] .resumo-votos {
    width: calc(100% - 24px);
    margin: 0 12px 7px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
}

body[data-widget="300x600"] .resumo-item {
    padding: 7px 2px;
}

body[data-widget="300x600"] .resumo-item > span:first-child {
    margin-bottom: 3px;
    font-size: 0.46rem;
}

body[data-widget="300x600"] .resumo-valor {
    font-size: 0.56rem;
    line-height: 1.25;
}

body[data-widget="300x600"] .lista-candidatos {
    flex: 1;
    min-height: 0;
    padding: 12px;
    overflow-y: scroll;
    scrollbar-color: rgba(152, 162, 179, 0.55) transparent;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
}

body[data-widget="300x600"] .eleicao-meta {
    margin-bottom: 9px;
    font-size: 0.58rem;
}

body[data-widget="300x600"] .candidato-card {
    width: 100%;
    margin-bottom: 8px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    border-radius: 10px;
}

body[data-widget="300x600"] .ranking-cand {
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    font-size: 0.5rem;
}

body[data-widget="300x600"] .candidato-info {
    margin-bottom: 7px;
}

body[data-widget="300x600"] .candidato-flex {
    gap: 9px;
}

body[data-widget="300x600"] .foto-container {
    width: 42px;
    height: 42px;
}

body[data-widget="300x600"] .nome-cand {
    font-size: 0.79rem;
}

body[data-widget="300x600"] .numero-cand {
    margin: 2px 0 4px;
    font-size: 0.59rem;
}

body[data-widget="300x600"] .percentual {
    font-size: 1.05rem;
}

body[data-widget="300x600"] .barra-cand-bg {
    height: 5px;
    margin-bottom: 5px;
}

body[data-widget="300x600"] .votos-absolutos,
body[data-widget="300x600"] .vice-suplentes {
    font-size: 0.59rem;
}

@media (max-width: 760px) {
    .widget-horizontal {
        display: flex;
        flex-direction: column;
        background: #fff;
    }

    .bloco-header,
    .bloco-status {
        flex-basis: auto;
        width: 100%;
    }

    .bloco-header {
        padding: 16px;
    }

    .bloco-header .header-brand {
        margin-bottom: 12px;
    }

    .bloco-header h2 {
        font-size: 1.05rem;
    }

    .bloco-status {
        padding: 12px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--slate-200);
    }

    .bloco-carrossel {
        align-items: stretch;
        padding: 12px;
    }

    body[data-widget="horizontal"],
    body[data-widget="970x250"] {
        display: block;
        width: 100%;
        height: 250px;
        min-height: 250px;
        padding: 0;
        overflow: hidden;
        background: #fff;
    }

    body[data-widget="horizontal"] .widget-horizontal,
    body[data-widget="970x250"] .widget-horizontal {
        flex-direction: column;
        width: 100%;
        height: 250px;
        min-height: 250px;
        max-height: 250px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body[data-widget="horizontal"] .bloco-header,
    body[data-widget="970x250"] .bloco-header {
        display: block;
        flex: 0 0 82px;
        width: 100%;
        padding: 8px 10px;
    }

    body[data-widget="horizontal"] .bloco-header .header-brand,
    body[data-widget="970x250"] .bloco-header .header-brand {
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin: 0 0 6px;
    }

    body[data-widget="horizontal"] .bloco-header .header-kicker,
    body[data-widget="970x250"] .bloco-header .header-kicker {
        margin-bottom: 1px;
        font-size: 0.43rem;
    }

    body[data-widget="horizontal"] .bloco-header h2,
    body[data-widget="970x250"] .bloco-header h2 {
        font-size: 0.86rem;
    }

    body[data-widget="horizontal"] .bloco-header .produto-link,
    body[data-widget="970x250"] .bloco-header .produto-link {
        padding: 4px 7px;
        font-size: 0.5rem;
    }

    body[data-widget="horizontal"] .bloco-header .controles,
    body[data-widget="970x250"] .bloco-header .controles {
        grid-template-columns: 0.7fr 1.55fr 0.65fr;
        gap: 5px;
    }

    body[data-widget="horizontal"] .bloco-header .controles select,
    body[data-widget="970x250"] .bloco-header .controles select {
        height: 27px;
        padding: 0 20px 0 7px;
        background-position: right 6px center;
        background-size: 10px;
        font-size: 0.58rem;
    }

    body[data-widget="horizontal"] .bloco-status,
    body[data-widget="970x250"] .bloco-status {
        display: grid;
        flex: 0 0 54px;
        grid-template-columns: 1fr;
        gap: 4px;
        width: 100%;
        padding: 7px 10px;
        border-right: 0;
        border-bottom: 1px solid var(--slate-200);
    }

    body[data-widget="horizontal"] .status-topo,
    body[data-widget="970x250"] .status-topo {
        justify-content: space-between;
        width: 100%;
        margin: 0;
        font-size: 0.66rem;
        line-height: 1;
    }

    body[data-widget="horizontal"] .status-topo > span:last-child,
    body[data-widget="970x250"] .status-topo > span:last-child {
        font-size: 0.82rem;
        line-height: 1;
    }

    body[data-widget="horizontal"] .barra-total-bg,
    body[data-widget="970x250"] .barra-total-bg {
        width: 100%;
        height: 5px;
        margin: 0;
    }

    body[data-widget="horizontal"] .bloco-status .data-hora,
    body[data-widget="970x250"] .bloco-status .data-hora {
        display: block;
        margin: 0;
        font-size: 0.52rem;
        line-height: 1.2;
        text-align: left;
    }

    body[data-widget="horizontal"] .bloco-carrossel,
    body[data-widget="970x250"] .bloco-carrossel {
        position: relative;
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        width: 100%;
        min-width: 0;
        min-height: 0;
        gap: 8px;
        justify-content: flex-start;
        padding: 8px 10px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-behavior: auto;
        scroll-snap-type: none;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }

    body[data-widget="horizontal"] .aviso-fonte-dados,
    body[data-widget="970x250"] .aviso-fonte-dados {
        position: static;
        flex: 0 0 28px;
        width: 100%;
        height: 28px;
        min-height: 28px;
        padding: 3px 8px;
        overflow: hidden;
        font-size: 0.44rem;
        line-height: 1.15;
        white-space: normal;
    }

    body[data-widget="horizontal"] .tem-aviso-dados .bloco-carrossel,
    body[data-widget="970x250"] .tem-aviso-dados .bloco-carrossel {
        padding: 5px 10px;
    }

    body[data-widget="horizontal"] .tem-aviso-dados .card-cand,
    body[data-widget="970x250"] .tem-aviso-dados .card-cand {
        height: 72px;
    }

    body[data-widget="horizontal"] .bloco-carrossel .eleicao-meta,
    body[data-widget="970x250"] .bloco-carrossel .eleicao-meta {
        display: none;
    }

    body[data-widget="horizontal"] .card-cand,
    body[data-widget="970x250"] .card-cand {
        flex: 0 0 calc(100vw - 20px);
        width: calc(100vw - 20px);
        max-width: 320px;
        height: 72px;
    }

    body[data-widget="horizontal"] .card-cand img,
    body[data-widget="970x250"] .card-cand img {
        pointer-events: none;
        user-select: none;
        -webkit-user-drag: none;
    }

    body[data-widget="horizontal"] .bloco-carrossel .carregar-mais,
    body[data-widget="970x250"] .bloco-carrossel .carregar-mais {
        flex: 0 0 calc(100vw - 20px);
        width: calc(100vw - 20px);
        max-width: 320px;
        height: 72px;
    }

    body[data-widget="horizontal"] .bloco-carrossel .estado-eleicao,
    body[data-widget="horizontal"] .bloco-carrossel .loading-msg,
    body[data-widget="970x250"] .bloco-carrossel .estado-eleicao,
    body[data-widget="970x250"] .bloco-carrossel .loading-msg {
        min-width: 100%;
    }
}

@media (max-width: 560px) {
    body[data-widget="padrao"] .widget-header {
        padding: 20px 18px;
    }

    body[data-widget="padrao"] .header-brand {
        margin-bottom: 16px;
    }

    body[data-widget="padrao"] .controles {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    body[data-widget="padrao"] .status-geral {
        padding: 18px;
    }

    body[data-widget="padrao"] .resumo-votos {
        grid-template-columns: repeat(2, 1fr);
    }

    body[data-widget="padrao"] .resumo-item:nth-child(2)::after {
        display: none;
    }

    body[data-widget="padrao"] .resumo-item:nth-child(-n+2) {
        border-bottom: 1px solid var(--slate-200);
    }

    body[data-widget="padrao"] .lista-candidatos {
        padding: 18px;
    }

    body[data-widget="padrao"] .candidato-card {
        padding: 14px;
    }

    body[data-widget="padrao"] .foto-container {
        width: 48px;
        height: 48px;
    }

    body[data-widget="padrao"] .percentual {
        font-size: 1.28rem;
    }
}

@keyframes girar {
    to { transform: rotate(360deg); }
}

@keyframes pulsarStatus {
    50% { opacity: 0.45; transform: scale(0.82); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
