/*
 * smart-cta.css — Task #1439822 + #1440042: Context-aware smart CTA engine
 * Used on: settlement detail, browse, COTD, bounty, dashboard,
 *          games, community, news, blog, guides, tools, categories, states, profiles, wins, squad
 * Design: emerald primary, ghost secondary, savings badge, mobile-responsive
 */

/* ── Full card widget ─────────────────────────────────────────────────────── */
.sc-widget {
  background: #fff;
  border: 1.5px solid rgba(0, 179, 125, 0.3);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0.85rem 0;
}

.sc-widget-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.sc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
}

/* Primary: solid emerald */
.sc-btn-primary {
  background: #00B37D;
  color: #fff;
  border: 2px solid #00B37D;
}
.sc-btn-primary:hover,
.sc-btn-primary:focus-visible {
  background: #009966;
  border-color: #009966;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 179, 125, 0.3);
}

/* Secondary: ghost */
.sc-btn-secondary {
  background: #fff;
  color: #065f46;
  border: 2px solid rgba(0, 179, 125, 0.45);
}
.sc-btn-secondary:hover,
.sc-btn-secondary:focus-visible {
  background: #f0fdf4;
  border-color: #00B37D;
  color: #065f46;
}

/* Price pill inside button */
.sc-btn-price {
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.sc-btn-secondary .sc-btn-price {
  background: rgba(0, 179, 125, 0.1);
  color: #065f46;
}

/* ── Upsell savings message ──────────────────────────────────────────────── */
.sc-upsell-msg {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0.55rem 0 0;
  line-height: 1.4;
}

/* ── Compact pill-bar strip (browse / inline contexts) ───────────────────── */
.sc-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.35rem 0;
}

/* Price badge in compact pill (uses .ec-pill from eligibility-widget-1439764.css) */
.sc-price-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255,255,255,0.22);
  border-radius: 100px;
  padding: 0.08rem 0.38rem;
  white-space: nowrap;
}
.ec-pill-secondary .sc-price-badge {
  background: rgba(0, 179, 125, 0.12);
  color: #065f46;
}

/* ── Mobile: stack vertically below 480px ────────────────────────────────── */
@media (max-width: 480px) {
  .sc-widget-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .sc-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }
  .sc-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .sc-strip .ec-pill {
    width: 100%;
    justify-content: center;
  }
}

/* ── Task #1440042: Page-level CTA mount points ──────────────────────────── */
/* All injected CTAs get the sc-widget base; these are mount-point helpers */
[id^="sc-"][id$="-cta"]:empty { display: none; }
[id^="sc-"][id$="-cta"]:not(:empty) { display: block; }

/* Email capture form inside sc-widget — Task #1440042 */
.sc-email-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.sc-email-input {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  border: 1.5px solid rgba(0, 179, 125, 0.35);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.sc-email-input:focus {
  border-color: #00B37D;
  box-shadow: 0 0 0 3px rgba(0, 179, 125, 0.12);
}

@media (max-width: 375px) {
  .sc-email-form {
    flex-direction: column;
  }
  .sc-email-input {
    max-width: 100%;
    min-width: unset;
  }
}
