/* Окно оплаты через банки (finik-pay.js).
 * Шапка с суммой → один вертикальный список банков. Телефон — лист снизу, компьютер — окно по
 * центру. Появление — плавное проявление (только opacity/transform).
 * Подсветки при наведении нет; при нажатии — лёгкое сжатие.
 * Цвета — из темы сайта (--card, --text, --accent). */
html.fp-lock, html.fp-lock body { overflow: hidden; }
/* Плавающие кнопки сайта не перекрывают окно. */
html.fp-lock #supportFab,
html.fp-lock .bottom-tabbar,
html.fp-lock #tgNudge { visibility: hidden !important; }

.fp-overlay {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(6, 8, 10, .6);
  opacity: 0; transition: opacity .34s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity; contain: layout paint;
}
.fp-overlay.is-open { opacity: 1; }
.fp-overlay.is-closing { transition-duration: .22s; }

.fp-sheet {
  --fp-line: color-mix(in srgb, var(--text) 8%, transparent);
  --fp-soft: color-mix(in srgb, var(--text) 3.5%, transparent);
  position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 20px);
  display: flex; flex-direction: column;
  background: var(--card); color: var(--text);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -1px 0 var(--fp-line), 0 -16px 48px rgba(0, 0, 0, .22);
  opacity: 0; transform: scale(.985);
  transition: opacity .38s cubic-bezier(.22, .61, .36, 1), transform .42s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform; backface-visibility: hidden;
}
.fp-overlay.is-open .fp-sheet { opacity: 1; transform: none; }
.fp-overlay.is-closing .fp-sheet { transition-duration: .2s; }

@media (min-width: 640px) {
  .fp-overlay { align-items: center; padding: 24px; }
  .fp-sheet { border-radius: 24px; max-height: min(760px, calc(100dvh - 48px)); box-shadow: 0 0 0 1px var(--fp-line), 0 30px 80px rgba(0, 0, 0, .3); transform: scale(.97); }
  .fp-grab { display: none; }
}

/* ── Шапка ── */
.fp-grab { flex-shrink: 0; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: color-mix(in srgb, var(--text) 16%, transparent); }
.fp-close {
  position: absolute; top: 14px; right: 14px; z-index: 1; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fp-soft); color: var(--text2); box-shadow: inset 0 0 0 1px var(--fp-line); transition: transform .12s;
}
.fp-close svg { width: 14px; height: 14px; }
.fp-close:active { transform: scale(.9); }
.fp-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fp-head { flex-shrink: 0; padding: 14px 56px 14px 22px; border-bottom: 1px solid var(--fp-line); }
.fp-title { font-size: 13px; font-weight: 600; color: var(--text3); letter-spacing: .01em; }
.fp-amount { margin-top: 1px; min-height: 38px; font-size: 32px; line-height: 38px; font-weight: 800; letter-spacing: -.025em; color: var(--text); font-variant-numeric: tabular-nums; }
.fp-cur { font-size: 20px; font-weight: 700; letter-spacing: 0; color: var(--text2); }
.fp-sub { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--text2); }

/* ── Список банков: один вертикальный список, крупные строки на всю ширину
 * (большая область нажатия), тонкие разделители. Прокручивается внутри окна,
 * шапка остаётся на месте. ── */
.fp-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 10px 12px 12px;
}
.fp-list { border-radius: 18px; background: var(--fp-soft); box-shadow: inset 0 0 0 1px var(--fp-line); overflow: hidden; }
.fp-bank {
  position: relative; display: flex; align-items: center; gap: 14px; min-width: 0;
  height: 60px; padding: 0 16px 0 12px;
  color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; cursor: pointer;
  transition: transform .14s ease, opacity .14s ease;
}
.fp-bank + .fp-bank::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--fp-line); }
.fp-bank:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 14px; }
.fp-logo {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--fp-line);
}
.fp-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fp-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; font-weight: 650; letter-spacing: -.005em; }
.fp-chev { flex-shrink: 0; width: 16px; height: 16px; color: var(--text3); }
/* Нажатие: лёгкое сжатие, без заливки; подсветки при наведении нет. */
.fp-bank:active { transform: scale(.985); opacity: .8; }

/* Ссылок нет / сбой. */
.fp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px 8px; text-align: center; font-size: 14px; line-height: 1.45; color: var(--text2); }
.fp-finik {
  width: 100%; height: 50px; margin: 16px 0 6px; border: 0; border-radius: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: none;
  background: var(--accent); color: #fff;
  transition: transform .12s;
}
.fp-finik:active { transform: scale(.98); }

@media (max-width: 360px) {
  .fp-head { padding-left: 18px; }
  .fp-body { padding-left: 8px; padding-right: 8px; }
  .fp-amount { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .fp-overlay, .fp-sheet { transition-duration: .01s; }
}
