/* style.css */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.6;
}

a {
    color: #0ea5e9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
header {
    background-color: #0f172a;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.5rem;
}

header nav a {
    color: white;
    margin-left: 1rem;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #e2e8f0;
    margin-top: 2rem;
}

/* Formulários */
form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input, select, button {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: #0ea5e9;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background-color: #0284c7;
}

.error {
    color: #dc2626;
    margin-bottom: 1rem;
}

/* Listas */
ul {
    list-style: none;
}

li {
    background: white;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Imagens */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 0.5rem;
}

/* Responsividade */
/* Page subtitle */
.page-subtitle {
    margin-bottom: 1.5rem;
    color: #475569;
}

/* State selector */
.state-selector {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.state-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #0f172a;
}

.state-selector select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
}

/* Expandable cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border-left: 4px solid #0ea5e9;
    display: block;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    list-style: none;
}

.card-header::-webkit-details-marker {
    display: none;
}

.card-header::-moz-list-bullet {
    list-style: none;
}

.card-header:hover {
    background-color: #f1f5f9;
}

.card-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #0ea5e9;
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: bold;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    display: block;
}

.card-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    margin-top: 0.15rem;
}

.card-toggle {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.card-toggle::before {
    content: '+';
    font-size: 1.3rem;
    font-weight: 700;
    color: #0ea5e9;
    line-height: 1;
}

.card[open] .card-toggle::before {
    content: '\2013';
}

.card[open] .card-toggle {
    transform: rotate(0deg);
}

.card-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.cargo-desc {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.candidatos-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid #0ea5e9;
    display: inline-block;
}

/* Candidate list */
.candidatos-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.candidato {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 3px solid #0ea5e9;
}

.candidato-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.candidato-nome {
    font-size: 0.95rem;
}

.candidato-partido {
    font-size: 0.8rem;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}

.candidato-cargo {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.4rem;
}

.candidato-proposta {
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.candidato-nota {
    font-size: 0.8rem;
    color: #94a3b8;
    font-style: italic;
}

.candidato-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #0ea5e9;
    font-weight: 600;
}

.candidato-link:hover {
    text-decoration: underline;
}

.state-placeholder {
    color: #64748b;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    header nav {
        margin-top: 1rem;
    }
    
    header nav a {
        margin: 0 1rem 0 0;
    }
    
    main {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-body {
        padding: 0 0.75rem 0.75rem;
    }
    
    .card-num {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    .candidato {
        padding: 0.6rem;
    }
}
/* --- Adicionado 2026-08-06: modelo unificado, mandatos, resumo IA --- */
.lista-politicos { list-style: none; padding: 0; }
.card-politico { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem; margin-bottom: .5rem; border: 1px solid #33415555; border-radius: .5rem; }
.card-politico img { border-radius: .375rem; flex-shrink: 0; }
.card-politico select { margin-left: auto; }
.badge { display: inline-block; font-size: .7rem; padding: .1rem .5rem; border-radius: 999px; background: #0EA5E9; color: #fff; margin-left: .4rem; }
.badge-secundario { background: #64748b; }
.lista-votacoes { list-style: none; padding: 0; }
.card-votacao { padding: .75rem; margin-bottom: .5rem; border: 1px solid #33415555; border-radius: .5rem; }
.resumo-didatico { white-space: pre-line; line-height: 1.5; }
.meta { color: #94a3b8; font-size: .85rem; }
.inline { display: inline; }

/* --- Adicionado 2026-08-07: opinar em pautas + alinhamento --- */
.badge-alinhamento { background: #16a34a; }
.opinar { margin-top: .5rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.opinar button.ativo { outline: 2px solid #0EA5E9; }
