/* Сейф Ломбард — экраны платёжного потока (черновик 2026-09-24)
   payment-confirm, payment-card-add, payment-3ds, payment-success, payment-failed, payment-pending, payment-receipt */

.fl { padding: 8px 20px 32px; }

/* --- Сводка операции --- */
.fl-summary {
  padding: 18px 16px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.fl-summary__ticket {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.fl-summary__op {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.fl-summary__item {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* --- Секция и строки --- */
.fl-section { margin-top: 20px; }

.fl-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.fl-card {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.fl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--font-size-sm);
}

.fl-row:last-child { border-bottom: none; }
.fl-row__label { color: var(--color-text-secondary); }
.fl-row__value { font-weight: var(--font-weight-medium); text-align: right; }
.fl-row__value--accent { color: var(--color-accent-deep); }
.fl-row__value--muted { color: var(--color-text-muted); font-weight: var(--font-weight-normal); }
.fl-row__value--old { text-decoration: line-through; color: var(--color-text-muted); margin-right: 6px; font-weight: var(--font-weight-normal); }

.fl-row--total {
  background: var(--color-bg-secondary);
  padding: 14px 16px;
}

.fl-row--total .fl-row__label { color: var(--color-text); font-weight: var(--font-weight-semibold); }
.fl-row--total .fl-row__value { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); letter-spacing: -0.02em; }

/* Строка-ссылка (способ оплаты → изменить) */
a.fl-row { text-decoration: none; color: inherit; transition: background var(--transition); }
a.fl-row:hover { background: var(--color-bg-secondary); }

.fl-method {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.fl-method__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.fl-method__logo--kaspi { background: #f14635; color: #fff; }
.fl-method__logo--card { background: var(--color-ink); color: #fff; font-size: 10px; letter-spacing: 0.04em; }
.fl-method__logo--wallet { background: var(--color-bg-tertiary); color: var(--color-text); }
.fl-method__title { font-size: var(--font-size-base); font-weight: var(--font-weight-medium); }
.fl-method__sub { font-size: var(--font-size-xs); color: var(--color-text-muted); margin-top: 1px; }
.fl-chevron svg { width: 16px; height: 16px; color: var(--color-text-muted); }

/* --- Согласие и кнопка --- */
.fl-consent { margin-top: 20px; }
.fl-cta { margin-top: 16px; }
.fl-note {
  margin-top: 12px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

/* --- Прототип: выбор исхода --- */
.fl-dev {
  margin-top: 28px;
  padding: 12px 14px;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.fl-dev__label { font-size: var(--font-size-xs); color: var(--color-text-muted); margin-bottom: 8px; }
.fl-dev__seg { display: flex; gap: 6px; }

.fl-dev__btn {
  flex: 1;
  padding: 8px 4px;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.fl-dev__btn--active { border-color: var(--color-ink); background: var(--color-ink); color: #fff; }

/* --- Ввод карты --- */
.fl-cardpreview {
  position: relative;
  height: 150px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1f1f1f, #3a3a3a);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 20px;
  overflow: hidden;
}

.fl-cardpreview::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 188, 0, 0.25);
}

.fl-cardpreview__brand { font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); letter-spacing: 0.08em; opacity: 0.9; position: relative; }
.fl-cardpreview__num { font-size: 19px; font-weight: var(--font-weight-semibold); letter-spacing: 0.12em; font-variant-numeric: tabular-nums; position: relative; }
.fl-cardpreview__meta { display: flex; justify-content: space-between; font-size: var(--font-size-xs); opacity: 0.8; position: relative; }

.fl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.fl-switchrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
}

.fl-switchrow small { display: block; font-size: var(--font-size-xs); color: var(--color-text-muted); margin-top: 2px; }

/* --- Экран ожидания и результата --- */
.fl-center {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 0;
}

.fl-center__icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--color-bg-secondary);
  animation: pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.fl-center__icon svg { width: 40px; height: 40px; }
.fl-center__icon--success { background: var(--color-success-bg); color: var(--color-success); }
.fl-center__icon--error { background: var(--color-error-bg); color: var(--color-error); }
.fl-center__icon--pending { background: var(--color-warning-bg); color: var(--color-accent-deep); }
.fl-center__icon--wait { background: var(--color-bg-secondary); }
.fl-center__icon--wait .spinner { width: 40px; height: 40px; border-width: 4px; }

.fl-center__title { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); letter-spacing: -0.02em; }
.fl-center__amount { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); letter-spacing: -0.03em; margin-top: 8px; }
.fl-center__text { font-size: var(--font-size-base); color: var(--color-text-secondary); line-height: 1.5; margin-top: 8px; max-width: 300px; }
.fl-center__timer { font-size: var(--font-size-sm); color: var(--color-text-muted); margin-top: 16px; font-variant-numeric: tabular-nums; }

.fl-result { padding-top: 40px; }
.fl-result .fl-card { width: 100%; margin-top: 24px; text-align: left; }
.fl-actions { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }

@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* --- Квитанция --- */
.fl-receipt {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  position: relative;
}

.fl-receipt::before,
.fl-receipt::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  border-top: 1.5px dashed var(--color-border);
}

.fl-receipt::before { top: 96px; }
.fl-receipt__head { text-align: center; padding-bottom: 20px; }
.fl-receipt__logo { height: 26px; margin-bottom: 8px; }
.fl-receipt__org { font-size: var(--font-size-xs); color: var(--color-text-muted); line-height: 1.45; }
.fl-receipt__status {
  display: inline-block;
  margin: 18px 0 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}
.fl-receipt__amount { text-align: center; font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); letter-spacing: -0.03em; }
.fl-receipt__rows { margin-top: 16px; }
.fl-receipt__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: var(--font-size-sm); border-bottom: 1px solid var(--color-border-light); }
.fl-receipt__row:last-child { border-bottom: none; }
.fl-receipt__row span:first-child { color: var(--color-text-secondary); }
.fl-receipt__row span:last-child { font-weight: var(--font-weight-medium); text-align: right; }
.fl-receipt__foot { margin-top: 16px; text-align: center; font-size: var(--font-size-xs); color: var(--color-text-muted); line-height: 1.5; }

@media print {
  .header, .fl-actions, .toast-host, .offline-banner { display: none !important; }
  .fl-receipt { border: none; }
}
