/* WooCommerce's completed accordion animation leaves an identity transform.
   That creates a containing block for fixed descendants and clips the ACS. */
.andorpay-card-challenge-open .wc-block-components-radio-control-accordion-content:has([data-andorpay-challenge="true"]) {
  animation: none !important;
  transform: none !important;
}
.andorpay-card-challenge-open .wc-block-components-radio-control:has([data-andorpay-challenge="true"]) {
  overflow: visible !important;
}

/* Without relational selectors the completed Woo animation must still stop
 * establishing a containing block for the full-screen bank challenge. */
@supports not selector(:has(*)) {
  .andorpay-card-challenge-open .wc-block-components-radio-control-accordion-content {
    animation: none !important;
    transform: none !important;
  }
  .andorpay-card-challenge-open .wc-block-components-radio-control { overflow: visible !important; }
}

/* The challenge canvas is independent of the checkout column. Keep the same
   iframe in place: moving/recreating it could restart the bank interaction. */
.andorpay-card-inline[data-andorpay-challenge="true"],
.andorpay-card-block-inline[data-andorpay-challenge="true"] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center;
  align-content: center;
  box-sizing: border-box;
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.48);
  transform: none;
}
[data-andorpay-challenge="true"] > .andorpay-card-inline__frame-wrap {
  width: var(--andorpay-challenge-width, 100%);
  max-width: 100vw;
  flex: none;
  background: white;
}
[data-andorpay-challenge="true"] .andorpay-card-inline__frame {
  width: 100%;
}
.andorpay-bank-authentication {
  position: static;
  width: 100%;
  min-width: 0;
  color: inherit;
  font: inherit;
  line-height: 1.5;
  text-align: start;
  overflow-wrap: anywhere;
}
/* A stable, readable waiting state replaces the completed bank challenge. */
.andorpay-bank-authentication [hidden] { display: none !important; }
.andorpay-bank-authentication:not([data-state="challenge"]) {
  box-sizing: border-box;
  min-height: 260px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 16px;
}
.andorpay-bank-authentication:not([data-state="challenge"]) .andorpay-bank-authentication__canvas {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}
.andorpay-bank-authentication:not([data-state="challenge"]) header { display: contents; }
.andorpay-bank-authentication:not([data-state="challenge"]) .andorpay-bank-authentication__title {
  grid-row: 2;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.andorpay-bank-authentication:not([data-state="challenge"]) p {
  grid-row: 3;
  max-width: 38ch;
  padding: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.andorpay-bank-authentication:not([data-state="challenge"]) header button {
  grid-row: 4;
  margin-top: 4px;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .875rem;
}
.andorpay-bank-authentication__progress {
  grid-row: 1;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  margin-block: 0 8px;
  border: 3px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: andorpay-auth-progress 800ms linear infinite;
}
.andorpay-bank-authentication[data-state="complete"] .andorpay-bank-authentication__progress {
  animation: none;
  border: 2px solid currentColor;
  font-size: 24px;
  line-height: 1;
}
[data-andorpay-auth-locked] {
  opacity: .55;
  pointer-events: none;
  user-select: none;
}
@keyframes andorpay-auth-progress { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .andorpay-bank-authentication__progress { animation: none; }
}
.andorpay-bank-authentication__canvas {
  width: 100%;
  min-width: 0;
}
.andorpay-bank-authentication header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 0 0 12px;
}
.andorpay-bank-authentication .andorpay-bank-authentication__title {
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.andorpay-bank-authentication header button,
.andorpay-payment-recovery .andorpay-payment-recovery__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.andorpay-bank-authentication:focus-visible,
.andorpay-bank-authentication header button:focus-visible,
.andorpay-payment-recovery .andorpay-payment-recovery__action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
.andorpay-bank-authentication header button:active:not(:focus-visible),
.andorpay-payment-recovery .andorpay-payment-recovery__action:active:not(:focus-visible) {
  transform: scale(0.98);
}
@media (prefers-reduced-motion: reduce) {
  .andorpay-bank-authentication header button,
  .andorpay-payment-recovery .andorpay-payment-recovery__action {
    transition: none;
    transform: none !important;
  }
}
.andorpay-bank-authentication p { margin: 0; padding: 0 0 12px; }
.andorpay-bank-authentication__frame { display: block; max-width: 100%; margin-inline: auto; border: 0; background: white; }
.andorpay-payment-recovery {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  box-sizing: border-box;
  max-width: 40rem;
  margin-block: 1.5rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  overflow-wrap: anywhere;
}
.andorpay-payment-recovery .andorpay-payment-recovery__copy h2 {
  margin: 0 0 0.5rem;
  color: inherit;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-transform: none;
}
.andorpay-payment-recovery .andorpay-payment-recovery__copy p {
  margin: 0;
  font: inherit;
  line-height: 1.6;
}
@media (forced-colors: active), (prefers-contrast: more) {
  .andorpay-payment-recovery { border-color: currentColor; }
}
[data-andorpay-inline-checkout="google_pay"] [hidden],
[data-andorpay-inline-checkout="apple_pay"] [hidden] { display: none !important; }
html.andorpay-card-challenge-open,
body.andorpay-card-challenge-open {
  overflow: hidden;
}
@media (max-width: 620px) {
  .andorpay-card-inline[data-andorpay-challenge="true"],
  .andorpay-card-block-inline[data-andorpay-challenge="true"] {
    align-content: start;
    background: white;
  }
}

:where(
  .andorpay-card-inline,
  .andorpay-card-block-inline,
  .andorpay-card-method-note,
  .andorpay-card-block-note,
  .andorpay-wallet-assurance,
  .andorpay-bizum-inline,
  .andorpay-google-pay-inline,
  .andorpay-payment-method-preview,
  .andorpay-payment-shell
) {
  --andorpay-ui-ink: #1f2328;
  --andorpay-ui-muted: #57606a;
  --andorpay-ui-border: #d0d7de;
  --andorpay-ui-border-strong: #8c959f;
  --andorpay-ui-surface: #ffffff;
  --andorpay-ui-subtle: #f6f8fa;
  --andorpay-ui-danger: #b42318;
  --andorpay-ui-danger-bg: #fff6f5;
  --andorpay-ui-radius-panel: 12px;
  --andorpay-ui-radius-control: 10px;
  --andorpay-ui-control-height: 48px;
  --andorpay-ui-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* WooCommerce owns the accordion and radio. The plugin only refines its own rows. */
.wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]) {
  overflow: visible;
  border-color: #d0d7de;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
  transition:
    border-color 150ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

.wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]:checked) {
  border-color: #8c959f;
  box-shadow: 0 1px 2px rgba(31, 35, 40, 0.08), inset 0 0 0 1px rgba(31, 35, 40, 0.08);
}

.wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]) > .wc-block-components-radio-control__option {
  min-height: 58px;
  box-sizing: border-box;
  background: #ffffff;
  transition: background-color 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

.wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]:checked) > .wc-block-components-radio-control__option {
  background: #f6f8fa;
}

.wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]:focus-visible) {
  border-color: #57606a;
  box-shadow: 0 0 0 3px rgba(31, 35, 40, 0.14);
}

.wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]) > .wc-block-components-radio-control-accordion-content {
  padding: 4px 18px 18px 46px;
  background: #ffffff;
}

.andorpay-payment-method-preview {
  box-sizing: border-box;
  color: var(--andorpay-ui-muted, #57606a);
  cursor: not-allowed;
  user-select: none;
}

.wc-block-components-radio-control > .andorpay-payment-method-preview--blocks {
  min-height: 58px;
  overflow: hidden;
  border: 1px solid var(--andorpay-ui-border, #d0d7de);
  border-radius: 10px;
  background: var(--andorpay-ui-subtle, #f6f8fa);
  box-shadow: none;
}

.andorpay-payment-method-preview--classic {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--andorpay-ui-border, #d0d7de);
  background: var(--andorpay-ui-subtle, #f6f8fa);
}

.andorpay-payment-method-preview__row {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 12px;
}

.andorpay-payment-method-preview__radio {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  box-sizing: border-box;
  border: 1.5px solid var(--andorpay-ui-border-strong, #8c959f);
  border-radius: 50%;
  background: var(--andorpay-ui-surface, #ffffff);
  opacity: 0.62;
}

.andorpay-payment-method-preview__brand {
  display: inline-flex;
  min-width: 76px;
  align-items: center;
}

.andorpay-payment-method-preview__brand img {
  display: block;
  width: auto;
  height: 38px;
  max-width: none;
  opacity: 0.72;
}

.andorpay-card-method-note,
.andorpay-card-block-note,
.andorpay-wallet-assurance {
  display: flex;
  min-height: 24px;
  align-items: center;
  margin: 4px 0 0;
  padding: 4px 0 0;
  color: var(--andorpay-ui-muted, #57606a);
  font-size: 13px;
  line-height: 1.5;
}

.andorpay-card-inline,
.andorpay-card-block-inline {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.andorpay-card-inline__status {
  order: 2;
  display: flex;
  min-height: 38px;
  align-items: center;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--andorpay-ui-border, #d0d7de);
  border-radius: 8px;
  background: var(--andorpay-ui-subtle, #f6f8fa);
  color: var(--andorpay-ui-muted, #57606a);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

[data-andorpay-tone="ready"] .andorpay-card-inline__status {
  display: none;
}

[data-andorpay-tone="error"] .andorpay-card-inline__status {
  border-color: #f3b7b1;
  background: var(--andorpay-ui-danger-bg, #fff6f5);
  color: var(--andorpay-ui-danger, #b42318);
}

.andorpay-card-inline__frame-wrap {
  position: relative;
  order: 1;
  height: 156px;
  min-height: 156px;
  background: transparent;
}

[data-andorpay-route="redirect"] .andorpay-card-inline__frame-wrap {
  display: none;
  height: 0;
  min-height: 0;
}

[data-andorpay-route="unavailable"] .andorpay-card-inline__frame-wrap {
  height: 0;
  min-height: 0;
}

.andorpay-card-redirect-assurance[hidden] {
  display: none;
}

.andorpay-card-secure-fields {
  display: block;
  height: 100%;
  box-sizing: border-box;
  overflow: visible;
  border: 0;
  background: transparent;
}

.andorpay-card-secure-fields__body {
  padding: 2px 0 0;
}

.andorpay-card-secure-fields__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.andorpay-card-loading-fields {
  height: 100%;
  box-sizing: border-box;
  padding: 2px 0 0;
}

.andorpay-card-loading-fields__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.andorpay-card-loading-field {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 6px;
}

.andorpay-card-loading-field--wide {
  grid-column: 1 / -1;
}

.andorpay-card-loading-field__label {
  display: block;
  width: 72px;
  height: 12px;
  border-radius: 999px;
  background: var(--andorpay-ui-subtle, #f0f2f4);
}

.andorpay-card-loading-field__input {
  position: relative;
  display: block;
  height: 46px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid var(--andorpay-ui-border, #d0d7de);
  border-radius: var(--andorpay-ui-radius-control, 10px);
  background: var(--andorpay-ui-surface, #ffffff);
  box-shadow: 0 1px 2px rgba(31, 35, 40, 0.04);
}

.andorpay-card-loading-field__input::before {
  position: absolute;
  top: 16px;
  left: 12px;
  width: min(42%, 132px);
  height: 12px;
  border-radius: 999px;
  background: var(--andorpay-ui-subtle, #f0f2f4);
  content: "";
}

.andorpay-card-loading-field--card .andorpay-card-loading-field__input::before {
  width: min(42%, 112px);
}

.andorpay-card-loading-field--expiry .andorpay-card-loading-field__input::before {
  width: min(78%, 178px);
}

.andorpay-card-loading-field--cvc .andorpay-card-loading-field__input::before {
  width: min(60%, 118px);
}

.andorpay-card-loading-field__input::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  content: "";
  animation: andorpay-card-loading-shimmer 1.25s ease-in-out infinite;
}

@keyframes andorpay-card-loading-shimmer {
  to {
    transform: translateX(100%);
  }
}

.andorpay-card-secure-field--wide {
  grid-column: 1 / -1;
}

.andorpay-card-secure-field {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 6px;
}

.andorpay-card-secure-field__label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  color: var(--andorpay-ui-ink, #1f2328);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}

.andorpay-card-secure-field__mount {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--andorpay-ui-border, #d0d7de);
  border-radius: var(--andorpay-ui-radius-control, 10px);
  background: var(--andorpay-ui-surface, #ffffff);
  box-shadow: 0 1px 2px rgba(31, 35, 40, 0.04);
  transition:
    border-color 150ms var(--andorpay-ui-ease-out, ease-out),
    box-shadow 150ms var(--andorpay-ui-ease-out, ease-out);
}

.andorpay-card-secure-field:focus-within .andorpay-card-secure-field__mount {
  border-color: var(--andorpay-ui-border-strong, #8c959f);
  box-shadow: 0 0 0 3px rgba(31, 35, 40, 0.12);
}

.andorpay-card-secure-field__mount iframe {
  display: block;
  width: 100%;
  height: 44px;
  border: 0;
}

.andorpay-card-secure-field__accessory,
.andorpay-card-loading-field__accessory {
  position: absolute;
  z-index: 2;
  right: 15px;
  bottom: 15px;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  pointer-events: none;
}

.andorpay-card-secure-field__accessory--lock,
.andorpay-card-loading-field__accessory--lock {
  background-color: transparent;
  background-image: url("lock-closed.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.andorpay-card-secure-field__accessory--help,
.andorpay-card-loading-field__accessory--help {
  background-color: transparent;
  background-image: url("question-mark-circle.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.andorpay-card-secure-field--card .andorpay-card-secure-field__mount {
  padding-right: 0;
}

.andorpay-card-secure-pay {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.andorpay-card-inline__controller-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  visibility: hidden;
  opacity: 0;
}

[data-andorpay-controller-stage="controller"] .andorpay-card-secure-fields {
  display: none;
}

[data-andorpay-controller-stage="controller"] .andorpay-card-inline__controller-frame {
  width: 100%;
  height: 220px;
  visibility: visible;
  opacity: 1;
}

.andorpay-card-inline__frame {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
  background: #ffffff;
}

.andorpay-card-method-label {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.andorpay-card-brands {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.andorpay-card-brand {
  display: grid;
  width: 38px;
  height: 24px;
  place-items: center;
  box-sizing: border-box;
  border-radius: 4px;
  background-position: center;
  background-repeat: no-repeat;
}

.andorpay-card-brand--visa {
  background-color: #1434cb;
  background-image: url("visa.svg");
  background-size: 27px auto;
}

.andorpay-card-brand--maestro {
  border: 1px solid #d8dee4;
  background-color: #ffffff;
  background-image: url("maestro.svg");
  background-size: 25px auto;
}

.andorpay-card-brand--mastercard {
  border: 1px solid #252525;
  background-color: #1b1b1b;
  background-image: url("mastercard.svg");
  background-size: 23px auto;
}

.payment_method_andorpay_card > label .andorpay-card-brands {
  float: right;
  margin-left: 10px;
}

.andorpay-bizum-inline {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.andorpay-bizum-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
}

.andorpay-bizum-brand img,
.payment_method_andorpay_bizum > label img {
  display: block;
  width: 72px;
  height: auto;
  max-width: none;
}

.wc-block-components-radio-control__label .andorpay-bizum-brand,
.payment_method_andorpay_bizum > label img {
  margin-left: 8px;
}

.andorpay-bizum-inline label {
  margin: 0;
  color: var(--andorpay-ui-ink, #1f2328);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.andorpay-bizum-inline input[type="tel"] {
  width: 100%;
  min-height: var(--andorpay-ui-control-height, 48px);
  box-sizing: border-box;
  border: 1px solid var(--andorpay-ui-border, #d0d7de);
  border-radius: var(--andorpay-ui-radius-control, 10px);
  padding: 11px 13px;
  background: var(--andorpay-ui-surface, #ffffff);
  color: var(--andorpay-ui-ink, #1f2328);
  box-shadow: 0 1px 2px rgba(31, 35, 40, 0.04);
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  transition:
    border-color 150ms var(--andorpay-ui-ease-out, ease-out),
    box-shadow 150ms var(--andorpay-ui-ease-out, ease-out);
}

.andorpay-bizum-inline input[type="tel"]:focus-visible {
  border-color: var(--andorpay-ui-border-strong, #8c959f);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 35, 40, 0.12);
}

.andorpay-bizum-inline input[type="tel"][aria-invalid="true"] {
  border-color: var(--andorpay-ui-danger, #b42318);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.andorpay-bizum-inline p {
  min-height: 18px;
  margin: 0;
  color: var(--andorpay-ui-muted, #57606a);
  font-size: 12px;
  line-height: 1.5;
}

.andorpay-bizum-inline p[role="alert"] {
  color: var(--andorpay-ui-danger, #b42318);
}

.andorpay-wallet-brand {
  display: inline-flex;
  min-width: 76px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
}

.andorpay-wallet-brand img {
  display: block;
  width: auto;
  max-width: none;
  max-height: none;
}

/* Size the complete acceptance marks, including their official outlines.
 * 38px keeps the lettering comparable to the 72px-wide Bizum wordmark. */
.wc-block-checkout__payment-method .wc-block-components-radio-control__label .andorpay-wallet-brand[data-method="apple_pay"] img,
.andorpay-wallet-brand[data-method="apple_pay"] img,
.payment_method_andorpay_apple_pay > label img {
  width: auto;
  height: 38px;
  max-width: none;
  max-height: none;
  flex-shrink: 0;
}

/* Both official wallet marks share the same optical height. */
.wc-block-checkout__payment-method .wc-block-components-radio-control__label .andorpay-wallet-brand[data-method="google_pay"] img,
.andorpay-wallet-brand[data-method="google_pay"] img,
.payment_method_andorpay_google_pay > label img {
  width: auto;
  height: 38px;
  max-width: none;
  max-height: none;
  flex-shrink: 0;
}

.wc-block-components-radio-control__label .andorpay-wallet-brand,
.payment_method_andorpay_apple_pay > label img,
.payment_method_andorpay_google_pay > label img {
  margin-left: 8px;
  vertical-align: middle;
}

.andorpay-payment-shell {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto 28px;
  border: 1px solid var(--andorpay-ui-border, #d0d7de);
  border-radius: 16px;
  background: var(--andorpay-ui-surface, #ffffff);
  box-shadow: 0 18px 48px rgba(31, 35, 40, 0.1), 0 2px 6px rgba(31, 35, 40, 0.05);
}

.andorpay-payment-shell__header,
.andorpay-payment-shell__frame-wrap,
.andorpay-payment-shell__footer {
  position: relative;
}

.andorpay-payment-shell__header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--andorpay-ui-border, #d0d7de);
}

.andorpay-payment-shell__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.andorpay-payment-shell__monogram {
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background: url("andorpay-mark.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
}

.andorpay-payment-shell__eyebrow {
  margin: 0 0 3px;
  color: var(--andorpay-ui-muted, #57606a);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.andorpay-payment-shell h2 {
  margin: 0;
  color: var(--andorpay-ui-ink, #1f2328);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.andorpay-payment-shell__lock {
  display: flex;
  max-width: 260px;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--andorpay-ui-muted, #57606a);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.andorpay-payment-shell__lock span {
  color: var(--andorpay-ui-ink, #1f2328);
  font-size: 20px;
  font-weight: 700;
  transform: rotate(-28deg);
}

.andorpay-payment-shell__frame-wrap {
  min-height: 720px;
  background: var(--andorpay-ui-subtle, #f6f8fa);
}

.andorpay-payment-shell__frame {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 160ms var(--andorpay-ui-ease-out, ease-out);
}

.andorpay-payment-shell.is-loaded .andorpay-payment-shell__frame {
  opacity: 1;
}

.andorpay-payment-shell__footer {
  margin: 0;
  padding: 14px 24px 16px;
  border-top: 1px solid var(--andorpay-ui-border, #d0d7de);
  color: var(--andorpay-ui-muted, #57606a);
  font-size: 12px;
  line-height: 1.5;
}

@media (hover: hover) and (pointer: fine) {
  .wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]):not(:has(input:checked)):hover {
    border-color: #aeb6bf;
    box-shadow: 0 1px 2px rgba(31, 35, 40, 0.06);
  }
}

@media (max-width: 620px) {
  .wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]) > .wc-block-components-radio-control-accordion-content {
    padding: 4px 12px 16px;
  }

  .andorpay-card-inline__frame-wrap {
    height: 156px;
    min-height: 156px;
  }

  .andorpay-card-inline__frame {
    height: 220px;
    min-height: 220px;
  }

  .andorpay-card-inline[data-andorpay-challenge="true"],
  .andorpay-card-block-inline[data-andorpay-challenge="true"] {
    position: fixed;
    z-index: 999999;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    margin: 0;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    transform: none;
  }

  .andorpay-card-challenge-open {
    overflow: hidden;
  }

  .andorpay-payment-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .andorpay-payment-shell__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
  }

  .andorpay-payment-shell__lock {
    max-width: none;
    text-align: left;
  }

  .andorpay-payment-shell__frame-wrap,
  .andorpay-payment-shell__frame {
    min-height: 780px;
  }

  .andorpay-payment-shell__footer {
    padding: 14px 20px 16px;
  }
}

@media (max-width: 380px) {
  .andorpay-card-brands {
    gap: 3px;
  }

  .andorpay-card-brand {
    width: 27px;
    height: 20px;
    background-size: 21px auto;
  }

  .andorpay-card-brand--visa {
    width: 32px;
    background-size: 23px auto;
  }

  .andorpay-card-secure-fields__grid {
    column-gap: 8px;
  }

  .andorpay-card-loading-fields__grid {
    column-gap: 8px;
  }

  .andorpay-wallet-brand {
    min-width: 68px;
  }

  .andorpay-payment-method-preview__brand {
    min-width: 68px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]),
  .wc-block-components-radio-control-accordion-option:has(input[value^="andorpay_"]) > .wc-block-components-radio-control__option,
  .andorpay-card-secure-field__mount,
  .andorpay-bizum-inline input[type="tel"],
  .andorpay-payment-shell__frame {
    transition-duration: 0.01ms;
  }

  .andorpay-card-loading-field__input::after {
    animation: none;
  }
}
.andorpay-google-pay-inline {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 8px;
  padding: 0;
}

.andorpay-google-pay-inline__button {
  box-sizing: border-box;
  /* Keep the existing 240px presentation plus clear space. In narrow merchant
   * columns, the SDK's fill mode handles sizing without altering its artwork. */
  width: 256px;
  max-width: 100%;
  /* Google requires 8dp of clear space around the API-rendered button. */
  padding: 8px;
}

.andorpay-google-pay-inline__status {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.andorpay-google-pay-inline__status[data-tone="error"] {
  color: #b42318;
}

body.andorpay-google-pay-selected form.checkout #place_order,
body.andorpay-google-pay-blocks-selected .wc-block-components-checkout-place-order-button,
body.andorpay-apple-pay-selected form.checkout #place_order,
body.andorpay-apple-pay-blocks-selected .wc-block-components-checkout-place-order-button {
  display: none !important;
}
/* Apple renders the artwork itself, including in third-party browsers. */
.andorpay-apple-pay-button {
  display: inline-block;
  -webkit-appearance: -apple-pay-button;
  -apple-pay-button-type: pay;
  -apple-pay-button-style: black;
  min-width: 140px;
  /* Apple: 140px minimum for a labelled button, 30px default/minimum height.
   * When Google is present, match the dimensions produced by its SDK. */
  width: var(--andorpay-wallet-button-width, 140px);
  height: var(--andorpay-wallet-button-height, 30px);
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  --apple-pay-button-width: var(--andorpay-wallet-button-width, 140px);
  --apple-pay-button-height: var(--andorpay-wallet-button-height, 30px);
  --apple-pay-button-border-radius: 4px;
  --apple-pay-button-padding: 0;
  --apple-pay-button-box-sizing: border-box;
}
.andorpay-apple-pay-button[hidden] { display: none; }
.andorpay-apple-pay-button[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.andorpay-apple-pay-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.andorpay-apple-pay-inline { display: grid; justify-items: center; gap: 8px; padding: 8px; }
.andorpay-apple-pay-inline .andorpay-apple-pay-button { display: block; margin-inline: auto; }
[data-andorpay-apple-pay-status] { margin: 0; font-size: 14px; line-height: 1.45; }
[data-andorpay-apple-pay-status]:empty { display: none; }

/* Classic checkout keeps Woo's selected gateway internally, with direct wallet actions. */
form.checkout .andorpay-direct-wallet > input[type="radio"],
form.checkout .andorpay-direct-wallet > label {
  display: none !important;
}
form.checkout .andorpay-direct-wallet > .payment_box {
  display: block !important;
  margin: 0;
}
form.checkout .andorpay-direct-wallet > .payment_box::before {
  display: none;
}

.andorpay-google-pay-inline__status:empty { display: none; }

/* Each wallet supplies its own 8px clear space. Keep both centred and let
 * checkout columns wrap before the SDK's fixed-width artwork would overflow. */
.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons:has(.andorpay-apple-pay-inline, .andorpay-google-pay-inline) {
  row-gap: 0;
}
.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons:has(.andorpay-apple-pay-inline, .andorpay-google-pay-inline) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--andorpay-wallet-button-width, 140px) + 16px)), 1fr));
}

/* One phone field: a compact country picker and a full international number.
 * Keep the native select for platform keyboard, type-ahead and mobile pickers. */
body .andorpay-phone-input {
  --andorpay-phone-border: #888;
  --andorpay-phone-focus: var(--andorpay-checkout-accent, #005bd1);
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: var(--andorpay-checkout-control-height, 49px);
  box-sizing: border-box;
  border: 1px solid var(--andorpay-phone-border);
  border-radius: var(--andorpay-checkout-radius, 12px);
  background: transparent;
  color: inherit;
}
body .andorpay-phone-input:focus-within {
  border-color: var(--andorpay-phone-focus);
  box-shadow: 0 0 0 1px var(--andorpay-phone-focus);
}
body .andorpay-phone-input[data-invalid="true"] {
  --andorpay-phone-focus: #d92d20;
  border-color: var(--andorpay-phone-focus);
}
body .andorpay-phone-input[data-disabled="true"] { opacity: .55; }
body .andorpay-phone-input .andorpay-phone-input__picker {
  position: relative;
  display: flex;
  flex: 0 0 64px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: inherit;
}
body .andorpay-phone-input__picker::before {
  content: "";
  position: absolute;
  right: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--andorpay-phone-border);
}
body .andorpay-phone-input__picker::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
body .andorpay-phone-input__country-code { font: 500 14px/1 system-ui, sans-serif; }
body .andorpay-phone-input .andorpay-phone-input__country {
  /* Only the transparent overlay's chrome is removed; selection stays native.
   * WebKit otherwise substitutes its 13px control font on touch devices. */
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
body .andorpay-phone-input .andorpay-phone-input__country:disabled { cursor: default; }
body .andorpay-phone-input__picker:focus-within {
  outline: 2px solid var(--andorpay-phone-focus);
  outline-offset: -4px;
}
body .andorpay-phone-input > input[type="tel"] {
  flex: 1 1 0;
  width: 0 !important;
  min-width: 0;
  min-height: calc(var(--andorpay-checkout-control-height, 49px) - 2px) !important;
  height: auto;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: inherit !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
body .andorpay-phone-input > input::placeholder { color: currentColor; color: color-mix(in srgb, currentColor 72%, transparent); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  body .andorpay-phone-input__picker:has(select:enabled):hover { background: color-mix(in srgb, currentColor 5%, transparent); }
}
body .andorpay-phone-input__picker:has(select:enabled):active { background: color-mix(in srgb, currentColor 9%, transparent); }
@media (forced-colors: active) {
  body .andorpay-phone-input:focus-within { outline: 2px solid Highlight; }
  body .andorpay-phone-input { border-color: CanvasText; }
}

body .andorpay-bizum-inline > p[role="alert"],
body.andorpay-checkout-ui .andorpay-express-checkout__bizum .andorpay-express-checkout__bizum-message[role="alert"] {
  color: color-mix(in srgb, #d92d20 75%, currentColor);
}

@supports (color: color-mix(in srgb, black, white)) {
  body .andorpay-phone-input {
    --andorpay-phone-border: color-mix(in srgb, currentColor 28%, transparent);
    --andorpay-phone-focus: color-mix(in srgb, var(--andorpay-checkout-accent, #005bd1) 75%, currentColor);
  }
  body .andorpay-phone-input[data-invalid="true"] {
    --andorpay-phone-focus: color-mix(in srgb, #d92d20 75%, currentColor);
  }
}
@supports not selector(:focus-visible) {
  .andorpay-apple-pay-button:focus,
  .andorpay-bank-authentication:focus,
  .andorpay-bank-authentication button:focus,
  .andorpay-payment-recovery button:focus { outline: 2px solid currentColor; outline-offset: 3px; }
}

.andorpay-bank-authentication__frame[hidden] { display: none; }

/* Bizum authorization feedback is scoped to its own controls. */
button.andorpay-bizum-submit,
.andorpay-bizum-wait__actions button {
  box-sizing: border-box;
  min-height: 48px;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--andorpay-checkout-button-color, var(--andorpay-checkout-accent, #005bd1));
  color: #fff;
  font: 600 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  cursor: pointer;
  box-shadow: none;
}
button.andorpay-bizum-submit {
  width: 100%;
  background: #05c0c7 !important;
  color: #0b2426 !important;
  border-color: #007e84;
}
button.andorpay-bizum-submit:hover:not(:disabled) { filter: brightness(.94); }
button.andorpay-bizum-submit:focus-visible,
.andorpay-bizum-wait__actions button:focus-visible {
  outline: 2px solid var(--andorpay-checkout-accent, #005bd1);
  outline-offset: 3px;
}
button.andorpay-bizum-submit:focus-visible { outline-color: #007e84; }
button.andorpay-bizum-submit:disabled,
.andorpay-bizum-wait__actions button:disabled { opacity: .6; cursor: wait; }
.andorpay-bizum-wait {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  margin: auto;
  padding: 28px;
  border: 1px solid #d6d6d6;
  border-radius: 18px;
  background: #fff;
  color: #1d1d1f;
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  box-shadow: 0 16px 64px #0003;
}
.andorpay-bizum-wait::backdrop { background: #0008; }
.andorpay-bizum-backdrop { position: fixed; inset: 0; background: #0008; z-index: 2147483645; }
.andorpay-bizum-wait--fallback { display: block; position: fixed; inset: 0; z-index: 2147483646; height: fit-content; }
.andorpay-bizum-wait h2 {
  margin: 0 0 12px;
  color: inherit;
  font: 600 24px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.02em;
  text-transform: none;
}
.andorpay-bizum-wait p { margin: 0 0 20px; font-size: 16px; line-height: 1.5; }
.andorpay-bizum-wait .andorpay-bizum-wait__brand { margin: 0 auto 24px; }
.andorpay-bizum-wait__brand img { display: block; width: 122px; height: 36px; margin: auto; object-fit: contain; }
.andorpay-bizum-wait { text-align: center; }
.andorpay-bizum-wait .andorpay-bizum-wait__timer {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 24px auto;
  color: #1d1d1f;
  font-variant-numeric: tabular-nums;
}
.andorpay-bizum-wait__timer svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.andorpay-bizum-wait__track { stroke: #e6f6f6; }
.andorpay-bizum-wait__ring { stroke: #05c0c7; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 1s linear; }
.andorpay-bizum-wait__clock-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; }
.andorpay-bizum-wait__clock { color: #1d1d1f; font-size: 44px; line-height: 1.1; letter-spacing: -.04em; font-weight: 600; }
.andorpay-bizum-wait__caption { color: #595959; font-size: 12px; }
.andorpay-bizum-wait__actions button:not([data-bizum-close]) { background: #007e84; }
@media (prefers-reduced-motion: reduce) { .andorpay-bizum-wait__ring { transition: none; } }
@media (max-height: 650px) { .andorpay-bizum-wait .andorpay-bizum-wait__timer { width: 144px; height: 144px; margin: 16px auto; } }

.andorpay-bizum-wait__actions { display: grid; gap: 10px; }
.andorpay-bizum-wait button.andorpay-bizum-wait__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
  color: #1d1d1f;
  font: 400 28px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: none;
}
.andorpay-bizum-wait button.andorpay-bizum-wait__close:active { background: #dedede; }
.andorpay-bizum-wait button.andorpay-bizum-wait__close:focus-visible { outline: 2px solid #007e84; outline-offset: 2px; }
.andorpay-bizum-wait [hidden] { display: none !important; }
[data-andorpay-bizum-wait] .andorpay-bizum-wait { position: relative; width: 100%; margin: 20px auto; box-shadow: none; }
@media (max-width: 359px) {
  .andorpay-bizum-wait { padding: 20px; }
  .andorpay-bizum-wait h2 { font-size: 22px; }
}

/* Capability-unavailable wallets stay hidden even when the theme sets display. */
[data-andorpay-inline-checkout="apple_pay"][hidden],
li.payment_method_andorpay_apple_pay[hidden] { display: none !important; }

/* Cart wallet authentication must escape the disabled express-payment list.
   Honor hidden cart content even when theme grid/flex rules override [hidden]. */
.wp-block-woocommerce-cart > [hidden] { display: none !important; }
.wp-block-woocommerce-cart > .andorpay-bank-authentication {
  box-sizing: border-box;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding: 16px;
  pointer-events: auto;
}

/* Existing-order wallets are direct SDK actions, with Woo's form retained. */
#order_review li.andorpay-order-pay-wallet[hidden] { display: none !important; }
#order_review li.andorpay-order-pay-wallet > input,
#order_review li.andorpay-order-pay-wallet > label { display: none !important; }
#order_review li.andorpay-order-pay-wallet .payment_box { display: block !important; padding: 0; margin: 12px 0; background: transparent; }
#order_review li.andorpay-order-pay-wallet .payment_box::before { display: none; }
#order_review [data-andorpay-order-pay-wallet] { width: 100%; max-width: 320px; }
#order_review [data-andorpay-order-pay-wallet] apple-pay-button { display:block; --apple-pay-button-width:100%; --apple-pay-button-height:40px; --apple-pay-button-box-sizing:border-box; }

/* Visible while Woo creates a cart express order, before its bank challenge. */
.andorpay-wallet-processing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: inherit;
  font: inherit;
  line-height: 1.5;
}
.andorpay-wallet-processing .andorpay-bank-authentication__progress {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
}
[data-andorpay-wallet-processing] .wc-block-cart__submit-button,
[data-andorpay-wallet-processing] button {
  opacity: .5;
  cursor: wait;
}

/* Woo's transient content is only a props bridge; the retained panel owns fields. */
.andorpay-card-bridge-container,
[data-andorpay-retained-card][hidden] {
  display: none !important;
}
.andorpay-card-retry {
  display: block;
  margin-top: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.andorpay-card-retry:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.andorpay-card-inline__status:has(.andorpay-card-retry) {
  flex-wrap: wrap;
  gap: 8px;
}

[data-andorpay-saved-card="true"] .andorpay-card-secure-fields,
[data-andorpay-saved-card="true"] .andorpay-card-loading-fields { display: none; }
[data-andorpay-saved-card="true"][data-andorpay-controller-stage="fields"] { min-height: 0; height: auto; }
