/* Custom CSS for better aesthetics */
.card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.card-header {
    border-bottom: 1px solid #e9ecef;
}
.form-control.rounded-pill {
    border-radius: 50rem !important;
    padding: 0.75rem 1.25rem;
}
.btn.rounded-pill {
    border-radius: 50rem !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
/* Custom Green Button */
.btn-success-custom {
    background-image: linear-gradient(to right, #4F6D09 0%, #4F6D09 100%); /* Green gradient */
    border: none;
    color: white;
}
.btn-success-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    color: white; /* Ensure text color remains white on hover */
    background-image: linear-gradient(to right, #4F6D09 0%, #1e7e34 100%); /* Slightly darker gradient on hover */
}
/* Custom Outline Green Button */
.btn-outline-success-custom {
    border-color: #4F6D09;
    color: #4F6D09;
    background-color: transparent;
}
.btn-outline-success-custom:hover {
    background-color: #28a745;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-info {
    border-color: #4F6D09;
    color: #4F6D09;
}
.btn-outline-info:hover {
    background-color: #4F6D09;
    color: white;
}

.btn-outline-info-download {
    border-color: #4F6D09 !important;
    color: #4F6D09 !important;
}

.btn-outline-info-download:hover {
    border-color: #4F6D09 !important;
    background-color: #4F6D09 !important;
    color: #FFF !important;
}


/* Estilos específicos para la tabla de resultados */
.table-search { /* La tabla real de resultados */
    width: 100%;
    table-layout: fixed; /* Asegura que las columnas respeten los anchos definidos */
}
.table-search th, .table-search td {
    white-space: normal; /* Permite que el texto se envuelva */
    word-wrap: break-word; /* Rompe palabras largas para evitar desbordamiento */
    overflow-wrap: break-word; /* Propiedad estándar para romper palabras */
}
/* Asignación de anchos a las columnas para una mejor distribución */
.table-search th:nth-child(1), .table-search td:nth-child(1) { width: 15%; } /* Acuerdo */
.table-search th:nth-child(2), .table-search td:nth-child(2) { width: 15%; } /* Empresa */
.table-search th:nth-child(3), .table-search td:nth-child(3) { width: 15%; } /* Expediente */
.table-search th:nth-child(4), .table-search td:nth-child(4) { width: 40%; } /* Nombre del Archivo - más espacio */
.table-search th:nth-child(5), .table-search td:nth-child(5) { width: 15%; } /* Acción - reducido */

/* Estilos para las filas de agrupación y detalle */
.expediente-summary-row {
    background-color: #e9ecef; /* Fondo ligeramente diferente para la fila de resumen */
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
}

.expediente-file-row {
    background-color: #f8f9fa; /* Fondo para las filas de archivos */
    font-weight: bold;
    border-bottom: 1px dashed #e9ecef; /* Borde punteado para separar archivos */
}
.expediente-file-row td {
    padding-left: 30px; /* Indentación para los archivos */
    text-align: left !important;
}


table thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}
table tbody tr:hover {
    background-color: #f2f2f2;
}
.table td, .table th {
    vertical-align: middle;
}
.alert.rounded-lg {
    border-radius: 0.5rem !important;
}
.alert.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}
.table-info {
    background-color: #e2f3f5 !important;
    color: #0c5460;
    font-size: 1.1em;
}
.table-info td {
    border-top: 2px solid #bce8f1 !important;
    border-bottom: 1px solid #bce8f1 !important;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
/* Select2 adjustments for rounded corners */
.select2-container--default .select2-selection--single {
    border-radius: 50rem !important;
    height: calc(2.25rem + 2px) !important; /* Adjust height to match form-control */
    padding: 0.375rem 1.25rem !important; /* Adjust padding */
    border: 1px solid #ced4da !important; /* Default Bootstrap border color */
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5 !important; /* Adjust line-height */
    padding-left: 0 !important; /* Remove default padding */
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(2.25rem + 2px) !important; /* Match height */
    top: 0 !important;
    right: 0.75rem !important; /* Adjust arrow position */
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 1.5rem !important; /* Adjust clear button position */
}
/* Style for Select2 dropdown */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4F6D09 !important; /* Bootstrap primary color for highlight */
    color: white !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 0.25rem !important; /* Standard Bootstrap input border-radius */
    border: 1px solid #ced4da !important;
}
/* Pagination styling to match Bootstrap 4.5.1 */
.pagination .page-item .page-link {
    border-radius: 50rem !important; /* Rounded pills for pagination */
    margin: 0 0.25rem; /* Spacing between items */
    color: #4F6D09; /* Bootstrap primary color */
}
.pagination .page-item.active .page-link {
    background-color: #4F6D09; /* Bootstrap primary color */
    border-color: #4F6D09;
    color: white;
}
.pagination .page-item.disabled .page-link {
    color: #6c757d; /* Bootstrap secondary color for disabled */
}