/* =========================================================
   TABELA DE MUNICÍPIOS
   ========================================================= */

/* =========================================================
   CABEÇALHO DA PÁGINA
   ========================================================= */

.municipios-header {
    margin: 20px 0;
}

.municipios-header h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.municipios-header p {
    margin: 0;
    color: #666;
}


/* =========================================================
   INFORMAÇÕES DA TABELA
   ========================================================= */

.tabela-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
}

.tabela-info strong {
    font-weight: 700;
}


/* =========================================================
   CONTAINER DA TABELA
   ========================================================= */

.tabela-container {
    width: 100%;
}

.tabela-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   TABELA
   ========================================================= */

.tabela-municipios {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #fff;
}


/* =========================================================
   CABEÇALHO DA TABELA
   ========================================================= */

.tabela-municipios thead th {
    padding: 0;
    background: #f1f3f5;
    border-bottom: 2px solid #ddd;
    text-align: left;
    white-space: nowrap;
    font-weight: 700;
    vertical-align: top;
}


/* =========================================================
   TÍTULO DA COLUNA
   ========================================================= */

.tabela-municipios .th-titulo {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-weight: 600;
}


/* =========================================================
   FILTRO DO CABEÇALHO
   ========================================================= */

.tabela-municipios .th-filtro {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 4px 6px;
}


/* =========================================================
   ESPAÇO VAZIO NAS COLUNAS SEM FILTRO
   ========================================================= */

.tabela-municipios .th-filtro-vazio {
    visibility: hidden;
}


/* =========================================================
   SELECTS
   ========================================================= */

.tabela-municipios .th-filtro select {
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.tabela-municipios .th-filtro select:focus {
    border-color: #2c5f8a;
    box-shadow: 0 0 0 2px rgba(44, 95, 138, 0.12);
}


/* =========================================================
   BUSCA DE MUNICÍPIO
   ========================================================= */

.tabela-municipios .filtro-busca {
    position: relative;
    width: 100%;
}

.tabela-municipios .filtro-busca input {
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    padding: 4px 30px 4px 28px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 13px;
    outline: none;
}

.tabela-municipios .filtro-busca input:focus {
    border-color: #2c5f8a;
    box-shadow: 0 0 0 2px rgba(44, 95, 138, 0.12);
}

.tabela-municipios .filtro-busca > i {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    pointer-events: none;
}


/* =========================================================
   BOTÃO LIMPAR BUSCA
   ========================================================= */

.tabela-municipios #limpar-busca {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #777;
    cursor: pointer;
}

.tabela-municipios #limpar-busca:hover {
    background: #f1f3f5;
    color: #333;
}


/* =========================================================
   ORDENAÇÃO
   ========================================================= */

.tabela-municipios .th-ordenacao {
    gap: 5px;
}

.tabela-municipios .btn-ordenacao {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 4px;
    color: inherit;
}

.tabela-municipios .btn-ordenacao:hover {
    color: #2c5f8a;
}


/* =========================================================
   CORPO DA TABELA
   ========================================================= */

.tabela-municipios tbody td {
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
}


/* =========================================================
   CORES ALTERNADAS
   ========================================================= */

.tabela-municipios tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.tabela-municipios tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}


/* =========================================================
   EFEITO AO PASSAR O MOUSE
   ========================================================= */

.tabela-municipios tbody tr:hover {
    background-color: #f8f9fa;
}


/* =========================================================
   MUNICÍPIO
   ========================================================= */

.tabela-municipios tbody td:first-child {
    font-weight: 600;
    white-space: nowrap;
}


/* =========================================================
   ESTADO
   ========================================================= */

.tabela-municipios tbody td:nth-child(2) {
    white-space: nowrap;
}


/* =========================================================
   VALORES NUMÉRICOS
   ========================================================= */

.tabela-municipios tbody td:nth-child(6),
.tabela-municipios tbody td:nth-child(7),
.tabela-municipios tbody td:nth-child(8) {
    text-align: right;
    white-space: nowrap;
}


/* =========================================================
   FAIXA
   ========================================================= */

.tabela-municipios tbody td:nth-child(9) {
    text-align: center;
    white-space: nowrap;
}


/* =========================================================
   CARREGAMENTO
   ========================================================= */

.tabela-loading td {
    padding: 30px 10px;
    text-align: center;
    color: #666;
}


/* =========================================================
   ERRO
   ========================================================= */

.tabela-erro {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #fff3f3;
    color: #b42318;
    text-align: center;
}


/* =========================================================
   PAGINAÇÃO
   ========================================================= */

.paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 20px 0;
}


/* =========================================================
   BOTÕES DE PAGINAÇÃO
   ========================================================= */

.pagina-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d5d9dd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.pagina-btn:hover:not(:disabled) {
    background: #f1f3f5;
    border-color: #bbb;
}

.pagina-btn.ativo {
    background: #2c5f8a;
    border-color: #2c5f8a;
    color: #fff;
    font-weight: 700;
}

.pagina-btn:disabled {
    opacity: 0.45;
    cursor: default;
}


/* =========================================================
   RETICÊNCIAS
   ========================================================= */

.paginacao-reticencias {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 38px;
    color: #777;
}


/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 768px) {

    .municipios-header h1 {
        font-size: 1.25rem;
    }

    .tabela-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tabela-municipios {
        min-width: 1000px;
    }

}

/* =========================================================
   REMOVER X NATIVO DO CAMPO DE BUSCA
   ========================================================= */

.tabela-municipios .filtro-busca input[type="search"]::-webkit-search-cancel-button,
.tabela-municipios .filtro-busca input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.tabela-municipios .filtro-busca input[type="search"] {
    -moz-appearance: textfield;
    appearance: none;
}

/* =========================================================
   INFORMAÇÃO DOS REGISTROS
   ========================================================= */

.registros-info {
    margin: 12px 0 8px;

    color: #666;

    font-size: 0.85rem;

    text-align: left;
}

#municipios-body td:nth-child(9) {
    text-align: left;
}