/**
 * Botones de acción en tablas de listado (estilo neutro: fondo claro, borde gris, icono línea).
 * Tamaño fijo + slots alineados entre filas (ver / editar / toggle|borrar).
 */
.list-action-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  vertical-align: middle;
}

.list-action-row > form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
}

.list-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.25rem;
  width: 2.25rem;
  min-width: 2.25rem;
  max-width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  margin: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background-color: #fff;
  color: #374151;
  line-height: 1;
  box-sizing: border-box;
  vertical-align: middle;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.list-action-btn:hover {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.22);
  color: #111827;
}

.dark .list-action-btn {
  border-color: rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.04);
  color: #d1d5db;
}

.dark .list-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f3f4f6;
}

button.list-action-btn {
  cursor: pointer;
  font: inherit;
  appearance: none;
  background-clip: padding-box;
}

a.list-action-btn {
  text-decoration: none;
}

label.list-action-btn {
  position: relative;
  cursor: pointer;
}

.list-action-btn i {
  font-size: 1.125rem;
  line-height: 1;
  width: 1.125rem;
  height: 1.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Placeholder para reservar el mismo ancho cuando falta un botón */
.list-action-slot {
  flex: 0 0 2.25rem;
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  display: inline-block;
  visibility: hidden;
  pointer-events: none;
}

/* Variante con texto (ej. “Editar” en panel ver) */
.list-action-btn--with-label {
  width: auto;
  min-width: 2.25rem;
  max-width: none;
  flex: 0 0 auto;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  gap: 0.35rem;
}

/* Panel “ver” detalle (opcional, borde neutro) */
.list-view-panel {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background-color: rgba(0, 0, 0, 0.02);
}

.dark .list-view-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.04);
}

/* Ocultar checkbox dentro del botón interruptor (si Tailwind no define sr-only) */
.list-action-btn .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;
}
