/* ============================================================
   Трейдинг Pro — страница оплаты (Heleket) и страница «Спасибо»
   Подключается после css/style.css и css/legal.css
   ============================================================ */
.pay{
  --p-accent: var(--accent, #2f7cf6);
  --p-line: var(--border, color-mix(in srgb, currentColor 14%, transparent));
  --p-muted: var(--muted, color-mix(in srgb, currentColor 62%, transparent));
  --p-card: var(--card, color-mix(in srgb, currentColor 4%, transparent));
  --p-ok: #1fae6f;
  --p-warn: #e5484d;
  padding: 40px 0 72px;
}
.pay-head{ margin-bottom: 26px; }
.pay-head .crumbs{ font-size: 14px; color: var(--p-muted); margin-bottom: 10px; }
.pay-head .crumbs a{ color: inherit; text-decoration: none; }
.pay-head h1{ margin: 0 0 8px; line-height: 1.15; }
.pay-head p{ margin: 0; color: var(--p-muted); }

.pay-grid{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 28px; align-items: start; }

.pay-card{ border: 1px solid var(--p-line); border-radius: 18px; background: var(--p-card); padding: 26px; }
.pay-card h2{ margin: 0 0 16px; font-size: 1.15em; }

/* Сводка заказа */
.order-top{ display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--p-line); }
.order-name b{ display: block; font-size: 18px; }
.order-name span{ font-size: 14px; color: var(--p-muted); }
.order-price{ font-size: 30px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-price small{ font-size: 15px; font-weight: 600; margin-left: 4px; }
.order-list{ list-style: none; margin: 16px 0 0; padding: 0; }
.order-list li{ position: relative; padding: 6px 0 6px 28px; }
.order-list li::before{
  content: ""; position: absolute; left: 0; top: 10px; width: 16px; height: 16px; border-radius: 50%;
  background: color-mix(in srgb, var(--p-ok) 18%, transparent);
}
.order-list li::after{
  content: ""; position: absolute; left: 5px; top: 13px; width: 6px; height: 9px;
  border: solid var(--p-ok); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.order-foot{ margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--p-line); font-size: 14px; color: var(--p-muted); }

/* Шаги */
.steps{ list-style: none; margin: 26px 0 0; padding: 0; counter-reset: s; }
.steps li{ counter-increment: s; position: relative; padding: 0 0 18px 46px; }
.steps li::before{
  content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: color-mix(in srgb, var(--p-accent) 15%, transparent); color: var(--p-accent);
}
.steps li:not(:last-child)::after{ content: ""; position: absolute; left: 14.5px; top: 34px; bottom: 4px; width: 1px; background: var(--p-line); }
.steps b{ display: block; margin-bottom: 2px; }
.steps span{ font-size: 14px; color: var(--p-muted); line-height: 1.5; }

/* Блок оформления */
.checkout{ position: sticky; top: 90px; }
.checkout .total{ display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.checkout .total > span{ color: var(--p-muted); }
.checkout .total b{ font-size: 26px; font-variant-numeric: tabular-nums; }
.checkout .hint{ font-size: 13px; color: var(--p-muted); text-align: right; margin: 0 0 18px; }

.coins-label{ font-size: 13px; color: var(--p-muted); margin: 0 0 8px; }
.coins{ display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.coins li{ font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--p-line); border-radius: 999px; white-space: nowrap; }
.coins li.main{ border-color: var(--p-ok); color: var(--p-ok); font-weight: 600; }

.pay-agree{ display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; margin: 0 0 16px; }
.pay-agree input{ width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--p-accent); cursor: pointer; }
.pay-agree a{ color: var(--p-accent); }

.pay-btn{
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box;
  padding: 16px 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--p-accent); color: #fff; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  transition: filter .15s, opacity .15s;
}
.pay-btn:hover{ filter: brightness(1.08); }
.pay-btn.is-disabled{ opacity: .45; cursor: not-allowed; filter: none; }
.pay-btn svg{ width: 18px; height: 18px; flex: none; }

.pay-warn, .pay-nolink{ margin: 10px 0 0; font-size: 13px; color: var(--p-warn); }
.secure{ display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--p-muted); }
.secure svg{ width: 15px; height: 15px; }
.secure b{ color: #e8173c; letter-spacing: .01em; }

.pay-notes{ margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--p-accent) 7%, transparent); font-size: 13.5px; line-height: 1.55; }
.pay-notes ul{ margin: 0; padding-left: 18px; }
.pay-notes li{ margin: 3px 0; }

.pay-help{ margin-top: 16px; text-align: center; font-size: 14px; color: var(--p-muted); }
.pay-help a{ color: var(--p-accent); }

/* Мини-FAQ */
.pay-faq{ margin-top: 40px; }
.pay-faq h2{ margin: 0 0 14px; }
.pay-faq details{ border: 1px solid var(--p-line); border-radius: 12px; margin: 0 0 10px; background: var(--p-card); }
.pay-faq summary{ cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; font-weight: 600; position: relative; }
.pay-faq summary::-webkit-details-marker{ display: none; }
.pay-faq summary::after{ content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--p-accent); transition: transform .2s; }
.pay-faq details[open] summary::after{ transform: translateY(-50%) rotate(45deg); }
.pay-faq details > div{ padding: 0 18px 14px; color: var(--p-muted); line-height: 1.55; }
.pay-faq details > div a{ color: var(--p-accent); }

/* Страница «Спасибо» */
.thanks{ max-width: 620px; margin: 0 auto; text-align: center; }
.thanks .ok{
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--p-ok) 16%, transparent); color: var(--p-ok);
}
.thanks .ok svg{ width: 34px; height: 34px; }
.thanks h1{ margin: 0 0 10px; }
.thanks > p{ color: var(--p-muted); margin: 0 0 24px; }
.thanks .pay-card{ text-align: left; }
.thanks .steps{ margin-top: 0; }
.thanks .cta-row{ display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }

@media (max-width: 900px){
  .pay-grid{ grid-template-columns: 1fr; }
  .checkout{ position: static; order: -1; }
}
@media (max-width: 520px){
  .pay{ padding: 24px 0 48px; }
  .pay-card{ padding: 20px; border-radius: 16px; }
  .order-price{ font-size: 24px; }
}

/* ---------- Заголовок страницы по центру ---------- */
.pay-head{ text-align: center; margin-bottom: 32px; }
.pay-head p{ max-width: 620px; margin: 0 auto; }

/* ---------- Акция запуска ---------- */
.old-price{
  color: var(--p-muted, #8a93a6); font-weight: 500; font-size: .62em; margin-right: 8px;
  text-decoration-thickness: 2px; text-decoration-color: #e5484d;
}
.order-price .old-price{ font-size: .6em; }
.promo{
  position: relative; margin: 0 0 20px; padding: 14px 16px 12px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, #f5a524 45%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, #f5a524 14%, transparent), color-mix(in srgb, #e5484d 8%, transparent));
}
.promo-top{ display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.promo-top b{ font-size: 15px; }
.promo-badge{
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: linear-gradient(135deg, #f5a524, #e5484d); color: #fff; letter-spacing: .02em;
}
.promo p{ margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; }
.promo p b{ white-space: nowrap; }
.promo .promo-timer{ margin: 0; font-size: 13px; color: var(--p-muted, #8a93a6); }
.promo .promo-timer b{ color: #f5a524; font-variant-numeric: tabular-nums; }

/* Главная: цена в блоке «Полный доступ» */
.price .promo-price{ display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.price .promo-price .now{ font-size: 2.4em; line-height: 1.1; }
.price .promo-price .old-price{ font-size: 1.3em; }
.price .promo{ max-width: 460px; margin: 14px auto 18px; text-align: left; --p-muted: color-mix(in srgb, currentColor 65%, transparent); }

/* ---------- Совместимость со style.css (там есть старый класс .pay с сеткой) ---------- */
main.pay{ display: block; grid-template-columns: none; }
.pay-head .crumbs{ text-align: center; }
.pay-head h1{ font-size: clamp(1.9rem, 4.6vw, 3rem); }

/* ---------- Цены: старая 50 — крупно и зачёркнута, новая 25 — меньше ---------- */
.order-price, .checkout .total b{ display: flex; flex-direction: column; align-items: flex-end; gap: 2px; line-height: 1.1; }
.old-price{
  font-size: 30px !important; font-weight: 800; color: inherit; margin: 0; white-space: nowrap;
  text-decoration-line: line-through; text-decoration-thickness: 3px; text-decoration-color: #e5484d;
}
.new-price{ font-size: 18px; font-weight: 800; color: var(--acc2, #22d3ee); white-space: nowrap; }
.old-price[hidden] + .new-price{ font-size: 30px; color: inherit; }  /* после акции — обычная цена крупно */

/* Главная */
.price .promo-price{ flex-direction: column; align-items: center; gap: 4px; }
.price .promo-price .old-price{ font-size: 1em !important; color: var(--acc2); }
.price .promo-price .now{ font-size: .5em; color: var(--ink, #fff); }
.price .promo-price .old-price[hidden] + .now{ font-size: 1em; color: var(--acc2); }

/* Аккаунт покупателя на странице оплаты */
.pay-acc{ margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.5;
  background: color-mix(in srgb, var(--p-accent, #3b82f6) 10%, transparent); border: 1px solid color-mix(in srgb, var(--p-accent, #3b82f6) 30%, transparent); word-break: break-word; }
.pay-acc a{ color: var(--acc2, #22d3ee); }
.pay-locked{ margin: 0 auto 22px; max-width: 760px; text-align: center; padding: 12px 16px; border-radius: 12px; font-weight: 600;
  background: color-mix(in srgb, #f59e0b 14%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); }

.steps span a{ color: var(--acc2, #22d3ee); }

/* Живой статус оплаты на success.html */
[data-live]{ margin: 0 0 22px; }
.live{ display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-radius: 14px; text-align: center;
  border: 1px solid var(--p-line, rgba(127,127,127,.25)); background: color-mix(in srgb, var(--p-accent, #3b82f6) 8%, transparent); }
.live b{ font-size: 1.05rem; } .live span{ color: var(--p-muted, #8ea3c9); font-size: .92rem; line-height: 1.5; }
.live .btn{ margin-top: 6px; }
.live.live-ok{ background: color-mix(in srgb, #22c55e 14%, transparent); border-color: color-mix(in srgb, #22c55e 45%, transparent); }
.live.live-bad{ background: color-mix(in srgb, #f43f5e 12%, transparent); border-color: color-mix(in srgb, #f43f5e 40%, transparent); }
.live.live-warn{ background: color-mix(in srgb, #f59e0b 12%, transparent); border-color: color-mix(in srgb, #f59e0b 40%, transparent); }
.live .spin{ width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--p-accent, #3b82f6) 25%, transparent); border-top-color: var(--p-accent, #3b82f6); animation: tpspin 1s linear infinite; }
@keyframes tpspin{ to{ transform: rotate(360deg); } }
