/* ============================================================
   Общий CTA-блок виральных калькуляторов CoinKeeper
   Используется всеми калькуляторами (earnings-counter, financial-freedom,
   purchase-savings-calculator, regret-calculator).
   Зависит от CSS-переменных страницы (--orange, --ink, --yellow, ...).
   Логика: cta.js → читает window.CALC_CONFIG, рендерит в #cta-root.

   Единый «простой» паттерн:
     [ Поделиться результатом ]  (.btn-primary, шлёт картинку)
       строка-причина (.cta-reason)
     [ Установить CoinKeeper ]   (.btn-secondary)
   ============================================================ */

/* --- Две кнопки + причина между ними --- */
.cta-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.cta-actions .btn {
  font-family: inherit; font-size: 16px; font-weight: 800; padding: 16px 20px;
  border-radius: 999px; border: none; cursor: pointer; text-align: center; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cta-actions .btn:active { transform: scale(.98); }
.cta-actions .btn:disabled { opacity: .7; cursor: progress; }
.cta-actions .btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.cta-actions .btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255,121,31,.35); }
.cta-actions .btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.cta-actions .btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid rgba(30,40,87,.15); }
.cta-actions .btn-secondary:hover { background: rgba(30,40,87,.04); border-color: rgba(30,40,87,.3); }

.cta-reason {
  text-align: center; font-size: 15px; line-height: 1.5; font-weight: 500;
  color: var(--ink-3); margin: 2px 4px; padding: 0 4px;
}
.cta-reason strong { font-weight: 800; color: var(--orange-dark); }

/* --- Промо Platinum Plus --- */
.cta-platinum {
  margin-top: 28px; border-radius: var(--radius); padding: 24px 22px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff; box-shadow: 0 12px 34px rgba(30,40,87,.22);
  position: relative; overflow: hidden;
}
.cta-platinum::after {
  content: ""; position: absolute; top: -40%; right: -20%;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,121,31,.30) 0%, rgba(255,121,31,0) 70%);
  pointer-events: none;
}
.cta-plat-eyebrow {
  position: relative; display: inline-block; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; color: var(--yellow); margin-bottom: 12px;
}
.cta-plat-title { position: relative; font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.cta-plat-sub { position: relative; font-size: 14px; line-height: 1.55; font-weight: 500; color: rgba(255,255,255,.72); margin-top: 8px; }
.cta-plat-feats { position: relative; display: grid; gap: 12px; margin: 18px 0 20px; }
.cta-plat-feat { display: flex; align-items: flex-start; gap: 12px; }
.cta-plat-feat .cpf-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px;
  background: rgba(255,255,255,.10); display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.cta-plat-feat .cpf-body { min-width: 0; }
.cta-plat-feat .cpf-title { display: block; font-size: 15px; font-weight: 800; color: #fff; line-height: 1.3; }
.cta-plat-feat .cpf-hook { display: block; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.66); margin-top: 2px; line-height: 1.4; }
.cta-plat-cta {
  position: relative; width: 100%; font-family: inherit; font-size: 16px; font-weight: 800;
  padding: 16px 20px; border-radius: 999px; text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255,121,31,.35);
  transition: transform .12s ease, background .2s ease;
}
.cta-plat-cta:hover { background: var(--orange-dark); transform: translateY(-1px); }
.cta-plat-cta:active { transform: scale(.98); }

/* --- CTA 3: мини-сетка других калькуляторов --- */
.cta-cross { margin-top: 28px; }
.cta-cross-title {
  text-align: center; font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-bottom: 12px;
}
.cta-cross-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.cta-cross-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.cta-cross-card:hover { border-color: var(--orange); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(139,90,30,.10); }
.cta-cross-card .cc-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 13px;
  background: var(--orange-soft); display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.cta-cross-card .cc-body { min-width: 0; }
.cta-cross-card .cc-title { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.cta-cross-card .cc-hook { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.cta-cross-card .cc-arrow { margin-left: auto; flex-shrink: 0; color: var(--muted-2); font-weight: 800; font-size: 18px; }

/* --- Превью-шит (показываем картинку перед шерингом) --- */
.cta-preview-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(30,40,87,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.cta-preview-overlay.open { opacity: 1; pointer-events: auto; }
.cta-preview {
  background: var(--card); width: 100%; max-width: 480px;
  border-radius: 24px 24px 0 0; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)) 20px;
  box-shadow: 0 -10px 40px rgba(30,40,87,.20);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.22,1,.36,1);
}
.cta-preview-overlay.open .cta-preview { transform: translateY(0); }
.cta-preview [hidden] { display: none !important; }
.cta-preview-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 14px; }
.cta-preview-title { text-align: center; font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.cta-preview-stage {
  display: flex; align-items: center; justify-content: center;
  min-height: 220px; margin-bottom: 16px;
}
.cta-preview-img {
  max-height: 52vh; max-width: 70%; width: auto; height: auto;
  border-radius: 18px; box-shadow: 0 12px 30px rgba(30,40,87,.28); display: block;
}
.cta-preview-loader { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; font-weight: 700; }
.cta-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--orange); animation: cta-spin .7s linear infinite;
}
@keyframes cta-spin { to { transform: rotate(360deg); } }
.cta-preview-actions { display: flex; flex-direction: column; gap: 10px; }
.cta-preview-actions .btn {
  font-family: inherit; font-size: 16px; font-weight: 800; padding: 16px 20px;
  border-radius: 999px; border: none; cursor: pointer; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cta-preview-actions .btn:active { transform: scale(.98); }
.cta-preview-actions .btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255,121,31,.35); }
.cta-preview-actions .btn-primary:hover { background: var(--orange-dark); }
.cta-preview-actions .btn-secondary { background: transparent; color: var(--ink); border: 1.5px solid rgba(30,40,87,.15); }
.cta-preview-actions .btn-secondary:hover { background: rgba(30,40,87,.04); border-color: rgba(30,40,87,.3); }
.cta-preview-cancel {
  width: 100%; margin-top: 12px; font-family: inherit; font-size: 15px; font-weight: 800;
  color: var(--muted); background: transparent; border: none; padding: 12px; cursor: pointer;
}
.cta-preview-cancel:hover { color: var(--ink); }

.cta-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  z-index: 200; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700;
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 10px 30px rgba(30,40,87,.3);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.cta-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .cta-toast, .cta-preview, .cta-preview-overlay { transition-duration: .01ms !important; }
  .cta-spinner { animation-duration: .01ms !important; }
}
