/* ============================================================================
   MOBILE ENHANCEMENTS - Sticky CTA & Widget Alignment
   ============================================================================ */

/* Sticky Mobile CTA Button */
.mobile-sticky-cta {
  display: none; /* Hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  padding: 12px 16px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sticky-cta.hidden {
  transform: translateY(100%);
}

.mobile-sticky-cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  gap: 12px;
}

.mobile-sticky-cta-text {
  flex: 1;
  min-width: 0;
}

.mobile-sticky-cta-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.mobile-sticky-cta-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.2;
}

.mobile-sticky-cta-button {
  background: white;
  color: #8b5cf6;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.mobile-sticky-cta-button:active {
  transform: scale(0.97);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  /* Show sticky CTA on mobile */
  .mobile-sticky-cta {
    display: block;
  }

  /* Hide widgets when sticky CTA is visible - Option 1 (Clean UX) */
  body.sticky-cta-visible .tt-usage-counter,
  body.sticky-cta-visible .feedback-widget {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  /* Make widgets smaller on mobile (when visible) */
  .feedback-trigger {
    width: 48px;
    height: 48px;
  }

  .tt-usage-counter {
    font-size: 12px;
    padding: 6px 12px;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  /* Extra compact on very small screens */
  .mobile-sticky-cta {
    padding: 10px 12px;
  }

  .mobile-sticky-cta-title {
    font-size: 0.8125rem;
  }

  .mobile-sticky-cta-subtitle {
    font-size: 0.6875rem;
  }

  .mobile-sticky-cta-button {
    padding: 8px 16px;
    font-size: 0.8125rem;
  }

  /* Extra small trigger button (when visible) */
  .feedback-trigger {
    width: 44px;
    height: 44px;
  }
}

/* ============================================================================
   SCROLL BEHAVIOR - Show/hide sticky CTA based on scroll
   ============================================================================ */

/* Show sticky CTA only after user scrolls down */
@media (max-width: 768px) {
  body:not(.scrolled) .mobile-sticky-cta {
    transform: translateY(100%);
  }

  body.scrolled .mobile-sticky-cta {
    transform: translateY(0);
  }
}
