/* The credits page only. Loaded with the flag on (GT6-O-17); tokens come from styles.css. */
.credit-flow[hidden],
.credit-step[hidden] {
  display: none;
}

/* .btn sets a display of its own, which beats the browser's rule for [hidden]. */
.credit-actions .btn[hidden] {
  display: none;
}

.credit-step h2:focus {
  outline: none;
}

.credit-step > * + * {
  margin-top: 0.875rem;
}

/* The kit's .notice.is-danger: a key shown once is the one thing here that must not be missed. */
.credit-warning {
  padding: 0.75rem 0.875rem;
  border-radius: var(--r-m);
  background: var(--hover);
  background: color-mix(in oklab, var(--danger) 10%, transparent);
  color: var(--ink);
}

.panel p.credit-warning {
  color: var(--ink);
}

.credit-warning strong {
  color: var(--danger);
}

.credit-key-box {
  padding: 0.875rem;
  border-radius: var(--r-m);
  background: var(--hover);
}

.credit-key {
  display: block;
  padding: 0;
  background: none;
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
}

.credit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.page-hero .credit-actions {
  margin-top: 1.25rem;
}

.credit-packs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13.75rem, 100%), 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* The app's .group-card. */
.credit-pack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: var(--r-l);
  background: var(--panel);
  box-shadow:
    var(--shadow-1),
    inset 0 0 0 1px var(--line);
}

.credit-pack h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
}

.credit-price {
  font-size: 1.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: -0.022em;
}

.credit-pack .btn {
  margin-top: auto;
}

.credit-status {
  min-height: 1.5em;
  margin-top: 0.75rem;
}

.credit-status.is-error {
  color: var(--danger);
}

.credit-topup {
  margin-top: 1.5rem;
}

.credit-topup label {
  display: block;
  margin-bottom: 0.5rem;
}

/* The kit's .field input. */
.credit-input {
  display: block;
  width: 100%;
  max-width: 40rem;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: max(1rem, 16px);
}

.credit-topup .note {
  margin-top: 0.5rem;
}

@supports (corner-shape: squircle) {
  .credit-pack {
    corner-shape: squircle;
  }
}

@media (forced-colors: active) {
  .credit-pack,
  .credit-warning,
  .credit-key-box {
    border: 1px solid CanvasText;
  }
}
