/* =========================================================
   PÁGINA LEGISLAÇÃO
========================================================= */

.legis-page {
    padding: 2rem 0 4rem;
}

/* Controle de largura */
.legis-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
}

/* Layout vertical */
.legis-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* =========================================================
   CONTROLES
========================================================= */

.legis-controles {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* CATEGORIAS */

.legis-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* FILTROS SECUNDÁRIOS */

.legis-filtros-secundarios {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-end;
}

/* SELECT PADRÃO */

.legis-select {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.legis-select label {
    font-size: 0.85rem;
    font-weight: 600;
}

.legis-select select {
    padding: 8px 10px;
    font-size: 0.95rem;
    border: 1px solid #cfd4da;
    border-radius: 6px;
    background: #fff;
}

/* BUSCA */

.legis-busca {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 220px;
}

.legis-busca label {
    font-size: 0.85rem;
    font-weight: 600;
}

.legis-busca input {
    padding: 8px 12px;
    font-size: 0.95rem;
    border: 1px solid #cfd4da;
    border-radius: 6px;
    width: 100%;
}

.legis-btn {
    padding: 6px 14px;
    font-size: 0.95rem;
    border-radius: 20px;
    border: none;
    background: #f1f3f5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.legis-btn:hover {
    background: #e4e7ea;
}

.legis-btn.active {
    background: #dee2e6;
    font-weight: 600;
}

/* =========================================================
   TABELA
========================================================= */

.legis-tabela {
    position: relative;
    display: block;

    background: #fff;

    padding-top: 10px;
    padding-bottom: 10px;

    overflow-x: auto; /* suporte para tabelas largas */
    -webkit-overflow-scrolling: touch; /* suavidade no iOS */
}

.legis-table {
    width: 100%;
    border-collapse: collapse;
}

/* HEADER */

.legis-head {
    background: #cfd6dd;
}

.legis-head td {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid #c8cdd3;
}

/* LINHAS */

.legis-row {
    display: table-row;
}

.legis-row td {
    font-weight: 500;
    padding: 16px;
    font-size: 1.05rem;
    border-bottom: 1px solid #d9dde2;
    vertical-align: middle;
}

.legis-row:hover {
    background: #f8f9fa;
}

/* COLUNA ESQUERDA */

/* =========================================================
   SELO DE TIPO
========================================================= */

/* =========================================================
   SELO DE TIPO – Minimalista com borda
========================================================= */
/*
.legis-numero .legis-tipo {
    display: block;
    width: fit-content;
    padding: 2px 7px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    border-radius: 4rem;
    border: none;
    background: #dee2e6;
}
*/

.legis-numero .legis-tipo {
    display: block;
    width: fit-content;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;

    padding: 2px 8px;
    margin-bottom: 8px;

    border: 1px solid #cfd4da;
    border-radius: 12px;
    color: #6c757d;
}

.legis-numero a {
    font-weight: 500;
    font-size: 1.05rem;
    color: #0a58ca;
    text-decoration: none;
    padding: 0;
}

.legis-numero a:hover {
    text-decoration: underline;
}

.legis-publicacao {
    margin-top: 6px;
    font-size: 0.92rem;
    color: #6c757d;
}

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width: 767px) {

    .legis-wrapper {
        padding: 0 1.2rem;
    }

    .legis-table .legis-head {
        display: none;
    }

    .legis-layout {
        gap: 15px;
    }

    .legis-tabela {
        border-top: 1px solid #d9dde2;
        margin-top: 10px;
        padding-top: 0;
    }

    /* Estrutura vertical real */
    .legis-table,
    .legis-table tbody,
    .legis-table tr {
        display: block;
        width: 100%;
    }

    /* Esconde o header */
    .legis-head {
        display: none;
    }

    /* Cada registro */
    .legis-row {
        padding: 1rem 0;
        border-bottom: 1px solid #d9dde2;
    }

    /* Cada célula */
    .legis-row td {
        display: block;
        width: 100%;
        border: none;
        padding: 0.35rem 0;
    }

    /* Rótulo Nº da Lei */
    .legis-row td:nth-child(1)::before {
        content: "Nº da Lei";
        display: block;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 6px;
        color: #2f2f2f;
    }

    /* Rótulo Ementa */
    .legis-row td:nth-child(2)::before {
        content: "Ementa";
        display: block;
        font-weight: 600;
        font-size: 0.9rem;
        margin: 12px 0 6px 0;
        color: #2f2f2f;
    }

    .legis-categorias {
        gap: 16px;
    }
}

/* iOS input zoom fix */
@supports (-webkit-touch-callout: none) {
    input {
        font-size: 16px;
    }
}