/*
 * CRIDEZ - Estilos DataTables Personalizados
 * Corporación de Abogados S.A.C.
 * Archivo: components/datatables-cridez.css
 * Versión: 1.0
 * Fecha: 13 de septiembre de 2025
 * Descripción: Estilos personalizados para DataTables con colores corporativos CRIDEZ
 */

/* ===== PAGINADO DATATABLES - SOLO CAMBIO DE COLORES ===== */
/* Respetar estilos originales de DataTables, solo cambiar colores */

/* Botón activo - Solo cambiar color a corporativo CRIDEZ */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:active {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
    color: #fff !important;
}

/* Cambiar color de texto de botones Previous/Next/Siguiente a color corporativo */
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.current) {
    color: #f39c12 !important;
}

/* Hover en botones de navegación */
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):hover {
    color: #e67e22 !important; /* Un tono más oscuro para hover */
}

/* Estados focus y active - cambiar borde celeste por corporativo */
.dataTables_wrapper .dataTables_paginate .paginate_button:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button:active,
.dataTables_wrapper .dataTables_paginate .paginate_button:focus:not(.disabled),
.dataTables_wrapper .dataTables_paginate .paginate_button:active:not(.disabled) {
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(243, 156, 18, 0.25) !important;
    border-color: #f39c12 !important;
}

/* Para compatibilidad con paginación Bootstrap */
.dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link:hover,
.dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link:focus {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
    color: #fff !important;
}

/* Color de texto para enlaces de paginación Bootstrap */
.dataTables_wrapper .dataTables_paginate .pagination .page-link {
    color: #393939 !important;/*#f39c12 !important;*/
}

.dataTables_wrapper .dataTables_paginate .pagination .page-link:hover {
    color: #e67e22 !important;
}

/* Estados focus y active para paginación Bootstrap */
.dataTables_wrapper .dataTables_paginate .pagination .page-link:focus,
.dataTables_wrapper .dataTables_paginate .pagination .page-link:active {
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(243, 156, 18, 0.25) !important;
    border-color: #f39c12 !important;
    color: #f39c12 !important;
}

/* Para diferentes versiones de DataTables */
table.dataTable tbody tr.selected,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #f39c12 !important;
}

/* Asegurar que el color se aplique en todos los estados del botón activo */
.paginate_button.current {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
    color: #fff !important;
}

/* Para cualquier tema de DataTables */
.dataTables_paginate .paginate_button.current {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
    color: #fff !important;
}

/* Color de texto para botones de navegación */
.dataTables_paginate .paginate_button:not(.current) {
    color: #f39c12 !important;
}

/* Botones deshabilitados (Previous cuando está en página 1, Next cuando está en última página) */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:focus {
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled a {
    color: #6c757d !important;
    cursor: not-allowed !important;
}

/* ===== INFORMACIÓN DEL PAGINADO ===== */
.dataTables_wrapper .dataTables_info {
    color: #6c757d;
    font-size: 0.875rem;
    padding-top: 0.75rem;
}

/* ===== SELECTOR DE REGISTROS POR PÁGINA ===== */
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-image: none;
    transition: border-color 0.2s ease;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: #f39c12;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(243, 156, 18, 0.25);
}

/* ===== BÚSQUEDA DATATABLES ===== */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    transition: border-color 0.2s ease;
    margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #f39c12;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(243, 156, 18, 0.25);
}

/* ===== ENCABEZADOS DE TABLA ===== */
.dataTables_wrapper table.dataTable thead th {
    border-bottom: 2px solid #f39c12;
}

/* Flechas de ordenamiento */
.dataTables_wrapper table.dataTable thead .sorting:before,
.dataTables_wrapper table.dataTable thead .sorting_asc:before,
.dataTables_wrapper table.dataTable thead .sorting_desc:before,
.dataTables_wrapper table.dataTable thead .sorting:after,
.dataTables_wrapper table.dataTable thead .sorting_asc:after,
.dataTables_wrapper table.dataTable thead .sorting_desc:after {
    color: #f39c12;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.25rem 0.5rem;
        margin-left: 1px;
        font-size: 0.875rem;
    }
    
    .dataTables_wrapper .dataTables_info {
        font-size: 0.75rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
    }
}

/* ===== COMPATIBILIDAD CON BOOTSTRAP ===== */
.dataTables_wrapper .row {
    margin-right: 0;
    margin-left: 0;
}

.dataTables_wrapper .col-sm-12,
.dataTables_wrapper .col-md-6 {
    padding-right: 0;
    padding-left: 0;
}

/* ===== ESTADOS DE FILAS ===== */
.dataTables_wrapper table.dataTable tbody tr:hover {
    background-color: rgba(243, 156, 18, 0.05);
}

.dataTables_wrapper table.dataTable tbody tr.selected {
    background-color: rgba(243, 156, 18, 0.1);
}

/* ===== LOADING STATE ===== */
.dataTables_wrapper .dataTables_processing {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid #f39c12;
    color: #f39c12;
    font-weight: bold;
}

/* ===== TABLA SIN DATOS ===== */
.dataTables_wrapper table.dataTable tbody .dataTables_empty {
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* ===== SCROLL PERSONALIZADO PARA TABLAS RESPONSIVAS ===== */
.dataTables_wrapper .dataTables_scroll {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.dataTables_wrapper .dataTables_scrollBody {
    border-top: 1px solid #f39c12;
}

/* ===== INTEGRACIÓN CON ADMINLTE ===== */
.content-wrapper .dataTables_wrapper {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Compatibilidad con cards de AdminLTE */
.card .dataTables_wrapper {
    padding: 0;
}

/* Eliminar margen superior extra que separa del navbar */
.content-wrapper .content {
    padding-top: 0 !important;
}

.content-wrapper {
    padding-top: 0 !important;
}

.card {
    margin-top: 0 !important;
}