/* Egypt payment-method picker (assets/js/pay-method.js).
 *
 * Night palette from get-started.css, so it sits on both the funnel and
 * the pricing page; the pricing page's light theme gets its own surface.
 * Its own tokens, so neither page's stylesheet can bend it. */

.pm {
  --pm-surface: #1A1E3A;
  --pm-opt: rgb(255 255 255 / 0.07);
  --pm-opt-hover: rgb(124 92 255 / 0.18);
  --pm-line: rgb(255 255 255 / 0.12);
  --pm-focus: #B8A8FF;
  --pm-text-1: #F3F1FF;
  --pm-text-2: #C5C2E0;
  --pm-text-3: #9C98BF;
  --pm-note: #34D399;

  width: min(420px, calc(100vw - 32px));
  max-width: none;
  /* Centred; style.css resets every margin to 0. */
  margin: auto;
  padding: 0;
  border: 1px solid var(--pm-line);
  border-radius: 20px;
  background: var(--pm-surface);
  color: var(--pm-text-1);
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.35), 0 18px 44px rgb(0 0 0 / 0.4), 0 0 40px rgb(124 92 255 / 0.14);
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  animation: pm-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Arabic: the funnel's pair (get-started.css), and no tracking. */
.pm[lang='ar'] { font-family: 'Tajawal', 'Space Grotesk', ui-sans-serif, system-ui, sans-serif; }
.pm[lang='ar'] .pm__title, .pm[lang='ar'] .pm__name { font-family: 'Baloo Bhaijaan 2', 'Nunito', ui-sans-serif, system-ui, sans-serif; }
.pm[lang='ar'] * { letter-spacing: 0; }
/* Brand names read left to right inside the Arabic line. */
.pm[lang='ar'] [data-sub='card'] { direction: ltr; text-align: end; }
.pm::backdrop { background: rgb(10 12 28 / 0.72); }

[data-theme='light'] .pm {
  --pm-surface: #FFFFFF;
  --pm-opt: #F4F2FF;
  --pm-opt-hover: #E9E4FF;
  --pm-line: rgb(15 18 38 / 0.12);
  --pm-focus: #5B3DF0;
  --pm-text-1: #1A1530;
  --pm-text-2: #3F3A5C;
  --pm-text-3: #6B6788;
  --pm-note: #047857;
}
[data-theme='light'] .pm::backdrop { background: rgb(15 18 38 / 0.5); }

.pm__box { position: relative; padding: 24px 20px 20px; }

.pm__title {
  margin: 0 36px 16px;
  text-align: center;
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--pm-text-1);
}

.pm__close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pm-text-3);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.pm__close:hover { color: var(--pm-text-1); background: var(--pm-opt); }

.pm__opt {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--pm-line);
  border-radius: 14px;
  background: var(--pm-opt);
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
@media (hover: hover) {
  .pm__opt:hover { background: var(--pm-opt-hover); border-color: var(--pm-focus); transform: translateY(-1px); }
}
.pm__opt:focus-visible, .pm__close:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }

.pm__name {
  display: block;
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--pm-text-1);
}
.pm__sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--pm-text-3); }
.pm__note { display: block; margin-top: 6px; font-size: 12px; color: var(--pm-note); }

@keyframes pm-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) {
  .pm { animation: none; }
  .pm__opt { transition: none; }
}
