.boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--esp-2);
  max-width: 100%;
  min-height: var(--alto-control);
  padding: 0.6rem var(--esp-5);
  border-radius: var(--radio-control);
  background-color: var(--marca);
  color: var(--sobre-marca);
  font-size: var(--texto-m);
  line-height: var(--linea-m);
  font-weight: var(--peso-fuerte);
  text-align: center;
  text-decoration: none;
  box-shadow: var(--brillo-esmalte);
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform var(--mov-presion) var(--curva-salida),
    background-color var(--mov-rapido) ease,
    box-shadow var(--mov-rapido) ease;
}

.boton:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .boton:hover {
    background-color: var(--marca-fuerte);
  }
}

.boton[disabled],
.boton[aria-disabled="true"] {
  background-color: var(--fondo-hundido);
  color: var(--tinta-tenue);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.boton--secundario {
  background-color: var(--fondo-hundido);
  color: var(--tinta);
  box-shadow: none;
}

.boton--fantasma {
  background-color: transparent;
  color: var(--marca-texto);
  box-shadow: none;
}

.boton--peligro {
  background-color: var(--error);
  color: var(--sobre-error);
}

@media (hover: hover) and (pointer: fine) {
  .boton--secundario:hover {
    background-color: var(--borde);
  }

  .boton--fantasma:hover {
    background-color: var(--marca-suave);
  }

  .boton--peligro:hover {
    background-color: var(--error);
    box-shadow: var(--brillo-esmalte), var(--sombra-1);
  }
}

.boton--bloque {
  display: flex;
  width: 100%;
}

.boton--grande {
  min-height: var(--alto-control-grande);
  padding-inline: var(--esp-6);
  font-size: var(--texto-l);
}

.boton--pequeno {
  min-height: var(--alto-minimo-toque);
  padding-inline: var(--esp-4);
  font-size: var(--texto-s);
}

.boton--icono {
  width: var(--alto-control);
  padding: 0;
  border-radius: 50%;
}

.boton--icono.boton--pequeno {
  width: var(--alto-minimo-toque);
}

.boton__icono {
  flex: none;
  width: 2rem;
  height: 2rem;
}

.boton__contenido {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  transition:
    opacity var(--mov-rapido) ease,
    filter var(--mov-rapido) ease;
}

.boton__cargador {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity var(--mov-rapido) ease;
}

.boton[aria-busy="true"] {
  pointer-events: none;
}

.boton[aria-busy="true"] .boton__contenido {
  opacity: 0;
  filter: blur(0.2rem);
}

.boton[aria-busy="true"] .boton__cargador {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .boton:active {
    transform: none;
  }
}
