html,
body,
#root {
  height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Inter", system-ui, sans-serif;
}

/* scrollbar invisible para sliders horizontales tipo Netflix.
   Mantenemos el comportamiento de scroll (snap, swipe, wheel) pero
   ocultamos visualmente la barra: el affordance lo dan las flechas
   y los gradientes laterales. */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* scrollbar minimal en tono Material */
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(27, 28, 28, 0.18);
  border-radius: 999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(27, 28, 28, 0.32);
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

/* dot pulse loader (sidebar / toast) */
.dot-pulse {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.dot-pulse span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: dot-pulse 1.2s infinite ease-in-out both;
  opacity: 0.6;
}
.dot-pulse span:nth-child(2) {
  animation-delay: 0.15s;
}
.dot-pulse span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dot-pulse {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* fade-in para mensajes y toasts */
.msg-enter {
  animation: msgIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* respeta saltos de línea del bot */
.assistant-text {
  white-space: pre-wrap;
}

/* cursor parpadeando para streaming */
.streaming-cursor::after {
  content: "▍";
  margin-left: 2px;
  opacity: 0.5;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}

/* el textarea del composer no debe heredar el ring de @tailwindcss/forms */
textarea:focus {
  outline: none;
  box-shadow: none;
}

/* PropertyCard fade-in stagger (animationDelay se setea inline) */
.card-stagger {
  animation: cardIn 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Truncado a 2 líneas (Tailwind line-clamp-plugin no está incluido en el CDN) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
