html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  width: 100%;
}

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

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #10B981;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
}

/* FAQ toggle */
.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

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

.faq-content.hidden {
  display: block;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Viatura option selected */
.viatura-option:has(input:checked) {
  border-color: #10B981;
  background: #f0fdf4;
}

/* Chat widget — mobile full screen, desktop floating */
#chat-panel {
  animation: slideUp 0.3s ease;
}

/* Mobile: full-screen chat */
@media (max-width: 639px) {
  #chat-panel {
    height: 100vh;
    height: 100dvh;
    overscroll-behavior: contain;
  }
}

/* Desktop: floating panel */
@media (min-width: 640px) {
  #chat-panel {
    height: 500px;
    max-height: 500px;
  }
}

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

/* Chat messages */
.chat-msg.bot {
  display: flex;
  justify-content: flex-start;
}

.chat-msg.user {
  display: flex;
  justify-content: flex-end;
}

.chat-msg.user > div {
  background: #10B981;
  color: white;
  border-radius: 0.75rem;
  border-bottom-right-radius: 0;
}

/* Typing indicator */
.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
  margin: 0 2px;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}

/* Animate bounce for scroll indicator */
.animate-bounce {
  animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Form error state */
.input-error {
  border-color: #ef4444 !important;
}

/* Loader */
.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}
