/**
 * smart-cta-engine-1440056.css — Task #1440056
 * Styles for the universal smart CTA bar + inline card widget.
 *
 * Design: Fortune 500 white/emerald, 375px+, zero overlap with existing bars.
 * Elements:
 *   .sr-scta-bar         — sticky bottom bar (z-index 9900)
 *   .sr-scta-card        — inline mount card (injected into #sr-smart-cta-mount)
 *   .sr-scta-btn         — shared button base
 *   .sr-scta-btn--primary   — emerald gradient CTA
 *   .sr-scta-btn--secondary — outline CTA
 *   .sr-scta-btn--full      — full-width variant (card)
 */

/* ── Sticky Bottom Bar ──────────────────────────────────────── */
.sr-scta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9900;
  background: #ffffff;
  border-top: 1.5px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08), 0 -1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  flex-wrap: wrap;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateY(0);
  opacity: 1;
  /* Push above mobile navigation bars */
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
}

/* Body class added by engine so other bars can adjust */
body.sr-scta-bar-visible {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}

.sr-scta-bar.sr-scta-bar--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* Dismiss button */
.sr-scta-dismiss {
  flex-shrink: 0;
  order: 99;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: #9ca3af;
  padding: 0.35rem 0.4rem;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  margin-left: auto;
}
.sr-scta-dismiss:hover {
  color: #374151;
  background: rgba(0, 0, 0, 0.06);
}

/* Label text */
.sr-scta-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  flex: 1 1 auto;
  min-width: 0;
}

/* Fine print note */
.sr-scta-note {
  font-size: 0.68rem;
  color: #9ca3af;
  flex-basis: 100%;
  order: 10;
  padding-left: 0.1rem;
  display: none; /* hidden on mobile, shown on wider screens */
}

/* ── Shared button ──────────────────────────────────────────── */
.sr-scta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.sr-scta-btn:hover {
  transform: translateY(-1px);
}
.sr-scta-btn:active {
  transform: translateY(0);
}

/* Primary — emerald gradient */
.sr-scta-btn--primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.32);
}
.sr-scta-btn--primary:hover {
  box-shadow: 0 5px 16px rgba(16, 185, 129, 0.42);
  background: linear-gradient(135deg, #059669, #047857);
}

/* Secondary — outline */
.sr-scta-btn--secondary {
  background: transparent;
  color: #374151 !important;
  border: 1.5px solid #d1d5db;
}
.sr-scta-btn--secondary:hover {
  border-color: #10b981;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.04);
}

/* Full width variant (for card) */
.sr-scta-btn--full {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  border-radius: 12px;
}

/* ── Inline Card ────────────────────────────────────────────── */
.sr-scta-card {
  background: #ffffff;
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  position: relative;
  overflow: hidden;
}

.sr-scta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399, #10b981);
  background-size: 200% 100%;
  animation: scta-shimmer 2.5s linear infinite;
}

@keyframes scta-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.sr-scta-card-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.85rem;
  line-height: 1.4;
}

.sr-scta-card-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sr-scta-card-note {
  font-size: 0.7rem;
  color: #9ca3af;
  margin: 0.6rem 0 0;
  text-align: center;
}

/* ── Mount point (hidden until JS populates it) ─────────────── */
#sr-smart-cta-mount {
  display: none;
}

/* ── Responsive ─────────────────────────────────────────────── */

/* 640px+: show note in bar, layout in a single row */
@media (min-width: 640px) {
  .sr-scta-bar {
    flex-wrap: nowrap;
    padding: 0.6rem 1.25rem;
    gap: 0.65rem;
  }
  .sr-scta-note {
    display: inline;
  }
  body.sr-scta-bar-visible {
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }
}

/* 768px+: tighter layout, slightly larger font */
@media (min-width: 768px) {
  .sr-scta-bar {
    padding: 0.55rem 2rem;
    gap: 0.75rem;
  }
  .sr-scta-label {
    font-size: 0.87rem;
  }
  .sr-scta-btn {
    font-size: 0.85rem;
    padding: 0.52rem 1rem;
  }
}

/* 1024px+: card layout goes horizontal */
@media (min-width: 1024px) {
  .sr-scta-card-btns {
    flex-direction: row;
  }
  .sr-scta-btn--full {
    width: auto;
    flex: 1;
  }
}

/* Mobile 375px — ensure bar doesn't overflow */
@media (max-width: 375px) {
  .sr-scta-bar {
    padding: 0.55rem 0.75rem;
    gap: 0.4rem;
  }
  .sr-scta-label {
    font-size: 0.78rem;
  }
  .sr-scta-btn {
    font-size: 0.75rem;
    padding: 0.45rem 0.65rem;
  }
}
