/* Payment: the bits around the pay button — the card brands accepted and
   the error a provider sends back (the paypal controller sets the message
   and toggles is-hidden). */
.payment-error {
  background: oklch(from var(--color-red) l c h / 0.12);
  border-radius: var(--radius-m);
  color: var(--color-red);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  padding: var(--space-xs) var(--space-s);

  &.is-hidden {
    display: none;
  }
}

/* Monochrome brand marks from simpleicons.org, set inside uniform badges so
   square marks (Amex, Klarna) and wide wordmarks (Visa, Apple Pay) balance */
.payment-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  justify-content: center;
}

.payment-badge {
  align-items: center;
  background: var(--color-surface-2);
  border: var(--border-width) solid var(--color-subtle);
  border-radius: var(--radius-xs);
  display: inline-flex;
  block-size: 1.875rem;
  justify-content: center;
  padding-inline: var(--space-2xs);
}

.payment-icon {
  block-size: 1.25rem;
  inline-size: auto;
  max-inline-size: 2.6rem;
  object-fit: contain;
  opacity: 0.9;
}

[data-scheme="dark"] .payment-icon {
  filter: invert(1);
}

/* PayPal draws its own button, which cannot be disabled: while the form is
   on its way (checkout-form) it fades and lets the pointer through */
.payment-paypal.is-inactive {
  opacity: 0.45;
  pointer-events: none;
}

/* PayPal's iframe without the browser's border, rounded like its button */
.payment-paypal iframe {
  border: 0;
  border-radius: var(--radius-pill);
}
