/**
 * DataTables 1.10.x: misma apariencia que vendor.pagination.bootstrap-5-es (Laravel).
 * Texto “Mostrando … resultados” lo define public/js/datatables-defaults-es.js;
 * aquí solo maquetación y estilo de .paginate_button (no usa ul.pagination).
 */

/* Pie de tabla DataTables: texto tipo small muted + controles alineados como Laravel */
.dataTables_wrapper .dataTables_info {
  padding-top: 0.5rem;
  font-size: 0.875rem;
  color: #6c757d;
  float: none !important;
  text-align: center;
}

.dataTables_wrapper .dataTables_paginate {
  float: none !important;
  text-align: center;
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .dataTables_wrapper .dataTables_info {
    text-align: left;
  }

  .dataTables_wrapper .dataTables_paginate {
    text-align: right;
    margin-top: 0;
  }
}

/* Fila Bootstrap típica (i + p): sin márgenes raros */
.dataTables_wrapper > .row {
  --bs-gutter-x: 0;
  align-items: center;
}

/* Botones de página: aspecto Bootstrap 5 pagination-sm */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  box-sizing: border-box !important;
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  min-width: 2.125rem;
  padding: 0.25rem 0.5rem !important;
  margin: 0 !important;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
  color: #0d6efd !important;
  text-decoration: none !important;
  background: #fff !important;
  background-image: none !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 0.25rem !important;
  cursor: pointer;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  color: #0a58ca !important;
  background: #e9ecef !important;
  border-color: #dee2e6 !important;
}

/* Página activa (mismo azul corporativo que cabeceras GRT / notas) */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  color: #fff !important;
  background: #000269 !important;
  background-image: none !important;
  border-color: #000269 !important;
  cursor: default !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
  color: #6c757d !important;
  background: #fff !important;
  background-image: none !important;
  border-color: #dee2e6 !important;
  cursor: default !important;
  opacity: 0.65;
}

/* Agrupación: previous | números | next — una sola fila con hueco pequeño */
.dataTables_wrapper .dataTables_paginate.paging_simple_numbers,
.dataTables_wrapper .dataTables_paginate.paging_full_numbers,
.dataTables_wrapper .dataTables_paginate.paging_simple,
.dataTables_wrapper .dataTables_paginate.paging_full {
  display: inline-flex !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  max-width: 100%;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers > span,
.dataTables_wrapper .dataTables_paginate.paging_full_numbers > span {
  display: inline-flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .dataTables_wrapper .dataTables_paginate.paging_simple_numbers,
  .dataTables_wrapper .dataTables_paginate.paging_full_numbers,
  .dataTables_wrapper .dataTables_paginate.paging_simple,
  .dataTables_wrapper .dataTables_paginate.paging_full {
    justify-content: flex-end;
  }
}

/* Scroll horizontal si hay muchas páginas (misma idea que app-laravel-pagination-scroll) */
.dataTables_wrapper .dataTables_paginate {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.dataTables_wrapper .dataTables_paginate.paging_simple_numbers,
.dataTables_wrapper .dataTables_paginate.paging_full_numbers {
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
}

/* Integración DataTables + Bootstrap 5 (nav ul.pagination): mismo activo que Laravel */
.dataTables_wrapper .dataTables_paginate ul.pagination {
  margin-bottom: 0;
  flex-wrap: nowrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .dataTables_wrapper .dataTables_paginate ul.pagination {
    justify-content: flex-end;
  }
}

.dataTables_wrapper .dataTables_paginate ul.pagination .page-link {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
}

.dataTables_wrapper .dataTables_paginate ul.pagination .page-item.active .page-link {
  background-color: #000269;
  border-color: #000269;
  color: #fff;
}

.dataTables_wrapper .dataTables_paginate ul.pagination .page-item.active .page-link:hover {
  background-color: #000269;
  border-color: #000269;
  color: #fff;
}
