/* Shared styling for snippets/payment-trust-badges.liquid - used on the
   homepage trust bar and in the footer, so both read from one source. */

.payment-trust__ssl {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Subtle glassmorphism: light tint + light blur + a thin top highlight,
   not a heavy frosted-glass effect. */
.payment-trust__lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  /* Drawn from the text colour around it, not from a brand colour: whatever
     the section behind is (a purple footer, a dark look), the text there is
     already chosen to read on it, so the badge reads too. */
  background-color: color-mix(in srgb, currentColor 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.payment-trust__lock svg {
  width: 1.05rem;
  height: 1.05rem;
  color: currentColor;
}

.payment-trust__ssl-text {
  font-size: var(--fs-small);
  font-weight: 400;
  color: inherit;
  white-space: nowrap;
}

.payment-trust__icons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

/* ── the tile every mark sits on ────────────────────────────────────────────
 *
 * Each logo gets an identical white box and is fitted inside it.
 *
 * Laying these out by their own widths does not work, and evening up the grid
 * underneath does not fix it: Visa is a wide wordmark, Diners Club is a circle
 * and Mastercard is two circles stacked over a word, so at a common *height*
 * they come out at wildly different widths and the gaps between them read as
 * uneven even when they are mathematically identical. A common box is what
 * makes six different shapes look like one row.
 *
 * `object-fit: contain` inside the padding means no logo is ever cropped or
 * stretched — each one settles at whatever size fits, which is exactly how the
 * schemes ask to be shown.
 */
.pay-mark {
  --pay-mark-h: 1.6rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: var(--pay-mark-h);
  /* 1.55:1 — a card's proportions, and wide enough for the Visa wordmark to
     sit at a readable size without the round marks looking lost. */
  inline-size: calc(var(--pay-mark-h) * 1.55);
  padding: 0.2em 0.28em;
  /* Always the scheme's full-colour mark on white, as their brand guidelines
     ask — never a chip tinted from the page, which is how a dark look turned
     these into navy tiles with navy logos. The edge follows the surrounding
     text colour: a hairline on a light section, a pale rim on a dark or
     saturated one, so the white tile is bounded either way. */
  background: #fff;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 0.35em;
  flex: 0 0 auto;
}

.pay-mark__art {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  display: block;
  /* The artwork is the scheme's, not ours to recolour or drag off the page. */
  user-select: none;
  -webkit-user-drag: none;
}

.payment-trust__icon {
  --pay-mark-h: 1.7rem;
}

@media screen and (max-width: 749px) {
  .payment-trust__icons {
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .payment-trust__icon {
    --pay-mark-h: 1.35rem;
  }
}
