/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */


/* Questionnaire animations */
.question-fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.0s ease-out forwards;
}

.question-fade-out {
  opacity: 1;
  transform: translateY(0);
  animation: fadeOutUp 0.8s ease-in forwards;
}

.progress-fill {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Referrals dashboard animations */
.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

.animate-slide-out {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.mobile-referrals .statistics-card {
  transition: transform 0.2s ease;
}

.mobile-referrals .statistics-card:active {
  transform: scale(0.98);
}

.landscape-mode .grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (max-width: 768px) {
  .mobile-referrals {
    touch-action: pan-y;
  }
  
  .mobile-referrals button {
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 44px;
  }
}

/* FAQ Accordion states */
.faq-closed {
  max-height: 0;
  overflow: hidden;
}

.faq-open {
  max-height: none;
  overflow: visible;
}

.faq-closing {
  overflow: hidden;
}

/* Horizontal scroll with hidden scrollbar */
.scrollbar-hide {
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Safari and Chrome */
}

/* Smooth scrolling for horizontal products */
.products-scroll {
  scroll-behavior: smooth;
}

/* Progress bar animations */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    transform: scaleY(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    transform: scaleY(1.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    transform: scaleY(1);
  }
}

@keyframes pulse-scale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bounce-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Utility classes for progress animations */
.animate-pulse-glow {
  animation: pulse-glow 0.6s ease-in-out;
}

.animate-pulse-scale {
  animation: pulse-scale 0.8s ease-in-out 2;
}

.animate-bounce-in {
  animation: bounce-in 0.6s ease-out;
}

/* Progress bar with shimmer effect */
.progress-shimmer {
  position: relative;
  overflow: hidden;
}

.progress-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Section progress enhancements */
.section-circle {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-circle:hover {
  transform: scale(1.1);
}

.section-connector {
  transition: all 0.5s ease-in-out;
  transform-origin: left center;
}

/* Ensure a visible stub when progress is 0 so the bar is perceptible */
[data-section-progress-target="currentBar"][data-progress="0"] {
  min-width: 8px; /* small stub to show the bar exists */
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse-glow,
  .animate-pulse-scale,
  .animate-bounce-in,
  .progress-shimmer::after {
    animation: none;
  }

  .section-circle,
  .section-connector {
    transition: none;
  }
}