/* =========================================
   PAYMENT METHOD WRAPPER 
========================================= */

ul.wc_payment_methods.payment_methods.methods li {
  margin-bottom: 1rem !important;
}

#montypay-iframe-container {
  width: 100% !important;
}

.wc_payment_method {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.wc_payment_method>input[type="radio"] {
  flex: 0 0 auto !important;
  margin-right: 8px !important;
  vertical-align: middle !important;
}

.wc_payment_method>label {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 95% !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

[class^="payment_method_montypay_"]>div,
[class*=" payment_method_montypay_"]>div {
  flex: 0 0 100% !important;
}

.montypay-content {
  flex: 0 0 100% !important;
  text-align: center !important;
  padding: 12px 0 4px;
}

/* Description text — shared by blocks (<p> inside .montypay-content)
   and classic checkout (.mp-desc class on the PHP description div) */
.montypay-content p,
.mp-desc {
  font-style: italic;
  font-size: 0.9rem;
  color: #555;
  margin: 0 auto 8px;
  text-align: center;
}


/* =========================================
   CARD ICONS 
========================================= */
.card-form {
  max-width: 540px;
  width: 100%;
}

.cardIconsContainer {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

/* Every brand sits in an identical cell. With width:auto each logo took its own
   SVG aspect ratio, so the strip changed shape depending on which brands a
   method had enabled — which is why two methods never looked alike. */
.cardIconsContainer img {
  height: 24px !important;
  width: 36px !important;
  object-fit: contain !important;
  border-radius: 4px !important;
  display: block !important;
  margin: 0 !important;
}

/* The old .MontyPayLogo rules were removed: no markup used that class any more.
   The "Powered By" block is styled by .powered-by / .montypay-logo below. */

/* =========================================
   +X TOOLTIP
========================================= */

.WP-tooltip-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.mp-more {
  width: 38px;
  height: 24px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================
   TOOLTIP PANEL
========================================= */

/* Flex rather than a fixed 3-column grid: the grid reserved three columns no
   matter how many icons there were, so a one-icon panel and a two-icon panel
   came out different widths. The panel now hugs its contents and wraps after
   three, identically for every payment method. */
.WP-tooltip {
  position: absolute;
  top: 34px;
  right: 0;
  background: #111;
  padding: 10px;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  width: max-content;
  max-width: 152px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: all 0.18s ease-out;
}

.WP-tooltip-wrapper:hover .WP-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.WP-tooltip::after {
  content: "";
  position: absolute;
  top: -8px;
  right: 11px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #111 transparent;
}

/* Same uniform cell as the inline strip. The old rule combined the grid gap
   with a per-image right margin, so spacing differed between the first icon,
   the last icon and a wrapped row. Spacing now comes from the flex gap alone. */
.WP-tooltip img {
  height: 24px !important;
  width: 36px !important;
  object-fit: contain !important;
  background: #fff;
  padding: 3px !important;
  margin: 0 !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
}

.mp-form-control:focus {
  border-color: #243e87b8 !important;
  border-width: 2px;
  /* ← increases border size */
  box-shadow: none !important;
  outline: none !important;
}

.card-icons {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.card-icons img {
  margin: 0px !important;
}

.card-icon {
  height: 18px;
  width: auto;
}

/* MOBILE */
@media (max-width: 768px) {
  .card-icons img:not(#card_icon_mobile) {
    display: none !important;
  }

  .desktop-icon {
    display: none !important;
  }
}

.powered-by {
  margin-top: 20px !important;
  font-size: 13px !important;
}

.montypay-logo {
  height: 25px !important;
  width: auto !important;
  display: inline-block !important;
}