.bs-payments {
  --pm-purple: #c597f1;
  --pm-violet: #7e3fdb;
}

/* Logo marquee: two rows drifting in opposite directions, faded at the edges. */
.pm-stage {
  position: relative;
  display: grid;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(126, 63, 219, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.025);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.pm-stage::after {
  /* Light sweep across the logos. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(197, 151, 241, 0.12) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: pm-sweep 6s ease-in-out infinite;
  pointer-events: none;
}
.pm-marquee { overflow: hidden; }
.pm-track { display: flex; width: max-content; animation: pm-scroll 38s linear infinite; }
.pm-marquee.is-reverse .pm-track { animation-direction: reverse; animation-duration: 44s; }
.pm-stage:hover .pm-track { animation-play-state: paused; }
.pm-set { display: flex; gap: 0.75rem; padding-right: 0.75rem; }

.pm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(126, 63, 219, 0.28);
  border-radius: 999px;
  background: rgba(14, 12, 32, 0.85);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.pm-chip svg { width: 1.25rem; height: 1.25rem; color: var(--pm-purple); filter: drop-shadow(0 0 6px rgba(155, 92, 240, 0.45)); }

/* Method cards */
.pm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.pm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.035);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1), transform 500ms cubic-bezier(0.22, 1, 0.36, 1), border-color 200ms ease, background 200ms ease;
  transition-delay: calc(var(--i) * 70ms), calc(var(--i) * 70ms), 0s, 0s;
}
.pm-card.is-in { opacity: 1; transform: none; }
.pm-card::before {
  /* Glow that follows the top edge on hover. */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(126, 63, 219, 0.28), transparent 65%);
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
}
.pm-card:hover { border-color: rgba(197, 151, 241, 0.3); background: rgba(255, 255, 255, 0.05); }
.pm-card:hover::before { opacity: 1; }

.pm-card-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.pm-icons { display: flex; }
.pm-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: -0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: #120f26;
  color: var(--pm-purple);
  transition: transform 250ms ease;
}
.pm-icon svg { width: 1.25rem; height: 1.25rem; }
.pm-card:hover .pm-icon { transform: translateY(-2px); }
.pm-card:hover .pm-icon:nth-child(2) { transition-delay: 40ms; }
.pm-card:hover .pm-icon:nth-child(3) { transition-delay: 80ms; }

.pm-fee {
  flex: none;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.pm-fee-good { color: #86efac; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.28); }
.pm-fee-cost { color: rgba(255, 255, 255, 0.75); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.pm-fee-info { color: var(--pm-purple); background: rgba(126, 63, 219, 0.12); border: 1px solid rgba(126, 63, 219, 0.3); }

.pm-name { position: relative; margin: 0.25rem 0 0; color: #fff; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.pm-how {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
  text-decoration: none;
}
a.pm-how { color: var(--pm-purple); }
a.pm-how svg { width: 0.9rem; height: 0.9rem; transition: transform 200ms ease; }
a.pm-how:hover svg, a.pm-how:focus-visible svg { transform: translateX(3px); }

@keyframes pm-scroll { to { transform: translateX(-50%); } }
@keyframes pm-sweep { 0%, 15% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

@media (max-width: 1023px) { .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  /* Two compact columns on phones rather than eight full-width cards. */
  .pm-grid { gap: 0.6rem; }
  .pm-card { gap: 0.5rem; padding: 0.9rem; border-radius: 1.1rem; }
  .pm-card-top { flex-wrap: wrap; row-gap: 0.5rem; }
  .pm-icon { width: 2rem; height: 2rem; border-radius: 0.75rem; }
  .pm-icon svg { width: 1rem; height: 1rem; }
  .pm-fee { padding: 0.2rem 0.5rem; font-size: 0.6875rem; }
  .pm-name { font-size: 0.875rem; }
  .pm-how { font-size: 0.75rem; }
  .pm-stage { margin-top: 1.75rem; padding: 0.9rem 0; border-radius: 1.1rem; }
  .pm-chip { padding: 0.5rem 0.85rem; font-size: 0.8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-track, .pm-stage::after { animation: none; }
  .pm-stage { -webkit-mask-image: none; mask-image: none; }
  .pm-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .pm-set[aria-hidden="true"], .pm-dup { display: none; }
  .pm-set { flex-wrap: wrap; justify-content: center; }
  .pm-card { opacity: 1; transform: none; transition: none; }
}
