/* ==========================================================================
   Signal Lab — Conversion Layer
   Sticky mobile CTA bar, floating Telegram button, exit-intent popup
   ========================================================================== */

/* Leave room at the bottom of the viewport on mobile so the sticky bar
   never covers footer content or tutorial text */
@media (max-width: 991px) {
  body { padding-bottom: 62px; }
  .scroll-top.active { bottom: 74px !important; }
}

/* ---------- Floating Telegram button (always visible) ---------- */
.sl-fab-wrap {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 1090;
}

@media (min-width: 992px) {
  .sl-fab-wrap { bottom: 78px; }
}

.sl-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #26A5E4;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  animation: sl-pulse 2.4s infinite;
  transition: transform 0.2s ease;
}

.sl-fab:hover {
  color: #fff;
  transform: scale(1.08);
}

@keyframes sl-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(38, 165, 228, 0.55), 0 6px 18px rgba(0,0,0,0.25); }
  70%  { box-shadow: 0 0 0 12px rgba(38, 165, 228, 0), 0 6px 18px rgba(0,0,0,0.25); }
  100% { box-shadow: 0 0 0 0 rgba(38, 165, 228, 0), 0 6px 18px rgba(0,0,0,0.25); }
}

/* ---------- Sticky bottom CTA bar (mobile) ---------- */
.sl-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: var(--heading-color);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
}

@media (min-width: 992px) {
  .sl-sticky-cta { display: none; }
}

.sl-sticky-btn {
  flex: 1;
  text-align: center;
  padding: 11px 8px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sl-sticky-btn-primary {
  background: var(--accent-color);
  color: #fff;
}

.sl-sticky-btn-secondary {
  background: #26A5E4;
  color: #fff;
}

/* ---------- Exit-intent / lead popup ---------- */
.sl-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(6, 6, 6, 0.72);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sl-modal-overlay.sl-modal-open {
  display: flex;
}

.sl-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface-color, #fff);
  color: var(--default-color);
  border-radius: 16px;
  padding: 34px 26px 26px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  animation: sl-pop-in 0.25s ease;
}

@keyframes sl-pop-in {
  from { transform: translateY(12px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.sl-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--default-color);
  opacity: 0.6;
  cursor: pointer;
}

.sl-modal-close:hover { opacity: 1; }

.sl-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-color) 15%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent-color);
}

.sl-modal h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 8px;
}

.sl-modal p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 20px;
}

.sl-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sl-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.sl-modal-btn-primary {
  background: #26A5E4;
  color: #fff;
}

.sl-modal-btn-secondary {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}

.sl-modal-dismiss {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.82rem;
  opacity: 0.6;
  text-decoration: underline;
  color: var(--default-color);
}

.sl-modal-dismiss:hover { opacity: 1; }
