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

/* --- CTA 1: кнопка «Поделиться» --- */
.cta-share { margin-top: 20px; }
.cta-share .btn-share {
  font-family: inherit; font-size: 16px; font-weight: 800; width: 100%;
  padding: 16px 20px; border-radius: 999px; border: 1.5px solid rgba(30,40,87,.15);
  background: #fff; color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
}
.cta-share .btn-share:hover { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark); }
.cta-share .btn-share:active { transform: scale(.98); }
.cta-share .btn-share:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* --- CTA 2: блок установки --- */
.cta-install { margin-top: 22px; }
.cta-reason {
  text-align: center; font-size: 15px; line-height: 1.5; font-weight: 500;
  color: var(--ink-3); margin-bottom: 14px; padding: 0 4px;
}
.cta-reason strong { font-weight: 800; color: var(--orange-dark); }
.cta-install-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cta-install-buttons .btn {
  font-family: inherit; font-size: 15px; font-weight: 800; padding: 16px 12px;
  border-radius: 999px; border: none; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.cta-install-buttons .btn:active { transform: scale(.98); }
.cta-install-buttons .btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.cta-install-buttons .btn-tg { background: #29A9EB; color: #fff; box-shadow: 0 8px 20px rgba(41,169,235,.32); }
.cta-install-buttons .btn-tg:hover { background: #1E96D4; transform: translateY(-1px); }
.cta-install-buttons .btn-store { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255,121,31,.35); }
.cta-install-buttons .btn-store:hover { background: var(--orange-dark); transform: translateY(-1px); }
@media (max-width: 380px) {
  .cta-install-buttons { grid-template-columns: 1fr; }
}

/* --- 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; }

/* --- Share-sheet (модалка/боттом-шит) --- */
.cta-sheet-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-sheet-overlay.open { opacity: 1; pointer-events: auto; }
.cta-sheet {
  background: var(--card); width: 100%; max-width: 480px;
  border-radius: 24px 24px 0 0; padding: 8px 20px calc(24px + 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-sheet-overlay.open .cta-sheet { transform: translateY(0); }
.cta-sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 16px; }
.cta-sheet-title { text-align: center; font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.cta-sheet-sub { text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 18px; }
.cta-sheet-options { display: flex; flex-direction: column; gap: 10px; }
.cta-sheet-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  font-family: inherit; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px;
  transition: border-color .15s ease, background .15s ease;
}
.cta-sheet-opt:hover { border-color: var(--orange); background: var(--orange-soft); }
.cta-sheet-opt:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.cta-sheet-opt:disabled { opacity: .6; cursor: progress; }
.cta-sheet-opt .so-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px; display: flex;
  align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff;
}
.cta-sheet-opt .so-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.cta-sheet-opt .so-sub { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.cta-sheet-cancel {
  width: 100%; margin-top: 14px; font-family: inherit; font-size: 15px; font-weight: 800;
  color: var(--muted); background: transparent; border: none; padding: 12px; cursor: pointer;
}
.cta-sheet-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-sheet, .cta-sheet-overlay, .cta-toast { transition-duration: .01ms !important; }
}
