/* Экран «Оплата» (18.11.2026): один экран на покупку, продление и устройства.
   Сверху — карточка «после оплаты» со счётчиком «− N +» (глаз циклона), ниже —
   срок, из чего сумма, промокод, способ оплаты; внизу — панель с итогом.
   Все классы с префиксом pz- — чтобы не задеть остальной кабинет. Тема — как у
   всего кабинета: [data-theme="light"] (ставит /static/theme.js). */

:root {
  --pz-muted: #8B92A3;
  --pz-accent-text: #8AB4FF;
  --pz-grad: linear-gradient(120deg, #3B82F6, #8B5CF6);
  --pz-grad-strong: linear-gradient(120deg, #2563EB 0%, #5B4BEA 55%, #7C3AED 100%);
  --pz-ok-text: #4BE39A;
  --pz-danger: #FF6B79;
  --pz-opt-bg: var(--surface);
  --pz-opt-on-bg: #141B2E;
  --pz-card-shadow: 0 18px 48px rgba(0, 0, 0, .45);
  --pz-bar-bg: rgba(10, 12, 17, .84);
}
:root[data-theme="light"] {
  --pz-muted: #626979;
  --pz-accent-text: #2156D9;
  --pz-ok-text: #0F7F4E;
  --pz-danger: #D42E40;
  --pz-opt-bg: #FFFFFF;
  --pz-opt-on-bg: #F3F6FF;
  --pz-card-shadow: 0 18px 40px rgba(30, 40, 90, .22);
  --pz-bar-bg: rgba(242, 243, 247, .88);
}

.pz { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }

/* ───────── карточка результата ───────── */
.pz-cfg {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-xl); padding: 18px 18px 20px; color: #fff; text-align: center;
  background:
    radial-gradient(110% 80% at 100% 0%, var(--hero-b) 0%, transparent 58%),
    radial-gradient(120% 110% at 0% 100%, var(--hero-a) 0%, transparent 62%),
    var(--hero-c);
  box-shadow: var(--pz-card-shadow);
}
.pz-cfg::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}
.pz-swirl {
  position: absolute; z-index: -1; left: calc(50% - 190px); top: calc(50% - 190px); width: 380px; height: 380px;
  color: #CFE6FF; opacity: .15; animation: pz-swirl 120s linear infinite; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle, #000 55%, transparent 72%);
}
.pz-glow {
  position: absolute; z-index: -1; left: 50%; top: 96px; width: 220px; height: 140px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(125, 180, 255, .30), transparent); filter: blur(6px);
  pointer-events: none;
}
@keyframes pz-swirl { to { transform: rotate(-360deg); } }

.pz-top { display: flex; justify-content: center; }
.pz-status {
  display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 4px 12px 4px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .13); font-size: 13px; font-weight: 550; line-height: 1.25;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pz-status__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 214, 140, .25); }
.pz-status.is-warn .pz-status__dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 181, 71, .25); }
.pz-status.is-off .pz-status__dot { background: #FF6B79; box-shadow: 0 0 0 3px rgba(255, 92, 108, .25); }
.pz-status.is-none .pz-status__dot { background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }

.pz-dial {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center;
  margin: 14px -2px 0;
}
.pz-glass {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 6px 18px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .14s var(--ease), background-color .2s, opacity .2s;
  touch-action: manipulation;
}
.pz-glass:active { transform: scale(.9); background: rgba(255, 255, 255, .22); }
.pz-glass[disabled] { opacity: .32; pointer-events: none; }
.pz-glass:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.pz-num { justify-self: center; display: inline-grid; cursor: text; }
.pz-num > * { grid-area: 1 / 1; }
.pz-num__sizer, .pz-num__input {
  font: 700 96px/1 var(--font); letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  padding: 0 .04em; min-width: .62em;
}
.pz-num__sizer { visibility: hidden; white-space: pre; }
.pz-num__input {
  width: 100%; border: 0; outline: 0; background: transparent; color: #fff; text-align: center;
  caret-color: #9CC3FF; -webkit-appearance: none; appearance: none; border-radius: 16px;
  text-shadow: 0 6px 30px rgba(120, 170, 255, .35);
}
.pz-num__input:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.pz-num.is-bump .pz-num__input { animation: pz-bump .32s var(--ease); }
@keyframes pz-bump { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }

.pz-unit {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 26px; margin-top: -2px;
  font-size: 17px; font-weight: 550; letter-spacing: -.005em; color: rgba(255, 255, 255, .88);
}
.pz-delta {
  height: 24px; min-width: 24px; padding: 0 8px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: #fff; color: #1E3A8A; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.pz-delta.is-minus { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }

.pz-pips { display: flex; justify-content: center; gap: 5px; height: 6px; margin: 14px auto 0; }
.pz-pip { width: 18px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .88); transition: background-color .25s, box-shadow .25s; }
.pz-pip.is-new { background: #8FE3FF; box-shadow: 0 0 10px rgba(143, 227, 255, .8); }
.pz-pip.is-gone { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.pz-pips.is-many { -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }

.pz-line { height: 1px; margin: 18px 6px 12px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent); }
.pz-after { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.pz-date { margin-top: 4px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.pz-date .pre { font-weight: 450; opacity: .75; }
.pz-note {
  display: flex; align-items: flex-start; justify-content: center; gap: 7px; margin: 10px auto 0; max-width: 330px;
  font-size: 13.5px; color: rgba(255, 255, 255, .84); line-height: 1.4; text-align: left;
}
.pz-note svg { margin-top: 1px; }
.pz-swap { animation: pz-swapin .32s var(--ease); }
@keyframes pz-swapin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ───────── секции ───────── */
.pz-sec { margin-top: 26px; }
.pz-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pz-sec__title { margin: 0 4px 12px; font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: -.005em; }
.pz-sec__aside { margin: 0 4px 12px; font-size: 13px; color: var(--pz-muted); font-variant-numeric: tabular-nums; text-align: right; }

/* сроки */
.pz-terms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.pz-opt {
  position: relative; grid-column: span 2; text-align: left; min-height: 84px;
  padding: 12px 12px 11px 13px; border-radius: 18px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--pz-opt-bg); box-shadow: inset 0 0 0 1px var(--line); border: 2px solid transparent;
  transition: transform .14s var(--ease), box-shadow .2s, background-color .2s;
}
.pz-opt.is-wide4 { grid-column: span 3; }
/* цены на одной высоте во всех плитках ряда (у «1 месяц» нет строки выгоды) */
.pz-opt:not(.pz-opt--wide) { justify-content: flex-start; }
/* долгие сроки — выделены: лёгкая подсветка бренда и бейдж выгоды */
.pz-opt.is-long { background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(139, 92, 246, .12)), var(--pz-opt-bg); }
.pz-opt__name { display: flex; align-items: center; gap: 6px; }
.pz-save {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums;
  background: rgba(61, 214, 140, .14); color: var(--pz-ok-text);
}
.pz-opt.is-long .pz-save { background: var(--pz-grad); color: #fff; }
/* у 3 и 6 месяцев — скромнее: строка внизу плитки, без плашки */
.pz-opt__save { display: block; margin-top: 3px; font-size: 12px; font-weight: 650; color: var(--pz-ok-text); white-space: nowrap; }
.pz-opt:active { transform: scale(.975); }
.pz-opt__name { font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pz-opt__price { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 6px; }
.pz-opt__sub { display: block; min-height: 1.3em; font-size: 12.5px; color: var(--pz-muted); font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.pz-opt > span { min-width: 0; }
.pz-opt__sub s { text-decoration-thickness: 1.5px; }
.pz-check {
  position: absolute; right: -7px; top: -7px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--pz-grad); box-shadow: 0 0 0 3px var(--bg);
  transform: scale(.4); opacity: 0; transition: transform .25s var(--ease), opacity .2s;
}
.pz-opt[aria-checked="true"], .pz-meth[aria-checked="true"] {
  background: linear-gradient(var(--pz-opt-on-bg), var(--pz-opt-on-bg)) padding-box, var(--pz-grad) border-box;
  box-shadow: 0 10px 26px rgba(76, 110, 245, .22);
}
.pz-opt[aria-checked="true"] .pz-opt__name { color: var(--pz-accent-text); }
.pz-opt[aria-checked="true"] .pz-check, .pz-meth[aria-checked="true"] .pz-check { transform: none; opacity: 1; }

.pz-opt--wide {
  grid-column: 1 / -1; min-height: 68px; flex-direction: row; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px;
}
.pz-opt--wide .pz-opt__icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--pz-accent-text);
}
.pz-opt--wide[aria-checked="true"] .pz-opt__icon { background: var(--pz-grad); color: #fff; }
.pz-opt--wide .pz-opt__body { flex: 1; min-width: 0; display: block; }
.pz-opt--wide .pz-opt__name { display: block; color: var(--text); font-size: 16px; }
.pz-opt--wide .pz-opt__sub { margin-top: 2px; font-size: 13px; color: var(--text-2); white-space: normal; }
.pz-opt--wide .pz-opt__price { margin: 0; font-size: 18px; text-align: right; }
.pz-opt--wide .pz-opt__price s { display: block; font-size: 12.5px; font-weight: 500; color: var(--pz-muted); text-decoration-thickness: 1.5px; }

/* из чего сумма */
.pz-bill { margin-top: 12px; padding: 6px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pz-bill__title { padding: 10px 0 4px; font-size: 13px; font-weight: 600; color: var(--pz-muted); }
.pz-bill__row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; font-size: 14.5px; color: var(--text-2); }
.pz-bill__row + .pz-bill__row { border-top: 1px solid var(--line); }
.pz-bill__row > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); font-weight: 600; }
.pz-bill__row.is-minus > span:last-child { color: var(--pz-ok-text); }
.pz-bill__sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--pz-muted); }

/* промокод */
.pz-promo { margin-top: 12px; }
.pz-link {
  display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 6px; margin-left: -2px;
  color: var(--pz-accent-text); font-size: 15px; font-weight: 600; border-radius: 12px;
}
.pz-link:active { background: var(--accent-soft); }
.pz-promo__row { display: flex; gap: 8px; }
.pz-promo__input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 0; outline: 0; border-radius: 15px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text);
  font-size: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.pz-promo__input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 450; color: var(--pz-muted); }
.pz-promo__input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.pz-promo__input.is-bad { box-shadow: inset 0 0 0 2px var(--pz-danger); }
.pz-promo__apply {
  flex: none; height: 52px; padding: 0 18px; border-radius: 15px; font-weight: 600; font-size: 15.5px;
  background: var(--surface-3); color: var(--text);
}
.pz-promo__apply.is-busy { opacity: .6; pointer-events: none; }
.pz-promo__err { display: flex; align-items: flex-start; gap: 7px; margin: 9px 4px 0; font-size: 13.5px; color: var(--pz-danger); line-height: 1.35; }
.pz-promo__err svg { margin-top: 1px; }
.pz-promo__chip {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 2px 0 14px; border-radius: 15px;
  background: rgba(61, 214, 140, .12); color: var(--pz-ok-text); font-weight: 600; font-size: 15px;
}
.pz-promo__chip b { letter-spacing: .04em; font-weight: 700; }
.pz-promo__chip span { color: var(--text); font-weight: 550; }
.pz-promo__x { width: 44px; height: 44px; margin: -2px 0; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); }
.pz-promo__x:active { background: rgba(127, 127, 127, .15); }

/* способ оплаты */
.pz-meths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pz-meths.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pz-meth {
  position: relative; min-height: 80px; padding: 13px 10px 11px 12px; border-radius: 18px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  background: var(--pz-opt-bg); box-shadow: inset 0 0 0 1px var(--line); border: 2px solid transparent;
  transition: transform .14s var(--ease), box-shadow .2s;
}
.pz-meth:active { transform: scale(.975); }
.pz-meth__name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.pz-mi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.pz-mi--stars { color: #fff; background: linear-gradient(135deg, #F7B733, #F0761F); }
.pz-mi--wallet { color: #fff; background: var(--pz-grad); }
.pz-meth[aria-checked="true"] .pz-mi:not(.pz-mi--stars) { background: var(--accent-soft); color: var(--pz-accent-text); }
.pz-paywith {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px 10px 10px; border-radius: 18px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.pz-paywith .pz-mi { width: 40px; height: 40px; border-radius: 12px; }
.pz-paywith__body { flex: 1; min-width: 0; }
.pz-paywith__name { font-size: 16px; font-weight: 600; }
.pz-paywith__sub { font-size: 13px; color: var(--text-2); margin-top: 1px; font-variant-numeric: tabular-nums; }
.pz-paywith__val { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-note2 { margin: 10px 4px 0; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.pz-msg {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 18px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 14.5px; line-height: 1.45;
}
.pz-msg > svg { color: var(--text-3); margin-top: 1px; }
.pz-msg--col { flex-direction: column; }
.pz-sk { height: 80px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); animation: pz-pulse 1.4s ease-in-out infinite; }
@keyframes pz-pulse { 50% { opacity: .55; } }

.pz-legal { margin: 22px 12px 0; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--pz-muted); }
.pz-legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }

/* ───────── панель внизу ───────── */
.pz-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  transform: translateY(110%); transition: transform .34s var(--sheet-ease);
}
.pz-bar.is-on { transform: none; }
.pz-bar__in {
  max-width: 460px; margin: 0 auto;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--pz-bar-bg); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 -1px 0 var(--line);
}
@media (min-width: 461px) { .pz-bar__in { border-radius: 22px 22px 0 0; } }
.pz-result {
  min-height: 20px; margin-bottom: 9px; line-height: 1.4;
  font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; text-align: center;
}
.pz-result b { color: var(--text); font-weight: 600; }
.pz-pay {
  position: relative; overflow: hidden; width: 100%; height: 58px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  color: #fff; font-size: 17px; font-weight: 650; letter-spacing: -.005em;
  background: var(--pz-grad-strong);
  box-shadow: 0 10px 28px rgba(76, 90, 245, .38), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .15s var(--ease), filter .2s, opacity .2s;
}
.pz-pay:active { transform: scale(.985); filter: brightness(.94); }
.pz-pay[disabled] { opacity: .55; pointer-events: none; box-shadow: none; }
.pz-pay__sum { font-variant-numeric: tabular-nums; }
.pz-pay.is-dim .pz-pay__sum { opacity: .6; }
.pz-pay::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .18), transparent);
  transform: skewX(-18deg); animation: pz-sheen 5.5s ease-in-out infinite 1.2s;
}
@keyframes pz-sheen { 0%, 70% { left: -40%; } 100% { left: 130%; } }
.pz-pay.is-busy > span { visibility: hidden; }
.pz-pay.is-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: pz-spin .8s linear infinite;
}
@keyframes pz-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .pz-swirl, .pz-pay::before, .pz-swap, .pz-num.is-bump .pz-num__input { animation: none !important; }
  .pz-bar { transition: none; }
}
