﻿:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #252a30
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #fff
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0)
}

.apuracao {
    max-width: 1240px;
    margin: auto;
    padding: 32px 20px;
    font-size: 12px
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 18px
}

.principal {
    min-width: 0
}

#busca {
    margin-bottom: 22px
}
#busca .election-dropdown-panel { width: 100%; }
#nome-local { width: min(320px, 65%); }
#nome-local .election-dropdown-toggle { font-size: 16px; }
.apuracao select[hidden] { display: none; }
.apuracao .election-dropdown-panel { z-index: 10; }
.apuracao .election-dropdown:has(.election-dropdown-toggle[aria-expanded="true"]) { z-index: 11; }

.local {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e5e8;
    padding: 7px 0 12px;
    margin-bottom: 11px
}

.local h1 {
    font-size: 16px;
    color: #0b315a;
    margin: 0;
    text-transform: uppercase;
    font-family: 'OpenSans-ExtraBold', sans-serif;
}

.local span {
    font-size: 16px;
    font-family: 'OpenSans-Regular', sans-serif;
}

#cards-principais {
    display: grid;
    gap: 14px
}

.cargo,
.leg,
#resumo-presidente {
    border: 1px solid #e1e5eb;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 8px #0a223e06
}

.cargo {
    padding: 13px 12px 12px
}

.cargo-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 11px
}

.cargo h2,
.leg h2,
#resumo-presidente h2 {
    font-size: 18px;
    margin: 0;
    font-weight: 700;
    font-family: 'OpenSans-Bold', sans-serif;
}

.indices {
    display: flex;
    gap: 10px;
    white-space: nowrap;
    font-size: 12px;
    font-family: 'OpenSans-Regular', sans-serif;
}

.indices b {
    font-weight: 700
}

.candidatos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 16px
}

.candidato {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0
}

.candidatos>.candidato:nth-child(n+4) {
    border-top: 1px solid #e1e5eb;
    padding-top: 11px;
    margin-top: 11px;
    grid-column: 1/-1
}

.candidatos>.candidato:nth-child(n+4) .resultado {
    margin-left: auto;
    width: 170px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e8edf1;
    display: grid;
    place-items: center;
    flex: none;
    color: #12406d;
    font-weight: 700;
    font-size: 16px;
    position: relative
}

.avatar.eleito {
    border: 1px solid #0e3862
}

.avatar small {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #0e3862;
    color: #fff;
    border-radius: 3px;
    font-size: 8px;
    line-height: 13px;
    padding: 0 3px
}

.info {
    min-width: 0;
    flex: 1
}

.partido {
    font-size: 12px;
    color: #173e69;
    margin-bottom: 4px
}

.nome {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'OpenSans-Medium', sans-serif;
}

.resultado {
    margin-top: 5px
}

.barra {
    height: 3px;
    border-radius: 5px;
    background: #ddd;
    overflow: hidden;
    margin-bottom: 5px
}

.barra i {
    display: block;
    height: 100%;
    background: #0e3862;
    border-radius: 5px
}

.numeros {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
    font-family: 'OpenSans-Medium', sans-serif;
}

.numeros strong,
.leg-numeros strong {
    color: #0e3862;
    font-weight: 700;
}

.mais {
    border: 0;
    border-radius: 4px;
    background: #0e3862;
    color: #fff;
    width: 100%;
    height: 40px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer
}

#cards-legislativo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 15px
}

.leg {
    padding: 12px;
    min-height: 288px;
    display: flex;
    flex-direction: column
}

.leg h2 {
    margin-bottom: 10px
}

.leg .indices {
    margin-bottom: 8px
}

.leg .indices span,
#resumo-presidente .indices span {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leg-lista {
    flex: 1
}

.leg-candidato {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    padding: 6px 0;
    border-bottom: 1px solid #e2e5e8;
    min-height: 37px
}

.leg-candidato:last-child {
    border-bottom: 0
}

.leg-nome {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'OpenSans-Medium', sans-serif;
}

.leg-partido {
    font-size: 8px;
    color: #163c65;
    margin-top: 2px
}

.leg-numeros {
    font-size: 8px;
    text-align: right;
    white-space: nowrap
}

.leg-numeros strong {
    display: block;
    font-size: 9px;
    font-family: 'OpenSans-SemiBold', sans-serif;
}

.selo {
    display: inline-grid;
    place-items: center;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #0e3862;
    color: #fff;
    font-size: 7px;
    margin-left: 3px
}

.paginacao {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px
}

.paginacao button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 0;
    background: #0e3862;
    color: #fff;
    cursor: pointer;
    font-size: 19px;
    line-height: 1
}

.paginacao button:disabled {
    background: #aab9c8;
    cursor: default
}

#resumo-presidente {
    padding: 12px;
    position: sticky;
    top: 8px;
    align-self: start
}

#resumo-presidente h2 {
    margin-bottom: 10px
}

#resumo-presidente h2 span {
    font-weight: 400;
    color: #89919a
}

#resumo-presidente .indices {
    margin-bottom: 7px
}

.lateral-candidato {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 0;
    border-bottom: 1px solid #e2e5e8
}

.lateral-candidato:last-child {
    border-bottom: 0
}

.lateral-candidato .avatar {
    width: 33px;
    height: 33px;
    font-size: 12px
}

.lateral-candidato .avatar small {
    display: none
}

.lateral-candidato .info {
    flex: 1
}

.lateral-candidato .nome {
    font-size: 10px
}

.lateral-candidato .partido {
    font-size: 8px;
    margin: 2px 0 0
}

.lateral-candidato .numeros {
    display: block;
    text-align: right
}

.lateral-candidato .numeros strong {
    display: block;
    font-size: 9px;
    margin-bottom: 3px
}

@media(max-width:700px) {
    .apuracao {
        padding: 20px
    }

    .layout {
        display: block
    }

    #busca {
        margin-bottom: 20px
    }

    .local {
        padding: 0 0 10px;
        margin-bottom: 19px
    }

    #cards-principais {
        gap: 18px
    }

    .cargo {
        padding: 14px 12px 12px
    }

    .cargo-head {
        display: block;
        margin-bottom: 10px
    }

    .cargo h2 {
        font-size: 14px;
        margin-bottom: 11px
    }

    .cargo-head .indices {
        font-size: 10px;
        gap: 12px
    }

    .cargo-head .indices span {
        display: flex;
        flex-direction: column
    }

    .candidatos {
        display: block
    }

    .candidatos>.candidato,
    .candidatos>.candidato:nth-child(n+4) {
        display: flex;
        border-top: 0;
        border-bottom: 1px solid #e1e5eb;
        margin: 0;
        padding: 8px 0;
        min-height: 54px
    }

    .candidatos>.candidato:last-child {
        border-bottom: 0
    }

    .avatar {
        width: 36px;
        height: 36px;
        font-size: 12px
    }

    .avatar small {
        display: none
    }

    .candidato .info {
        display: flex;
        flex-direction: column-reverse;
        gap: 3px
    }

    .nome {
        font-size: 12px
    }

    .partido {
        font-size: 9px;
        margin: 0
    }

    .resultado,
    .candidatos>.candidato:nth-child(n+4) .resultado {
        margin: 0;
        width: auto;
        flex: none
    }

    .barra {
        display: none
    }

    .numeros {
        display: block;
        text-align: right;
        font-size: 9px
    }

    .numeros strong {
        display: block;
        font-size: 11px;
        margin-bottom: 3px
    }

    .mais {
        height: 27px;
        margin-top: 7px;
        font-weight: 400
    }

    #resumo-presidente {
        display: none
    }

    #cards-legislativo {
        display: block;
        margin-top: 18px
    }

    .leg {
        min-height: 0;
        margin-bottom: 14px;
        padding: 11px 10px
    }

    .leg h2 {
        margin-bottom: 12px
    }

    .leg-candidato {
        min-height: 32px;
        padding: 5px 0
    }

    .paginacao {
        margin-top: 8px
    }
}

@media(max-width:700px) {
    .candidato {
        position: relative
    }

    .candidato .info {
        padding-right: 78px
    }

    .candidato .resultado {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%)
    }
}

.apuracao-status {
    margin: 0 0 10px;
    color: #54677a;
    font-size: 11px
}

.apuracao-status.erro {
    color: #a53725
}
.apuracao .avatar { position: relative; }
.apuracao .avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
}
.apuracao .avatar small { z-index: 1; }
