.upd-form {
  --upd-accent: #0b6e4f;
  --upd-accent-text: #ffffff;
  --upd-border: #d9dee3;
  --upd-radius: 10px;
  --upd-bg: #ffffff;
  --upd-text: inherit;
  box-sizing: border-box;
  max-width: 520px;
  padding: 24px;
  border: 1px solid var(--upd-border);
  border-radius: var(--upd-radius);
  background: var(--upd-bg);
  color: var(--upd-text);
  font: inherit;
}
.upd-form *,
.upd-form *::before,
.upd-form *::after {
  box-sizing: border-box;
}
.upd-form--notice {
  border-color: #d63638;
  background: #fcf0f1;
}

.upd-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fcf0f1;
  color: #8a1f22;
}

.upd-frequency {
  display: flex;
  margin: 0 0 18px;
  border: 1px solid var(--upd-border);
  border-radius: 999px;
  padding: 3px;
}
.upd-toggle {
  flex: 1;
  margin: 0;
  cursor: pointer;
}
.upd-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.upd-toggle span {
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  text-align: center;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.upd-toggle input:checked + span {
  background: var(--upd-accent);
  color: var(--upd-accent-text);
}
.upd-toggle input:focus-visible + span {
  outline: 2px solid var(--upd-accent);
  outline-offset: 2px;
}

.upd-amounts {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.upd-amounts legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 600;
}
.upd-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.upd-preset {
  margin: 0;
  cursor: pointer;
}
.upd-preset input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.upd-preset span {
  display: block;
  padding: 12px 8px;
  border: 1px solid var(--upd-border);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.upd-preset input:checked + span {
  border-color: var(--upd-accent);
  background: var(--upd-accent);
  color: var(--upd-accent-text);
}
.upd-preset input:focus-visible + span {
  outline: 2px solid var(--upd-accent);
  outline-offset: 2px;
}

.upd-custom {
  display: block;
  margin: 0;
}
.upd-custom__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9em;
}
.upd-custom__field {
  display: flex;
  align-items: center;
  border: 1px solid var(--upd-border);
  border-radius: 8px;
  overflow: hidden;
}
.upd-custom__field:focus-within {
  border-color: var(--upd-accent);
  box-shadow: 0 0 0 2px rgba(11, 110, 79, 0.15);
}
.upd-custom__adorn {
  padding: 0 12px;
  color: #6b7280;
  white-space: nowrap;
}
.upd-custom__field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.1em;
  outline: none;
}
.upd-hint {
  margin: 6px 0 0;
  font-size: 0.85em;
  color: #6b7280;
}

.upd-funds {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.upd-funds legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 600;
}
.upd-funds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.upd-fund-option {
  margin: 0;
  cursor: pointer;
}
.upd-fund-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.upd-fund-option span {
  display: block;
  padding: 12px 10px;
  border: 1px solid var(--upd-border);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.upd-fund-option input:checked + span {
  border-color: var(--upd-accent);
  background: var(--upd-accent);
  color: var(--upd-accent-text);
}
.upd-fund-option input:focus-visible + span {
  outline: 2px solid var(--upd-accent);
  outline-offset: 2px;
}
.upd-fund-desc {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 0.95em;
}
.upd-fund-desc strong {
  display: block;
  margin-bottom: 4px;
}
.upd-fund-desc p {
  margin: 0;
}

.upd-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  font-size: 0.9em;
  cursor: pointer;
}
.upd-consent input {
  margin: 4px 0 0;
  flex: none;
}

.upd-fund {
  display: block;
  margin: 0 0 18px;
}
.upd-fund > span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
.upd-fund select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--upd-border);
  border-radius: 8px;
  background: var(--upd-bg);
  font: inherit;
}

.upd-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.upd-field {
  display: block;
  margin: 0;
}
.upd-field > span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
.upd-field input {
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--upd-border);
  border-radius: 8px;
  background: var(--upd-bg);
  font: inherit;
}
.upd-field input:focus {
  outline: none;
  border-color: var(--upd-accent);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}
@media (max-width: 560px) {
  .upd-details {
    grid-template-columns: 1fr;
  }
}

.upd-embedded {
  margin-top: 8px;
}
.upd-embedded__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  font-weight: 600;
}
.upd-embedded__change {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--upd-border);
  border-radius: 999px;
  background: var(--upd-bg);
  color: inherit;
  font: inherit;
  font-size: 0.85em;
  cursor: pointer;
}
.upd-embedded__status {
  margin: 0 0 12px;
  font-weight: 600;
}
.upd-embedded__mount {
  min-height: 60px;
}
/* The SDK caps its own form at 560px. Inside the donation form it fills the same width as the
   steps and the summary above it; the SDK's layout, fields and colours stay as they are. */
.upd-embedded__mount .ummah-sdk-container {
  max-width: none;
}
/* Theme shield for the SDK's buttons. A theme that styles every <button> (an Elementor kit:
   ".elementor-kit-N button { background-color; color; border; font-size … }") outranks the SDK's
   single-class rules and repaints its buttons. The rules below repeat the SDK's own declarations
   (web SDK 0.7.1, styles.css) with the SDK's own variables and values, one class higher, so the
   buttons look exactly as the SDK draws them on a page without such a theme. Nothing here restyles
   the SDK: without a theme override the page renders the same with or without this block. Keep in
   step with the SDK's button rules on an SDK update. */
.upd-embedded__mount .ummah-sdk-button {
  color: var(--ummah-button-color);
  background: var(--ummah-button-background);
  border: 0;
  border-radius: var(--ummah-button-radius);
  box-shadow: var(--ummah-button-shadow);
  padding: 12px 18px;
  min-height: var(--ummah-button-height);
  font-family: inherit;
  font-size: var(--ummah-button-font-size);
  font-weight: 600;
  font-style: normal;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-shadow: none;
}
.upd-embedded__mount .ummah-sdk-button:hover:not(:disabled) {
  color: var(--ummah-button-color);
  background: var(--ummah-button-background);
  filter: brightness(0.96);
}
.upd-embedded__mount .ummah-sdk-button:disabled {
  box-shadow: none;
}
.upd-embedded__mount .ummah-sdk-swish-button {
  color: #4d4d4f;
  background: #fff;
  border: 1px solid var(--ummah-border);
  border-radius: var(--ummah-control-radius);
  box-shadow: none;
  padding: 0 16px;
  height: var(--ummah-wallet-height);
  font-family: inherit;
  line-height: normal;
  text-shadow: none;
}
.upd-embedded__mount .ummah-sdk-swish-button--black {
  color: #fff;
  background: #000;
  border-color: #000;
}
/* With a line of text (SDK 0.7.1) the Swish button reads from the left like the other payment rows. */
.upd-embedded__mount .ummah-sdk-swish--text .ummah-sdk-swish-button {
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
  text-align: left;
}
.upd-embedded__mount .ummah-sdk-swish--text .ummah-sdk-swish-button__text {
  flex: 1 1 auto;
}
.upd-embedded__mount .ummah-sdk-swish-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--ummah-ink) 28%, var(--ummah-border));
  box-shadow: 0 1px 3px rgb(60 64 67 / 0.2);
}
.upd-embedded__mount .ummah-sdk-swish-button--black:hover:not(:disabled) {
  background: #3c4043;
  border-color: #3c4043;
}
.upd-embedded__mount .ummah-sdk-swish-button:focus-visible {
  outline: none;
  border-color: var(--ummah-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ummah-accent) 18%, transparent);
}
.upd-embedded__mount .ummah-sdk-handoff {
  color: var(--ummah-ink);
  background: var(--ummah-surface);
  border: 1px solid var(--ummah-border);
  border-radius: var(--ummah-control-radius);
  box-shadow: none;
  padding: 8px 14px;
  font-family: inherit;
  line-height: normal;
  text-align: left;
  text-transform: none;
  text-shadow: none;
}
.upd-embedded__mount .ummah-sdk-handoff:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--ummah-ink) 28%, var(--ummah-border));
}
.upd-embedded__mount .ummah-sdk-handoff:focus-visible {
  outline: none;
  border-color: var(--ummah-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ummah-accent) 18%, transparent);
}
.upd-embedded__error {
  margin-top: 16px;
}

.upd-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.upd-submit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--upd-accent);
  color: var(--upd-accent-text);
  font: inherit;
  font-size: 1.05em;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.upd-submit:hover,
.upd-submit:focus-visible {
  filter: brightness(0.92);
  color: var(--upd-accent-text);
}
.upd-submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.upd-secure {
  margin: 12px 0 0;
  font-size: 0.85em;
  color: #6b7280;
  text-align: center;
}

/* The card sits in the middle of its column whatever the column's width, every line in it centred. */
.upd-thanks {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.upd-thanks h2,
.upd-thanks p {
  text-align: center;
}
.upd-thanks__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--upd-accent);
  color: var(--upd-accent-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 56px;
}
.upd-thanks__icon--fail {
  background: #d63638;
}
.upd-thanks__icon--spin {
  background: transparent;
  border: 4px solid var(--upd-border);
  border-top-color: var(--upd-accent);
  animation: upd-spin 0.9s linear infinite;
}
@keyframes upd-spin {
  to {
    transform: rotate(360deg);
  }
}
.upd-thanks__title {
  margin: 0 0 8px;
  font-size: 1.5em;
}
.upd-thanks__line {
  margin: 0 0 8px;
  font-size: 1.05em;
}
.upd-thanks__sub {
  margin: 0;
  color: #6b7280;
}
.upd-submit--link {
  display: inline-block;
  width: auto;
  margin-top: 12px;
}

.upd-button-form {
  --upd-accent: #0b6e4f;
  --upd-accent-text: #ffffff;
  display: inline-block;
  margin: 0;
}
.upd-submit--inline {
  display: inline-block;
  width: auto;
  padding: 12px 22px;
}
.upd-button-form.upd-form--steps .upd-submit {
  border-radius: 0;
}

/* ── "Steps" style: numbered sections, square corners, joined option cells ── */
.upd-form--steps {
  max-width: 760px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  --upd-radius: 0;
  --upd-panel: #f7f7f7;
  --upd-cell-border: #d9d9d9;
  --upd-input-bg: #eef4f9;
  --upd-input-border: #cfd8e0;
}
.upd-form--steps .upd-step {
  margin: 0 0 24px;
  padding: 28px 32px;
  background: var(--upd-panel);
}
.upd-form--steps .upd-step--pay {
  background: transparent;
  padding: 0;
}
.upd-step__title {
  margin: 0 0 16px;
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.2;
}
.upd-step__question {
  margin: 0 0 18px;
  font-size: 1.15em;
  font-weight: 700;
}
.upd-form--steps legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.upd-form--steps .upd-funds-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.upd-form--steps .upd-fund-option span,
.upd-form--steps .upd-preset span,
.upd-form--steps .upd-toggle span {
  margin: -1px 0 0 -1px;
  border: 1px solid var(--upd-cell-border);
  border-radius: 0;
  background: #fff;
  color: var(--upd-accent);
  font-weight: 700;
}
.upd-form--steps .upd-fund-option span {
  padding: 24px 8px;
}
.upd-form--steps .upd-fund-option input:checked + span,
.upd-form--steps .upd-preset input:checked + span,
.upd-form--steps .upd-toggle input:checked + span {
  position: relative;
  z-index: 1;
  border-color: var(--upd-accent);
  background: var(--upd-accent);
  color: var(--upd-accent-text);
}
.upd-form--steps .upd-fund-desc {
  margin-top: 24px;
  padding: 0;
  background: transparent;
  font-size: 1em;
}
.upd-form--steps .upd-fund-desc strong {
  margin-bottom: 8px;
  font-size: 1.15em;
}
.upd-form--steps .upd-frequency {
  display: flex;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
}
.upd-form--steps .upd-toggle span {
  padding: 18px 12px;
}
.upd-form--steps .upd-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 16px;
}
.upd-form--steps .upd-preset {
  flex: 1 1 110px;
}
.upd-form--steps .upd-preset span {
  padding: 22px 8px;
}
.upd-form--steps .upd-custom__label {
  font-weight: 600;
}
.upd-form--steps .upd-custom__field {
  border-radius: 0;
  border-color: var(--upd-input-border);
  background: var(--upd-input-bg);
}
.upd-form--steps .upd-custom__field input {
  padding: 16px 12px;
}
.upd-form--steps .upd-field input {
  padding: 16px 12px;
  border-radius: 0;
  border-color: var(--upd-input-border);
  background: var(--upd-input-bg);
}
.upd-form--steps .upd-embedded__summary,
.upd-form--steps .upd-embedded__change {
  border-radius: 0;
}
.upd-form--steps .upd-embedded__summary {
  background: var(--upd-panel);
}
.upd-form--steps .upd-consent {
  margin: 0 0 20px;
  font-size: 1em;
}
.upd-form--steps .upd-submit {
  padding: 22px 18px;
  border-radius: 0;
  font-size: 1.15em;
}
.upd-form--steps .upd-submit[disabled] {
  background: #b3b3b3;
  opacity: 1;
  cursor: not-allowed;
}
.upd-form--steps .upd-secure {
  text-align: left;
}
.upd-form--steps.upd-thanks {
  padding: 32px;
  background: var(--upd-panel);
  text-align: center;
}
.upd-form--steps .upd-thanks__icon {
  border-radius: 50%;
}
@media (max-width: 560px) {
  .upd-form--steps .upd-step {
    padding: 20px 16px;
  }
  .upd-form--steps .upd-funds-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.upd-field--wide { grid-column: 1 / -1; }

/* Gift cards */
.upd-gift-themes { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.upd-gift-themes legend { font-weight: 600; margin-bottom: 8px; grid-column: 1 / -1; }
.upd-gift-theme { position: relative; cursor: pointer; }
.upd-gift-theme input { position: absolute; opacity: 0; width: 0; height: 0; }
.upd-gift-theme__card { display: block; border: 2px solid #d1d5db; border-radius: 8px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.upd-gift-theme__card img, .upd-gift-theme__blank { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: linear-gradient(135deg, var(--upd-accent, #0b6e4f) 0%, #e5e7eb 100%); }
.upd-gift-theme__title { display: block; padding: 8px 10px; font-size: 14px; text-align: center; }
.upd-gift-theme input:checked + .upd-gift-theme__card { border-color: var(--upd-accent, #0b6e4f); box-shadow: 0 0 0 3px color-mix(in srgb, var(--upd-accent, #0b6e4f) 25%, transparent); }
.upd-gift-theme input:focus-visible + .upd-gift-theme__card { outline: 2px solid var(--upd-accent, #0b6e4f); outline-offset: 2px; }
.upd-field textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; }
.upd-check { display: flex; gap: 10px; align-items: center; }
.upd-check input { width: auto; }
.upd-form--steps .upd-gift-theme__card, .upd-form--steps .upd-field textarea { border-radius: 0; }

/* Monthly gift self-service */
.upd-manage .upd-alert { margin-bottom: 14px; }
.upd-manage__form { margin-bottom: 8px; }
.upd-manage__sub { border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; margin: 0 0 16px; background: #fff; }
.upd-form--steps .upd-manage__sub { border-radius: 0; }
.upd-manage__headline { font-size: 18px; margin: 0 0 6px; }
.upd-manage__headline strong { font-size: 22px; }
.upd-manage__status { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #e4f7e9; color: #0f5b29; vertical-align: middle; }
.upd-manage__status--paused { background: #fff6dc; color: #6b4c00; }
.upd-manage__status--past_due, .upd-manage__status--needs_action { background: #fbe9e7; color: #8a1c0f; }
.upd-amounts--manage { margin-bottom: 10px; }
.upd-submit--secondary { width: auto; padding: 10px 18px; font-size: 15px; }
.upd-manage__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e5e7eb; align-items: center; }
.upd-manage__actions form { margin: 0; display: flex; gap: 10px; align-items: center; }
.upd-link-button { background: none; border: 0; padding: 0; color: var(--upd-accent, #0b6e4f); text-decoration: underline; cursor: pointer; font: inherit; }
.upd-link-button--danger { color: #b91c1c; }

/* The hidden attribute must win over the display rules above (preset groups, fields, hints, embedded box). */
[class*="upd-"][hidden],
.upd-form [hidden] {
  display: none !important;
}

/* While the issuer's 3-D Secure challenge is shown, the card area takes the full width of the form
   and a tall, bounded height; the script sizes the frame itself (see embedded.js watchChallenge). */
.upd-embedded--challenge .upd-embedded__mount {
  min-height: 560px;
}
.upd-embedded--challenge .upd-embedded__mount iframe {
  max-width: 100%;
}

/* Buttons: the form's own rules outrank a theme's generic button styling (e.g. an Elementor kit's
   `.elementor-kit-N button`), so the donate, update and secondary buttons look the same on every site. */
.upd-form .upd-submit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--upd-accent);
  color: var(--upd-accent-text);
  font: inherit;
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.upd-form .upd-submit--inline {
  display: inline-block;
  width: auto;
  min-width: 200px;
  padding: 12px 22px;
  font-size: 1em;
}
.upd-form .upd-button {
  display: inline-block;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--upd-accent);
  border-radius: 8px;
  background: #fff;
  color: var(--upd-accent);
  font: inherit;
  font-size: 0.95em;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.upd-form .upd-button:hover,
.upd-form .upd-button:focus-visible {
  filter: brightness(0.96);
  color: var(--upd-accent);
}
.upd-form .upd-button--danger {
  border-color: #b91c1c;
  color: #b91c1c;
}
.upd-form--steps .upd-submit,
.upd-form--steps .upd-button {
  border-radius: 0;
}
.upd-presets--manage {
  margin-bottom: 12px;
}
.upd-custom--manage {
  max-width: 320px;
  margin-bottom: 14px;
}
.upd-manage__actions {
  gap: 10px;
}

/* ── "Other" as an editable pill (form.js moves the amount field into it) ───────────────── */
.upd-preset--custom .upd-preset__custom {
  padding: 0;
  display: flex;
  align-items: stretch;
  min-height: 100%;
  overflow: hidden;
}
.upd-preset--custom .upd-preset__custom span {
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-weight: 600;
}
.upd-preset--custom .upd-preset__custom-text {
  flex: 1;
  justify-content: center;
  padding: 12px 8px;
}
.upd-preset--custom .upd-custom__field {
  flex: 1;
  min-width: 0;
  box-shadow: none;
}
.upd-preset--custom .upd-custom__field:focus-within {
  box-shadow: none;
}
.upd-preset--custom .upd-custom__adorn {
  padding: 0 0 0 8px;
  font-size: 0.85em;
  color: inherit;
  opacity: 0.8;
}
.upd-preset--custom .upd-custom__adorn + input + .upd-custom__adorn,
.upd-preset--custom input + .upd-custom__adorn {
  padding: 0 8px 0 0;
}
.upd-preset--custom .upd-custom__field input {
  padding: 12px 6px;
  text-align: center;
  font-size: 1em;
  font-weight: 600;
  color: inherit;
}
.upd-preset--custom .upd-custom__field input::placeholder {
  color: inherit;
  opacity: 0.85;
  font-weight: 600;
}
.upd-preset--custom input[type="radio"]:checked + .upd-preset__custom input {
  color: var(--upd-accent-text);
}
.upd-preset--custom input[type="radio"]:checked + .upd-preset__custom input::placeholder {
  color: var(--upd-accent-text);
}
.upd-preset--custom input[type="radio"]:checked + .upd-preset__custom .upd-custom__adorn {
  color: var(--upd-accent-text);
}
.upd-custom[hidden] {
  display: none;
}

/* ── Tax-relief box: same look as the consent line, inside the details step ──────────────── */
.upd-tax {
  margin: 4px 0 12px;
}

/* ── [ummah_payment_methods]: a row of logos for the page text ───────────────────────────── */
.upd-methods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.upd-methods__item {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.upd-methods img {
  display: block;
  height: var(--upd-method-size, 32px);
  width: auto;
  max-width: none;
}


/* The moved amount field must not inherit the rule that hides a pill's radio button. */
.upd-preset--custom .upd-custom__field input[name="amount"] {
  position: static;
  opacity: 1;
  width: 100%;
  height: auto;
  min-width: 0;
}
/* The currency suffix only once something is typed; the placeholder reads "Other" alone. */
.upd-preset--custom .upd-custom__field input:placeholder-shown + .upd-custom__adorn {
  display: none;
}
.upd-preset--custom .upd-custom__field input:placeholder-shown {
  padding-right: 6px;
}


/* ── Rhythm and alignment pass ───────────────────────────────────────────────────────────── */
/* Pills in one row share the row's height: a label that wraps no longer leaves its neighbours shorter. */
.upd-preset,
.upd-fund-option,
.upd-toggle {
  display: flex;
}
.upd-preset > span,
.upd-fund-option > span,
.upd-toggle > span {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  line-height: 1.25;
}
.upd-preset--custom .upd-preset__custom {
  min-height: 46px;
}
.upd-presets,
.upd-funds-grid {
  gap: 10px;
}
.upd-amounts legend,
.upd-funds legend,
.upd-fund > span {
  margin-bottom: 10px;
}
.upd-fund-desc {
  margin-top: 14px;
}
.upd-hint {
  margin-top: 10px;
}
.upd-hint--min {
  margin-top: 8px;
}
/* Sections breathe: a clear gap before each new question, and around the checkboxes and hints. */
.upd-form--card .upd-step + .upd-step,
.upd-form--card .upd-funds + .upd-amounts,
.upd-form--card .upd-amounts + .upd-step {
  margin-top: 6px;
}
.upd-form--card .upd-step__question {
  margin: 0 0 14px;
}
.upd-details {
  gap: 14px 14px;
}
.upd-field > span {
  margin-bottom: 7px;
}
.upd-tax {
  margin: 16px 0 10px;
}
.upd-form--card .upd-step--details .upd-hint {
  margin: 10px 0 0;
}
.upd-form--card .upd-step--pay .upd-consent {
  margin: 18px 0 18px;
}
.upd-form--card .upd-step--pay {
  margin-top: 4px;
}
.upd-secure {
  margin-top: 14px;
}
/* Three amount pills fit one row on a phone (100 kr · 300 kr · Other). */
.upd-presets {
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
}
/* The amount row fills the container: as many equal columns as there are pills (auto-fit stretches them). */
.upd-presets {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
}

/* ── Review round 2: section spacing, full-width purpose pills, required markers ─────────── */
.upd-req {
  color: #d12d1f;
  font-weight: 700;
  margin-left: 1px;
}
.upd-funds-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
/* Space before "Amount" whatever precedes it (purposes, the gift-type toggle or the charge-day note). */
.upd-form--card :is(fieldset, div, p):not([hidden]) + .upd-amounts {
  margin-top: 24px;
}
.upd-hint--charge-day {
  margin-bottom: 4px;
}
/* Space before each later section. */
.upd-form--card .upd-step--gift,
.upd-form--card .upd-step--details {
  margin-top: 26px;
}
.upd-form--card .upd-step--gift .upd-gift-themes {
  margin-bottom: 20px;
}
.upd-form--card .upd-step--gift .upd-details {
  margin-top: 20px;
}
/* The privacy box sits apart from the receipt hint above it. */
.upd-form--card .upd-step--pay .upd-consent {
  margin: 26px 0 18px;
}
/* Self-service: room between the email field and the button. */
.upd-manage__form .upd-details {
  margin-bottom: 16px;
}
/* Purpose pills: three per row on a desktop form, two on a phone, each row filling the width. */
.upd-funds-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
/* Review round 2b: twelve pixels more at each of the reviewed spots. */
.upd-form--card :is(fieldset, div, p):not([hidden]) + .upd-amounts {
  margin-top: 36px;
}
.upd-form--card .upd-step--gift,
.upd-form--card .upd-step--details {
  margin-top: 38px;
}
.upd-form--card .upd-step--gift .upd-details {
  margin-top: 32px;
}
.upd-form--card .upd-step--pay .upd-consent {
  margin: 38px 0 18px;
}
.upd-manage__form .upd-details {
  margin-bottom: 28px;
}
/* Review test: 40px at each reviewed spot. The amount rule looks past hidden inputs to any earlier section. */
.upd-form--card :is(fieldset, div, p):not([hidden]) ~ .upd-amounts {
  margin-top: 40px;
}
.upd-form--card .upd-step--gift,
.upd-form--card .upd-step--details {
  margin-top: 40px;
}
.upd-form--card .upd-step--gift .upd-details {
  margin-top: 40px;
}
.upd-form--card .upd-step--pay .upd-consent {
  margin: 40px 0 18px;
}
.upd-manage__form .upd-details {
  margin-bottom: 40px;
}
/* The sections are .upd-step blocks: purpose → amount → (gift) → details → pay. Rules below outrank the
   earlier ".upd-step + .upd-step" rhythm rule. */
.upd-form--card .upd-step--purpose + .upd-step--amount {
  margin-top: 40px;
}
.upd-form--card .upd-step + .upd-step--gift,
.upd-form--card .upd-step + .upd-step--details {
  margin-top: 40px;
}
.upd-form--card .upd-hint--charge-day {
  margin-bottom: 18px;
}
/* Self-service box: 40px between the intro and the email field, 16px between the field and the button. */
.upd-manage__form .upd-details {
  margin: 40px 0 16px;
}
/* Personal identity number under the tax-relief box (when that option is on). */
.upd-details--tax {
  margin-top: 10px;
}
/* A message about one field, placed right under that field by embedded.js. */
.upd-alert--field {
  grid-column: 1 / -1;
  margin: 2px 0 6px;
  font-size: 0.9em;
}

/* ── Fixed amount per unit: a quantity stepper replaces the amount pills ─────────────────── */
.upd-quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.upd-quantity__label {
  flex: 1 1 100%;
  margin: 0;
  font-weight: 600;
}
.upd-quantity__stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--upd-border);
  border-radius: 8px;
  overflow: hidden;
}
.upd-form .upd-quantity__btn {
  width: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f3f4f6;
  color: inherit;
  font-size: 1.25em;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}
.upd-form .upd-quantity__btn:hover,
.upd-form .upd-quantity__btn:focus-visible {
  background: var(--upd-accent);
  color: var(--upd-accent-text);
  outline: none;
}
.upd-form .upd-quantity__input {
  width: 64px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--upd-border);
  border-right: 1px solid var(--upd-border);
  border-radius: 0;
  background: var(--upd-bg);
  text-align: center;
  font-size: 1.05em;
  font-weight: 700;
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.upd-form .upd-quantity__input::-webkit-outer-spin-button,
.upd-form .upd-quantity__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.upd-quantity__unit {
  color: #6b7280;
  font-weight: 500;
}
.upd-quantity__total {
  flex: 1 1 100%;
  font-weight: 600;
}

/* ── Mobile review (27 Nov): one purpose per row on a phone; checkboxes level with their text ─ */
/* Purposes stack one per row on a phone. Before, a 360px-wide phone (Samsung S25) fitted two
   140px columns and a narrower one fitted one, so the same form looked different per device. */
@media (max-width: 560px) {
  .upd-form .upd-funds-grid,
  .upd-form.upd-form--steps .upd-funds-grid {
    grid-template-columns: 1fr;
  }
}
/* A checkbox sits level with the first line of its text, whatever font size and line height the
   theme gives the text (it used to sit a fixed 4px down, which a larger theme font misaligned). */
.upd-form .upd-consent > span {
  line-height: 1.5;
}
.upd-form .upd-consent > input[type="checkbox"] {
  flex: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  margin: calc(0.75em - 9px) 0 0;
  font-size: inherit;
  vertical-align: top;
}
/* The gift card's "email it to the recipient" line sits the same way as the consent lines. */
.upd-form .upd-check {
  align-items: flex-start;
  line-height: 1.5;
}
.upd-form .upd-check > input[type="checkbox"] {
  flex: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  margin: calc(0.75em - 9px) 0 0;
  font-size: inherit;
  vertical-align: top;
}

/* ── IR test-group round, 27 Nov 2026: "Other" reads as a field to type in ───────────────── */
/* White like the inputs, a plain border, the word as a grey placeholder from the left, the currency at
   the end, a caret. Chosen, it keeps the field look with the accent border instead of filling like a
   button, so people see where the amount goes. */
.upd-form .upd-preset--custom .upd-preset__custom,
.upd-form .upd-preset--custom input[type="radio"]:checked + .upd-preset__custom {
  border: 1px solid var(--upd-input-border, var(--upd-border));
  background: var(--upd-input-bg, #fff);
  color: inherit;
  cursor: text;
}
.upd-form .upd-preset--custom input[type="radio"]:checked + .upd-preset__custom {
  border-color: var(--upd-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--upd-accent) 20%, transparent);
}
.upd-form .upd-preset--custom input[type="radio"]:focus-visible + .upd-preset__custom {
  outline: none;
}
.upd-form .upd-preset--custom .upd-custom__field input,
.upd-form .upd-preset--custom input[type="radio"]:checked + .upd-preset__custom input {
  padding: 12px 10px;
  text-align: left;
  font-weight: 500;
  color: inherit;
}
.upd-form .upd-preset--custom .upd-custom__field input::placeholder,
.upd-form .upd-preset--custom input[type="radio"]:checked + .upd-preset__custom input::placeholder {
  color: #6b7280;
  opacity: 1;
  font-weight: 500;
}
.upd-form .upd-preset--custom .upd-custom__adorn,
.upd-form .upd-preset--custom input[type="radio"]:checked + .upd-preset__custom .upd-custom__adorn {
  color: #6b7280;
  opacity: 1;
}
.upd-form--steps .upd-preset--custom .upd-preset__custom {
  border-radius: 0;
}
/* Inside the pill the field's own box carries no border or ring: the pill is the field. */
.upd-form .upd-preset--custom .upd-custom__field,
.upd-form .upd-preset--custom .upd-custom__field:focus-within {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* The currency sits at the end of the field from the start ("Other … kr"), as on any amount field. It
   never gets the pill's focus ring (that rule reads "a focused input followed by a span": the amount field
   followed by the currency matches it too). */
.upd-form .upd-preset--custom .upd-custom__field input:placeholder-shown + .upd-custom__adorn {
  display: block;
}
.upd-form .upd-preset--custom .upd-custom__field input:focus-visible + .upd-custom__adorn,
.upd-form .upd-preset--custom .upd-custom__adorn {
  outline: none;
}
/* Before the page's scripts have run (a cookie tool may hold them back), the word in the pill already
   reads like the placeholder it becomes: grey, from the left. */
.upd-form .upd-preset--custom .upd-preset__custom-text {
  justify-content: flex-start;
  padding: 12px 10px;
  color: #6b7280;
  font-weight: 500;
}
