
/* Contenedor responsive para la tabla */
.table-responsive-wrapper {
  width: 100%;
  margin-bottom: 1rem;
}

/* Estilos base de la tabla */
.legal-docs-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: separate;
  border-spacing: 0;
}

/* Estilos responsive */
@media screen and (max-width: 768px) {
  .legal-docs-table {
      display: block;
  }

  .legal-docs-table thead {
      display: none;
  }

  .legal-docs-table tbody {
      display: block;
  }

  .legal-docs-table tr {
      display: block;
      margin-bottom: 1rem;
      background: #fff;
      border-radius: 0.5rem;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      overflow: hidden;
  }

  .legal-docs-table td {
      display: block;
      padding: 0.75rem 1rem;
      text-align: left;
      border-bottom: 1px solid #e2e8f0;
  }

  .legal-docs-table td:last-child {
      border-bottom: none;
  }

  .legal-docs-table td::before {
      content: attr(data-label);
      display: block;
      font-weight: 600;
      color: #475569;
      margin-bottom: 0.25rem;
      font-size: 0.875rem;
  }

  /* Ajustes para los botones de acción */
  .action-buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      justify-content: flex-start;
      padding: 0.5rem 0;
  }

  .btn-action {
      flex: 1;
      min-width: 100px;
      max-width: calc(50% - 0.25rem);
  }

  /* Ajustes para la paginación en móvil */
  .legal-docs-pagination {
      justify-content: center;
      flex-wrap: wrap;
      gap: 0.25rem;
  }

  .legal-docs-pagination .page-link {
      padding: 0.375rem 0.75rem;
      font-size: 0.875rem;
  }
}

/* Mejoras visuales generales */
.legal-docs-table th,
.legal-docs-table td {
  padding: 1rem;
  vertical-align: middle;
}

.legal-docs-table thead th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

/* Estilos para las filas alternadas */
.legal-docs-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Hover en las filas */
.legal-docs-table tbody tr:hover {
  background-color: #f1f5f9;
}



/* Estilos para el buscador */



.legal-docs-search {
  max-width: 800px;
  margin: 2rem auto;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 20px;
  font-size: 16px;
  color: #333;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.search-button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: #3b82f6;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-button:hover {
  background-color: #2563eb;
}

.search-button i {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 640px) {
  .legal-docs-search {
      margin: 1rem;
  }

  .search-input {
      font-size: 14px;
      padding: 10px 45px 10px 15px;
  }

  .search-button {
      width: 35px;
      height: 35px;
  }

  .search-button i {
      font-size: 14px;
  }
}




/* Estilos para la tabla de resultados */
.legal-docs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.legal-docs-table th,
.legal-docs-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.legal-docs-table th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #1e293b;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.legal-docs-table tr:last-child td {
  border-bottom: none;
}

.legal-docs-table tbody tr:hover {
  background-color: #f1f5f9;
}

/* Estilos para la paginación */
.legal-docs-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pagination {
  display: inline-flex;
  padding: 0;
  margin: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.page-item {
  margin: 0;
  list-style: none;
  border-right: 1px solid #e5e7eb;
}

.page-item:last-child {
  border-right: none;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  height: 35px;
  padding: 0;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  background-color: transparent;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.page-link:hover {
  background-color: #f3f4f6;
  color: #2563eb;
  text-decoration: none;
}

.page-item.active .page-link {
  background-color: #2563eb;
  color: white;
  font-weight: 600;
}

.page-item.disabled .page-link {
  color: #9ca3af;
  pointer-events: none;
  background-color: #f9fafb;
}

/* Estilos para los botones de anterior/siguiente */
.page-item:first-child .page-link,
.page-item:last-child .page-link {
  padding: 0 12px;
}

/* Contenedor de botones de acción */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.5rem 0;
}

/* Estilos para los botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 150px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  gap: 0.5rem;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: #64748b;
  color: white;
}

.btn-secondary:hover {
  background-color: #475569;
}

/* Responsive */
@media (max-width: 768px) {
  .action-buttons {
      width: 100%;
  }

  .btn {
      max-width: 100%;
      font-size: 0.75rem;
      padding: 0.375rem 0.75rem;
  }
}

/* Estado de carga */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner-border {
  width: 2rem;
  height: 2rem;
  border: 0.25rem solid #e2e8f0;
  border-right-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
      transform: rotate(360deg);
  }
}

.loading-message {
  margin-top: 1rem;
  color: #64748b;
  font-size: 0.875rem;
}

/* Utilidades */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .legal-docs-table {
      font-size: 0.875rem;
  }

  .legal-docs-table th,
  .legal-docs-table td {
      padding: 0.75rem;
  }

  .pagination {
      border: none;
      background: transparent;
  }

  .page-item {
      border: 1px solid #e5e7eb;
      border-radius: 4px;
      margin: 0 2px;
  }

  .page-link {
      min-width: 32px;
      height: 32px;
      font-size: 13px;
  }

  .action-buttons {
      flex-wrap: wrap;
  }

  .btn-action {
      width: 32px;
      height: 32px;
  }

  .btn-action i {
      font-size: 14px;
  }
}