/* VoiceFlow AI - Custom Styles */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prose styles for legal pages */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  color: #4b5563;
  margin-bottom: 1rem;
  line-height: 1.75;
}

.prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li {
  color: #4b5563;
  margin-bottom: 0.5rem;
}

.prose strong {
  color: #111827;
}

/* Audio waveform animation */
@keyframes audioWave {
  0%, 100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1);
  }
}

.audio-bar.playing {
  animation: audioWave 0.5s ease-in-out infinite;
}

/* Gradient text animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Pulse ring animation */
@keyframes pulseRing {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.pulse-ring {
  animation: pulseRing 2s ease-out infinite;
}

/* FAQ accordion animation */
.faq-item .faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-content {
  max-height: 500px;
}

.faq-item.active .faq-trigger i {
  transform: rotate(180deg);
}

.faq-trigger i {
  transition: transform 0.3s ease;
}

/* Tab content transitions */
.feature-content {
  animation: fadeIn 0.3s ease-out;
}

.feature-content.hidden {
  display: none;
}

/* Loading spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  right: 1rem;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Mobile menu transitions */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
  max-height: 500px;
}

/* Chat window animation */
#chat-window {
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.3s ease;
}

#chat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Exit popup animation */
#exit-popup > div:last-child {
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
}

#exit-popup.show > div:last-child {
  transform: scale(1);
  opacity: 1;
}

/* Cookie banner animation */
#cookie-banner {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#cookie-banner.show {
  transform: translateY(0);
}

/* Range slider styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #2563EB;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #1D4ED8;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #2563EB;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2563EB;
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-banner,
  #chat-toggle,
  #chat-window,
  #exit-popup {
    display: none !important;
  }

  main {
    padding-top: 0 !important;
  }

  .bg-gradient-to-r,
  .bg-gradient-to-br {
    background: #f3f4f6 !important;
    color: #111827 !important;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
