/**
 * Sticky CTA Bar
 * Persistent bottom CTA that appears on scroll
 * Version: 1.0.0
 */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(135deg, rgb(15 23 42 / 98%) 0%, rgb(30 64 175 / 98%) 100%);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgb(255 255 255 / 10%);
  box-shadow: 0 -4px 24px rgb(0 0 0 / 30%);
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-cta.visible {
  transform: translateY(0);
}

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

.sticky-cta__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sticky-cta__content {
  flex: 1 1 auto;
  min-width: 200px;
}

.sticky-cta__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.sticky-cta__subtitle {
  font-size: 0.875rem;
  color: rgb(255 255 255 / 80%);
  margin: 0;
}

.sticky-cta__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.sticky-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.sticky-cta__btn--primary {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgb(245 158 11 / 40%);
}

.sticky-cta__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgb(245 158 11 / 50%);
}

.sticky-cta__btn--primary:active {
  transform: translateY(0);
}

.sticky-cta__btn--secondary {
  background: rgb(255 255 255 / 10%);
  color: #ffffff;
  border-color: rgb(255 255 255 / 20%);
}

.sticky-cta__btn--secondary:hover {
  background: rgb(255 255 255 / 15%);
  border-color: rgb(255 255 255 / 30%);
}

.sticky-cta__btn--ghost {
  background: transparent;
  color: rgb(255 255 255 / 90%);
  border-color: transparent;
}

.sticky-cta__btn--ghost:hover {
  color: #ffffff;
  background: rgb(255 255 255 / 5%);
}

.sticky-cta__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgb(255 255 255 / 10%);
  border: none;
  border-radius: 6px;
  color: rgb(255 255 255 / 90%);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.sticky-cta__close:hover {
  background: rgb(255 255 255 / 15%);
  color: #ffffff;
}

.sticky-cta__icon {
  width: 20px;
  height: 20px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  /* Hide desktop sticky CTA on mobile — the mobile sticky-cta-bar handles this */
  .sticky-cta {
    display: none !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sticky-cta {
    transition: none;
  }

  .sticky-cta__btn {
    transition: none;
  }

  .sticky-cta__btn--primary:hover {
    transform: none;
  }
}

/* Performance mode support */
body.performance-mode .sticky-cta {
  backdrop-filter: none;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
}

body.performance-mode .sticky-cta__btn {
  transition: none;
}

body.performance-mode .sticky-cta__btn--primary:hover {
  transform: none;
}

/* Print - hide */
@media print {
  .sticky-cta {
    display: none !important;
  }
}
