/* Sticky mobile CTA bar (PRD-0081). Mobile only, fixed overlay, never
   mutates document layout (CLS-safe). z-index kept below toasts (200). */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--card-bg, #FFFFFF);
  border-top: 1px solid var(--light-teal-border, #C8E6DF);
  box-shadow: 0 -6px 18px -8px rgba(0, 0, 0, 0.18);
  transform: translateY(105%);
  transition: transform 0.25s ease;
}
.sticky-cta.sticky-cta-visible {
  transform: translateY(0);
}
.sticky-cta-text {
  flex: 1;
  min-width: 0;
  font-size: 0.88em;
  line-height: 1.25;
  color: var(--text, #2C2C2E);
}
.sticky-cta-text strong {
  display: block;
  font-weight: 800;
}
.sticky-cta-text span {
  color: var(--text-muted, #6B6B6D);
  font-size: 0.875rem;
}
.sticky-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--primary, #2D7D6F);
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 0.95em;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.sticky-cta-btn:hover {
  background: var(--primary-hover, #246859);
  text-decoration: none;
}
.sticky-cta-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted, #6B6B6D);
  font-size: 1.3em;
  line-height: 1;
  cursor: pointer;
  background: var(--light-teal, #E8F5F1);
  border-radius: 8px;
}
@media (max-width: 768px) {
  .sticky-cta {
    display: flex;
  }
  /* Keep the last article content clear of the bar regardless of footer
     length (senior-tester finding 8). Applies only while the bar is in
     the DOM; removed with it on dismiss. */
  body:has(.sticky-cta) main {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-color-scheme: dark) {
  .sticky-cta-btn {
    color: #10201C !important;
  }
  /* --light-teal is near-identical to the bar background in dark mode;
     a translucent border keeps the 3:1 non-text contrast (WCAG 1.4.11). */
  .sticky-cta-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
  }
}
@media print {
  .sticky-cta {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta {
    transition: none;
  }
}
