/* CidadeIA Legis - Frontend */
.cidadeia-legis-lista {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 0;
}

/* Busca e filtros */
.legis-busca-form {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}
.legis-busca-linha {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.legis-input-busca {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}
.legis-filtros {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.legis-filtros select {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}
.legis-btn {
    padding: 10px 18px;
    background: #1e40af;
    color: white !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-block;
}
.legis-btn:hover { background: #1e3a8a; }
.legis-btn-clear {
    padding: 8px 14px;
    background: white;
    color: #dc2626 !important;
    border: 1px solid #dc2626;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Chips */
.legis-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}
.legis-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 8px 14px;
    text-decoration: none;
    color: #1f2937 !important;
    font-size: 0.95rem;
    transition: all 0.15s;
}
.legis-chip:hover {
    background: #1e40af;
    color: white !important;
    border-color: #1e40af;
}
.legis-chip-count {
    background: #1e40af;
    color: white;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.legis-chip:hover .legis-chip-count {
    background: white;
    color: #1e40af;
}

/* Contador */
.legis-contador {
    color: #6b7280;
    margin-bottom: 12px;
}

/* Tabela */
.legis-tabela {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.legis-tabela th {
    background: #1e3a8a;
    color: white;
    padding: 12px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
}
.legis-tabela td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}
.legis-tabela tbody tr:hover {
    background: #f3f4f6;
}

/* Badges */
.legis-tipo-badge {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}
.legis-status-badge {
    display: inline-block;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Linhas da tabela */
.legis-td-num { font-family: monospace; font-size: 1rem; }
.legis-td-ano { font-weight: 600; color: #1e40af; }
.legis-titulo-link {
    color: #1e40af !important;
    text-decoration: none;
    font-weight: 500;
}
.legis-titulo-link:hover { text-decoration: underline; }
.legis-ementa-preview {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 4px;
    line-height: 1.4;
}

/* Botão PDF */
.legis-btn-pdf {
    display: inline-block;
    background: #dc2626;
    color: white !important;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}
.legis-btn-pdf:hover { background: #b91c1c; }

.legis-btn-pdf-grande {
    display: inline-block;
    background: #dc2626;
    color: white !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
}

/* Paginação */
.legis-paginacao {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}
.legis-pag-link {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #1e40af !important;
    text-decoration: none;
    background: white;
}
.legis-pag-link:hover {
    background: #eff6ff;
}
.legis-pag-link.legis-pag-atual {
    background: #1e40af;
    color: white !important;
    border-color: #1e40af;
    font-weight: 600;
}

/* Vazio */
.legis-vazio {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}
.legis-vazio p { font-size: 1.1rem; }

/* Single */
.cidadeia-legis-single {
    max-width: 800px;
    margin: 0 auto;
}
.legis-single-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.legis-single-meta {
    width: 100%;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
}
.legis-single-meta th, .legis-single-meta td {
    padding: 10px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
.legis-single-meta th {
    width: 35%;
    color: #6b7280;
    font-weight: 500;
}
.legis-single-meta tr:last-child th,
.legis-single-meta tr:last-child td {
    border-bottom: none;
}
.legis-single-ementa, .legis-single-conteudo, .legis-single-pdf {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}
.legis-single-ementa h3, .legis-single-conteudo h3, .legis-single-pdf h3 {
    color: #1e3a8a;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .legis-busca-linha { flex-direction: column; }
    .legis-tabela {
        font-size: 0.85rem;
    }
    .legis-tabela th, .legis-tabela td {
        padding: 8px 6px;
    }
    .legis-td-tipo, .legis-td-ano {
        display: none; /* esconde colunas menos críticas no mobile */
    }
    .legis-single-meta th { width: auto; }
}
