/* Buttons: Verzenden, the follow links on the thank-you screen, and the restart link. */

.button {
  inline-size: min(100%, 20rem);
  padding: 0.85em 1em;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: max(1.2rem, var(--step-1));
  font-weight: 700;
  /* A one-word label wraps as a whole word, never in the middle. */
  overflow-wrap: normal;
  background: var(--brand);
  color: var(--on-brand);
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}

a.button {
  display: inline-block;
  text-decoration: none;
}

/* White on the brand colour does not reach 4.5:1 in every theme, so the label stays large
   text (18.66px bold) on every screen. */
.button-follow {
  inline-size: auto;
  padding-inline: 2em;
  font-size: max(1.17rem, calc(1.1 * var(--step-0)));
}

.button-secondary {
  inline-size: auto;
  padding-inline: 1.5em;
  font-size: var(--step-0);
  box-shadow: inset 0 0 0 2px var(--brand);
  background: transparent;
  color: var(--ink);
}

.button-icon {
  display: inline-grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  padding: 0;
  box-shadow: inset 0 0 0 2px var(--brand);
  background: transparent;
  color: var(--ink);
}

a.button-icon { display: inline-grid; }

.button-icon svg {
  inline-size: 1.5rem;
  block-size: 1.5rem;
}

/* The brand colour is too light for a ring on the page in some themes; the dark tone is not. */
.button:focus-visible { outline-color: var(--forest); }

.button:active {
  background: var(--brand-pressed);
  transform: scale(0.97);
}

.button[aria-busy="true"] { cursor: progress; }

.link-button {
  padding: 0;
  border: 0;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  cursor: pointer;
}

.link-button:active { opacity: 0.7; }

@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--brand-pressed); }
  .button-secondary:hover,
  .button-icon:hover { background: color-mix(in oklch, var(--brand) 14%, transparent); }
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition:
      background-color 160ms var(--ease-out),
      transform 160ms var(--ease-out);
  }
}
