/* =========================================================
   Emendas Parlamentares — Frontend Styles
   ========================================================= */

.emendas-lista {
    font-family: inherit;
    width: 100%;
}

/* Filtros */
.emendas-filtros {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.emendas-filtros__campos {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.emendas-filtros__campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 150px;
    min-width: 140px;
}

.emendas-filtros__campo label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.emendas-filtros__campo select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #495057;
    cursor: pointer;
}

.emendas-filtros__campo select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.emendas-filtros__acoes {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding-bottom: 0;
}

.emendas-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
    line-height: 1.4;
}

.emendas-btn--filtrar {
    background: #2271b1;
    color: #fff;
}

.emendas-btn--filtrar:hover {
    background: #135e96;
}

.emendas-btn--limpar {
    background: #fff;
    color: #6c757d;
    border: 1px solid #ced4da;
}

.emendas-btn--limpar:hover {
    background: #f1f3f4;
    color: #495057;
}

/* Resultado info */
.emendas-resultado-info {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 12px;
}

/* Tabela */
.emendas-tabela-wrap {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.emendas-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    background: #fff;
}

.emendas-tabela thead th {
    background: #343a40;
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    /* font-weight: 600; */
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.emendas-tabela tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background 0.15s;
}

.emendas-tabela tbody tr:hover {
    background: #f8f9fa;
}

.emendas-tabela tbody tr:last-child {
    border-bottom: none;
}

.emendas-tabela tbody td {
    padding: 10px 14px;
    color: #212529;
    vertical-align: middle;
}

/* Badges */
.emenda-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: #e9ecef;
    color: #495057;
}

.emenda-badge--federal {
    background: #e9ecef;
    color: #495057;
}

.emenda-badge--estadual {
    background: #e9ecef;
    color: #495057;
}

.emenda-badge--aprovado {
    background: #e9ecef;
    color: #495057;
}

.emenda-badge--ciente {
    background: #e9ecef;
    color: #495057;
}

.emenda-badge--em-analise {
    background: #e9ecef;
    color: #495057;
}

.emenda-badge--impedido {
    background: #e9ecef;
    color: #495057;
}

/* Links */
.emendas-link-plano {
    display: inline-block;
    font-size: 11px;
    color: #2271b1;
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid #2271b1;
    border-radius: 4px;
    transition: background 0.2s;
}

.emendas-link-plano:hover {
    background: #2271b1;
    color: #fff;
}

.emendas-sem-plano {
    color: #adb5bd;
}

/* Botão Ver Detalhes */
.emendas-btn-detalhes {
    display: inline-block;
    padding: 4px 12px;
    background: #2271b1;
    color: #fff !important;
    border-radius: 4px;
    font-size: 11px;
    /* font-weight: 600; */
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.emendas-btn-detalhes:hover {
    background: #135e96;
    color: #fff;
}

/* Pagamentos no frontend */
.emendas-total-pago {
    display: block;
    font-weight: 600;
    color: #065f46;
    font-size: 11px;
}

.emendas-pagamentos-detalhes summary {
    font-size: 11px;
    color: #2271b1;
    cursor: pointer;
    margin-top: 4px;
}

.emendas-pagamentos-mini {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 11px;
}

.emendas-pagamentos-mini th {
    background: #f1f3f4;
    padding: 4px 8px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.emendas-pagamentos-mini td {
    padding: 4px 8px;
    border-bottom: 1px solid #f1f3f4;
    white-space: nowrap;
}

/* Estado vazio */
.emendas-vazio {
    text-align: center;
    padding: 48px 24px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #6c757d;
}

/* Paginação */
.emendas-paginacao {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.emendas-paginacao__item {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #2271b1;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}

.emendas-paginacao__item:hover {
    background: #f1f3f4;
}

.emendas-paginacao__item--ativo {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    cursor: default;
}

/* Responsivo */
@media (max-width: 768px) {
    .emendas-tabela thead {
        display: none;
    }

    .emendas-tabela tbody tr {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        margin-bottom: 12px;
        padding: 12px;
    }

    .emendas-tabela tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 4px;
        border-bottom: 1px solid #f1f3f4;
        font-size: 11px;
    }

    .emendas-tabela tbody td:last-child {
        border-bottom: none;
    }

    .emendas-tabela tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6c757d;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex: 0 0 40%;
    }
}