/* Task #1512272 / #1550673: Mobile sticky filing CTA bar
   Fixed at bottom of screen on settlement detail pages.
   Mobile-only (<768px). ~56px height + safe-area-inset-bottom for notched phones.
   Offset 60px from bottom to avoid overlapping Crisp chat widget.
   Task #1550673: No dismiss, $4.99 price, 300px scroll trigger, dark green CTA. */

#sr-mobile-sticky-cta {
  position: fixed;
  bottom: 60px; /* offset above Crisp chat widget */
  left: 0;
  right: 0;
  z-index: 1040; /* below modals (1050+), above most page content */
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  padding: 0 16px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  /* Only render on mobile */
  display: none;
}

/* Visible state — toggled by JS */
#sr-mobile-sticky-cta.sr-sticky-cta--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#sr-mobile-sticky-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  max-width: 480px;
  margin: 0 auto;
}

/* Left side: settlement name + payout stacked vertically */
#sr-mobile-sticky-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

#sr-mobile-sticky-settlement-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

#sr-mobile-sticky-payout {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #047857; /* emerald-700 */
  white-space: nowrap;
  line-height: 1.3;
}

/* Right side: CTA button — solid dark green, Fortune 500 fintech */
#sr-mobile-sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #0D6B3D;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 14px;
  white-space: nowrap;
  min-height: 44px; /* WCAG 2.5.5 minimum tap target */
  transition: background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  letter-spacing: -0.01em;
}

#sr-mobile-sticky-btn:active {
  background: #0a5230;
  transform: scale(0.97);
}

/* Hide on desktop — double-guard beyond the JS check */
@media (min-width: 769px) {
  #sr-mobile-sticky-cta {
    display: none !important;
  }
}
