.begateway-payment-logos {
  --begateway-logo-h: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.begateway-payment-logos__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--begateway-logo-h);
  flex: 0 0 auto;
  line-height: 0;
  overflow: visible;
  padding: 0;
}

.begateway-payment-logos__img {
  display: block;
  width: auto !important;
  height: var(--begateway-logo-h) !important;
  max-width: none !important;
  max-height: var(--begateway-logo-h) !important;
  object-fit: contain;
  object-position: center;
  vertical-align: middle;
}

.begateway-payment-logos--checkout {
  --begateway-logo-h: 22px;
  margin: 8px 0 0;
  justify-content: flex-start;
}

.begateway-payment-logos--gateway-icon {
  --begateway-logo-h: 22px;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-left: auto;
  max-width: min(100%, 280px);
  vertical-align: middle;
}

.begateway-payment-logos--footer {
  --begateway-logo-h: 28px;
  gap: 16px;
}

/* Visa wordmark is optically heavier */
.begateway-payment-logos__img[alt="Visa"] {
  height: calc(var(--begateway-logo-h) * 0.9) !important;
  max-height: calc(var(--begateway-logo-h) * 0.9) !important;
}

.payment_method_begateway .begateway-payment-logos,
.wc-block-components-radio-control-accordion-content .begateway-payment-logos {
  margin-top: 10px;
}

/* Beat theme/Woo defaults that blow up or clip gateway icons */
#payment .wc_payment_methods li label .begateway-payment-logos,
.woocommerce-checkout #payment ul.payment_methods li .begateway-payment-logos {
  margin-left: auto;
}

#payment .wc_payment_methods li label .begateway-payment-logos__img,
.woocommerce-checkout #payment ul.payment_methods li .begateway-payment-logos__img {
  width: auto !important;
  height: var(--begateway-logo-h) !important;
  max-height: var(--begateway-logo-h) !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.footer__payments .begateway-payment-logos__item,
.footer__payments .begateway-payment-logos__img {
  max-height: none;
}

.footer__payments .begateway-payment-logos__img {
  max-height: var(--begateway-logo-h) !important;
}
