/* Customizações para TablePress */

/* Ocultar paginação */
.dt-paging {
    display: none !important;
}

/* Container da tabela */
.dt-scroll,
.tablepress-id-16,
.tablepress-id-21 {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: #fff;
    overflow: hidden;
    margin: 20px 0;
}

/* Estilo base da tabela */
.tablepress {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    cursor: pointer;
}

/* Container do campo de busca */
.dt-layout-cell.dt-layout-end,
.dataTables_filter {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #fff !important;
}

/* Layout da tabela */
.dt-layout-row,
.dataTables_wrapper {
    width: 100% !important;
    display: block !important;
    position: relative !important;
}

.dt-layout-cell.dt-layout-start {
    display: none !important;
}

/* Campo de busca com destaque */
.dt-search,
.dataTables_filter {
    margin: 0 0 40px 0;
    width: 100%;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.dt-search label,
.dataTables_filter label {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.dt-search input,
.dataTables_filter input {
    width: 100%;
    padding: 18px 18px 18px 50px;
    font-size: 17px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
    color: #333;
    transition: all 0.3s ease;
}

.dt-search input:focus,
.dataTables_filter input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.dt-search input::placeholder,
.dataTables_filter input::placeholder {
    color: #9ca3af;
    font-size: 16px;
}

/* Cabeçalho */
.tablepress thead th {
    background-color: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
}

.tablepress thead th:first-child {
    border-right: 1px solid #e0e0e0;
}

/* Células */
.tablepress tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
    line-height: 1.5;
}

/* Primeira coluna */
.tablepress .column-1 {
    font-weight: 600;
    color: #444;
    background-color: #fafafa;
    border-right: 1px solid #e0e0e0;
}

/* Segunda coluna */
.tablepress .column-2 {
    border-left: none;
}

/* Linhas alternadas */
.tablepress tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* Última linha */
.tablepress tbody tr:last-child td {
    border-bottom: none;
}

/* Hover nas linhas */
.tablepress tbody tr:hover {
    background-color: #f8f8f8;
}

/* Links na tabela */
.tablepress a {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tablepress a:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
    color: #222;
}

/* Responsividade */
@media screen and (max-width: 768px) {
    .dt-search,
    .dataTables_filter {
        padding: 20px;
        margin-bottom: 30px;
    }

    .dt-search input,
    .dataTables_filter input {
        padding: 15px 15px 15px 40px;
        font-size: 16px;
    }

    .tablepress thead th,
    .tablepress tbody td {
        padding: 12px 15px;
    }

    .tablepress a {
        padding: 5px 10px;
        font-size: 13px;
    }
}

/* Ajustes para tabela expandida */
.dataTables_wrapper {
    position: relative !important;
    z-index: 1 !important;
}

.dataTables_filter {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #fff !important;
    margin-bottom: 20px !important;
}

.tabela-pro-expanded .dataTables_filter {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #fff !important;
    margin: 0 0 20px 0 !important;
    padding: 25px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    width: 100% !important;
}

.tabela-pro-expanded table {
    margin-top: 20px !important;
    width: 100% !important;
}

/* Modal e Tabela Expandida */
#tabelaProModal {
    position: fixed;
    align-content: center;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
}

.tabela-pro-expanded {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close-button {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #f44336;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    z-index: 1;
}

.close-button:hover {
    background: #d32f2f;
}

.modal-content {
    margin-top: 20px;
}

/* Cursor pointer na tabela */
.tablepress {
    cursor: pointer;
}

/* Ajustes para tabela no modal */
.tabela-pro-expanded .tablepress {
    width: 100% !important;
    margin: 0;
}

.tabela-pro-expanded .dataTables_filter {
    margin-bottom: 20px;
}

/* Responsividade */
@media screen and (max-width: 768px) {
    .tabela-pro-expanded {
        width: 95%;
        padding: 15px;
    }
}
