/* ==========================================
   GD CSV TABLE
========================================== */

.gd-csv-table-wrapper {
    width: 100%;
    margin: 20px 0;
    font-size: 14px;
}

/* ==========================================
   BUSCADOR
========================================== */

.gd-csv-search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: all .25s ease;
    margin-bottom: 15px;
}

.gd-csv-search-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,.15);
}

/* ==========================================
   TABLA
========================================== */

.gd-csv-table-scroll {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.gd-csv-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    background: #ffffff;
}

.gd-csv-table thead {
    background: #2271b1;
    color: #ffffff;
}

.gd-csv-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.gd-csv-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #eeeeee;
    vertical-align: middle;
}

.gd-csv-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.gd-csv-table tbody tr:hover {
    background: #eef6ff;
}

.gd-csv-table tbody tr:last-child td {
    border-bottom: 0;
}

/* ==========================================
   ICONO ORDENAMIENTO
========================================== */

.gd-sort-icon {
    margin-left: 8px;
    font-size: 11px;
    opacity: .7;
}

/* ==========================================
   INFORMACIÓN
========================================== */

.gd-csv-results-info {
    margin: 10px 0 15px;
    color: #6b7280;
    font-size: 13px;
}

/* ==========================================
   PAGINACIÓN
========================================== */

.gd-csv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.gd-csv-pagination button {
    border: none;
    background: #2271b1;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .25s ease;
    font-size: 14px;
    font-weight: 500;
}

.gd-csv-pagination button:hover:not(:disabled) {
    background: #135e96;
}

.gd-csv-pagination button:disabled {
    background: #cfd4d9;
    cursor: not-allowed;
}

.gd-csv-page-info {
    font-weight: 600;
    color: #374151;
}

/* ==========================================
   SCROLL PERSONALIZADO
========================================== */

.gd-csv-table-scroll::-webkit-scrollbar {
    height: 8px;
}

.gd-csv-table-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gd-csv-table-scroll::-webkit-scrollbar-thumb {
    background: #2271b1;
    border-radius: 20px;
}

.gd-csv-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #135e96;
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 768px) {

    .gd-csv-search-input {
        max-width: 100%;
    }

    .gd-csv-pagination {
        flex-direction: column;
        gap: 10px;
    }

    .gd-csv-pagination button {
        width: 100%;
    }
}

/* ==========================================
   MODO OSCURO AUTOMÁTICO
========================================== */

@media (prefers-color-scheme: dark) {

    .gd-csv-table {
        background: #1f2937;
        color: #f9fafb;
    }

    .gd-csv-table thead {
        background: #111827;
    }

    .gd-csv-table tbody td {
        border-color: #374151;
    }

    .gd-csv-table tbody tr:nth-child(even) {
        background: #243041;
    }

    .gd-csv-table tbody tr:hover {
        background: #334155;
    }

    .gd-csv-search-input {
        background: #1f2937;
        color: #ffffff;
        border-color: #374151;
    }

    .gd-csv-results-info,
    .gd-csv-page-info {
        color: #e5e7eb;
    }
}