/* ── COMUNIDADE.CSS — Estilos específicos da página da comunidade e votação de bairros ── */

body {
    background-color: #ffbd59;
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    color: #0f0741;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    background-color: #0f0741;
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
    margin-bottom: 24px;
}

.back-btn:hover {
    opacity: 0.9;
}

.header-top {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.header-top h1 {
    font-family: 'League Spartan', sans-serif;
    color: white;
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
}

.header-top p {
    color: #0f0741;
    font-weight: 700;
    font-size: 0.92rem;
    margin: 0;
}

/* ── CARDS ── */
.secao-card {
    background: #ffffff;
    border: 2px solid #0f0741;
    border-radius: 24px;
    padding: 24px 28px;
    box-sizing: border-box;
    box-shadow: 4px 4px 0 #0f0741;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f0741;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid rgba(15, 7, 65, 0.1);
    padding-bottom: 12px;
}

.card-titulo svg {
    flex-shrink: 0;
    opacity: 0.85;
}

/* ── FORMULÁRIO ── */
.form-voto {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row-voto {
    display: flex;
    gap: 12px;
}

.input-voto {
    border: 2px solid #0f0741;
    border-radius: 20px;
    padding: 10px 16px;
    background-color: #fbf6e5;
    outline: none;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f0741;
    flex: 1;
    transition: box-shadow 0.15s;
}

.input-voto:focus {
    box-shadow: 3px 3px 0 #ffbd59;
}

.status-meu-voto {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f0741;
    background: #fbf6e5;
    border-left: 3px solid #0f0741;
    padding: 8px 14px;
    border-radius: 8px;
}

.btn-votar {
    background-color: #0f0741;
    color: #ffbd59;
    border: 2px solid #0f0741;
    padding: 12px 28px;
    border-radius: 20px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    transition: transform 0.15s, box-shadow 0.15s;
    align-self: flex-start;
    box-shadow: 3px 3px 0 #0f074133;
}

.btn-votar:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #0f074133;
}

.btn-votar:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #0f074133;
}

/* ── RANKING ── */
.ranking-lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ranking-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.ranking-posicao {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-numero {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0f0741;
    color: #ffbd59;
    font-size: 0.72rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ranking-numero.top1 { background: #0f0741; color: #ffbd59; }
.ranking-numero.top2 { background: #3d3563; color: #ffffff; }
.ranking-numero.top3 { background: #6b5fa0; color: #ffffff; }

.ranking-votos {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.7;
}

.ranking-barra-bg {
    background-color: rgba(15, 7, 65, 0.08);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
}

.ranking-barra-fill {
    background: linear-gradient(90deg, #0f0741, #3d3563);
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ranking-vazio {
    color: #999;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 12px 0;
}

@media (max-width: 768px) {
    .back-btn { margin-left: 60px; }
    .form-row-voto { flex-direction: column; }
    .btn-votar { width: 100%; text-align: center; }
}

/* ── AUTOCOMPLETE DE CIDADE ── */
.cidade-autocomplete-dropdown {
    position: absolute;
    z-index: 9999;
    background: #ffffff;
    border: 2px solid #0f0741;
    border-radius: 14px;
    box-shadow: 4px 4px 0 #0f0741;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    overflow: hidden;
    max-height: 240px;
    overflow-y: auto;
}

.cidade-autocomplete-dropdown:empty {
    display: none;
}

.cidade-sugestao {
    padding: 9px 16px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f0741;
    transition: background 0.12s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cidade-sugestao:hover {
    background-color: #ffbd59;
}

.cidade-uf {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.6;
}

