/*
  LEO Chat Hero Demo v1
  Encapsulation strategy:
  - No iframe.
  - Every component selector is scoped to .leo-chat-hero[data-leo-chat-anim].
  - Class and keyframe names use the leo-chat prefix.
  - Only the demo page helper uses body.leo-chat-demo-page.
*/

body.leo-chat-demo-page {
  margin: 0;
  min-height: 100vh;
  background: #0e1b20;
}

.leo-chat-hero[data-leo-chat-anim],
.leo-chat-hero[data-leo-chat-anim] * {
  box-sizing: border-box;
}

.leo-chat-hero[data-leo-chat-anim] {
  --leo-chat-bg: #101e22;
  --leo-chat-panel: #15262a;
  --leo-chat-panel-deep: #112025;
  --leo-chat-line: #74fff4;
  --leo-chat-line-soft: rgba(116, 255, 244, 0.72);
  --leo-chat-line-faint: rgba(116, 255, 244, 0.2);
  --leo-chat-text: #edf4f7;
  --leo-chat-muted: rgba(237, 244, 247, 0.72);
  --leo-chat-shadow: rgba(0, 0, 0, 0.4);
  --leo-chat-radius-xl: 24px;
  --leo-chat-radius-md: 13px;
  --leo-chat-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(18px, 3vw, 42px);
  overflow: hidden;
  color: var(--leo-chat-text);
  font-family: var(--leo-chat-font);
  background:
   
   
    /*linear-gradient(180deg, #000000 0%, #0f1d22 100%);*/
	linear-gradient(180deg, #000000 0%, #000000 100%);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-hero__ambient {
  position: absolute;
  z-index: -1;
  width: min(42rem, 64vw);
  aspect-ratio: 1;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  filter: blur(36px);
  transform: translateZ(0);
  animation: leo-chat-ambient-drift 12s ease-in-out infinite alternate;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-hero__ambient--one {
  top: -24rem;
  left: 18%;
  background: rgba(116, 255, 244, 0.09);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-hero__ambient--two {
  right: 10%;
  bottom: -30rem;
  background: rgba(47, 199, 191, 0.1);
  animation-delay: -4s;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1256px, 76vw);
  min-width: 0;
  height: min(760px, calc(100svh - clamp(36px, 6vw, 84px)));
  min-height: min(560px, calc(100svh - 28px));
  padding: clamp(14px, 1.2vw, 20px);
  overflow: hidden;
  border: 1px solid rgba(116, 255, 244, 0.08);
  border-radius: var(--leo-chat-radius-xl);
  background:
    linear-gradient(180deg, rgba(21, 38, 42, 0.96), rgba(17, 32, 37, 0.96)),
    var(--leo-chat-panel);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 0 38px rgba(116, 255, 244, 0.06);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-window::before,
.leo-chat-hero[data-leo-chat-anim] .leo-chat-window::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-window::before {
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.04));
  opacity: 0.4;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-window::after {
  inset: 10px;
  border: 1px solid rgba(116, 255, 244, 0.045);
  border-radius: calc(var(--leo-chat-radius-xl) - 6px);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-topbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 52px;
  border: 1.5px solid var(--leo-chat-line-soft);
  background: rgba(17, 30, 35, 0.88);
  box-shadow: 0 0 0 1px rgba(116, 255, 244, 0.04) inset;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-icon-button,
.leo-chat-hero[data-leo-chat-anim] .leo-chat-new-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--leo-chat-text);
  border: 1.5px solid var(--leo-chat-line-soft);
  background: rgba(16, 29, 35, 0.84);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-icon-button {
  width: 59px;
  height: 34px;
  margin-left: 9px;
  border-radius: 6px;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-new-chat {
  min-width: 124px;
  height: 34px;
  gap: 8px;
  margin-right: 9px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: clamp(14px, 0.9vw, 17px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-title {
  min-width: 0;
  padding: 0 16px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(15px, 1vw, 18px);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--leo-chat-text);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  padding: clamp(28px, 2.8vw, 44px) clamp(14px, 0.6vw, 18px) clamp(12px, 1vw, 16px);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-conversation {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-welcome {
  max-width: 100%;
  margin: 0 30px;
  color: var(--leo-chat-text);
  font-size: clamp(16px, 1.05vw, 18px);
  font-weight: 700;
  line-height: 1.48;
  letter-spacing: -0.015em;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-divider {
  width: calc(100% - 20px);
  height: 1.5px;
  margin: clamp(26px, 3vw, 42px) auto 0;
  background: var(--leo-chat-line-soft);
  box-shadow: 0 0 18px rgba(116, 255, 244, 0.16);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-message-stack {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
  padding: 0 16px 12px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 520ms ease, transform 520ms ease;
}

.leo-chat-hero[data-leo-chat-anim].is-loop-ending .leo-chat-message-stack,
.leo-chat-hero[data-leo-chat-anim].is-loop-ending .leo-chat-composer__copy {
  opacity: 0;
  transform: translateY(-8px);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-bubble {
  display: grid;
  gap: 5px;
  max-width: min(760px, 84%);
  padding: 12px 15px 13px;
  border: 1px solid rgba(116, 255, 244, 0.32);
  border-radius: 14px;
  color: var(--leo-chat-text);
  background: rgba(13, 25, 30, 0.62);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  animation: leo-chat-bubble-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-bubble--user {
  align-self: flex-end;
  border-color: rgba(116, 255, 244, 0.54);
  background: rgba(116, 255, 244, 0.12);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-bubble--leo {
  align-self: flex-start;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-bubble__label {
  color: var(--leo-chat-line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-bubble__copy {
  font-size: clamp(14px, 0.94vw, 16px);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.012em;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-typing-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--leo-chat-line);
  opacity: 0.42;
  animation: leo-chat-dot 900ms ease-in-out infinite;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-typing-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-typing-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-composer {
  position: relative;
  flex: 0 0 auto;
  min-height: clamp(116px, 17svh, 150px);
  margin-top: clamp(18px, 2.2vw, 28px);
  border: 1.5px solid var(--leo-chat-line-soft);
  border-radius: var(--leo-chat-radius-md);
  background: rgba(17, 30, 35, 0.7);
  box-shadow: 0 0 20px rgba(116, 255, 244, 0.04) inset;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-composer__copy {
  width: calc(100% - 94px);
  min-height: 42px;
  padding: 20px 24px;
  color: var(--leo-chat-text);
  font-size: clamp(15px, 1vw, 17px);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.012em;
  opacity: 1;
  transition: opacity 420ms ease, transform 420ms ease;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -0.18em;
  background: var(--leo-chat-line);
  animation: leo-chat-caret-blink 900ms steps(2, start) infinite;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-composer__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 33px;
  border-radius: 6px;
  color: #f2fffd;
  background: linear-gradient(180deg, #77f6ea, #35ded3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 8px 24px rgba(68, 234, 223, 0.12);
  transform: translateZ(0);
}

.leo-chat-hero[data-leo-chat-anim].is-send-ready .leo-chat-action-button--send,
.leo-chat-hero[data-leo-chat-anim].is-sending .leo-chat-action-button--send {
  animation: leo-chat-send-pulse 680ms ease-out infinite alternate;
}

.leo-chat-hero[data-leo-chat-anim].is-sending .leo-chat-action-button--send {
  transform: translateX(3px);
}

.leo-chat-hero[data-leo-chat-anim] .leo-chat-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .leo-chat-hero[data-leo-chat-anim] .leo-chat-window {
    width: min(980px, 88vw);
    height: min(820px, calc(100svh - 36px));
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-welcome {
    margin-inline: 18px;
  }
}

@media (max-width: 860px) {
  .leo-chat-hero[data-leo-chat-anim] {
    padding: 16px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-window {
    width: min(640px, calc(100vw - 32px));
    height: calc(100svh - 32px);
    min-height: min(700px, calc(100svh - 32px));
    padding: 20px 18px;
    border-radius: 28px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-topbar {
    min-height: 72px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-icon-button {
    width: 94px;
    height: 53px;
    margin-left: 12px;
    border-radius: 8px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-new-chat {
    min-width: 94px;
    width: 94px;
    height: 53px;
    margin-right: 12px;
    padding: 0;
    border-radius: 8px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-new-chat__text {
    display: none;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-title {
    padding: 0 12px;
    font-size: clamp(20px, 4.6vw, 31px);
    text-align: center;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-main {
    padding: clamp(54px, 6.2svh, 78px) 18px 22px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-welcome {
    margin-inline: 0;
    font-size: clamp(21px, 5.2vw, 31px);
    line-height: 1.2;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-divider {
    width: 100%;
    margin-top: clamp(44px, 7svh, 72px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-message-stack {
    gap: 12px;
    margin-top: 18px;
    padding-inline: 0;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-bubble {
    max-width: 94%;
    padding: 11px 13px 12px;
    border-radius: 13px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-bubble__copy {
    font-size: clamp(13px, 3.55vw, 16px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-composer {
    min-height: clamp(174px, 24svh, 252px);
    margin-top: clamp(18px, 2.8svh, 30px);
    border-radius: 14px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-composer__copy {
    width: calc(100% - 116px);
    padding: 18px 18px;
    font-size: clamp(16px, 4.4vw, 21px);
    line-height: 1.32;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-composer__actions {
    top: 14px;
    right: 14px;
    bottom: 14px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-action-button {
    width: 96px;
    height: 54px;
    border-radius: 9px;
  }
}

@media (max-width: 520px) {
  .leo-chat-hero[data-leo-chat-anim] {
    padding: 10px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-window {
    width: calc(100vw - 20px);
    height: calc(100svh - 20px);
    min-height: min(620px, calc(100svh - 20px));
    padding: 14px 12px;
    border-radius: 24px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-window::after {
    inset: 7px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-topbar {
    min-height: 54px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-icon-button,
  .leo-chat-hero[data-leo-chat-anim] .leo-chat-new-chat {
    width: 58px;
    min-width: 58px;
    height: 38px;
    margin-inline: 7px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-title {
    font-size: clamp(16px, 5vw, 22px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-main {
    padding: 36px 10px 14px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-welcome {
    font-size: clamp(18px, 5.8vw, 24px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-divider {
    margin-top: clamp(30px, 6svh, 50px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-composer {
    min-height: clamp(136px, 23svh, 198px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-composer__copy {
    width: calc(100% - 86px);
    padding: 15px 15px;
    font-size: clamp(14px, 4.4vw, 18px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-action-button {
    width: 64px;
    height: 40px;
  }
}

@media (max-height: 680px) and (orientation: landscape) {
  .leo-chat-hero[data-leo-chat-anim] .leo-chat-window {
    height: calc(100svh - 24px);
    min-height: calc(100svh - 24px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-main {
    padding-top: 22px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-welcome {
    font-size: clamp(14px, 1.5vw, 16px);
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-divider {
    margin-top: 18px;
  }

  .leo-chat-hero[data-leo-chat-anim] .leo-chat-composer {
    min-height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leo-chat-hero[data-leo-chat-anim] *,
  .leo-chat-hero[data-leo-chat-anim] *::before,
  .leo-chat-hero[data-leo-chat-anim] *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@keyframes leo-chat-ambient-drift {
  from {
    transform: translate3d(-1rem, 0, 0) scale(1);
  }
  to {
    transform: translate3d(1.35rem, 1rem, 0) scale(1.08);
  }
}

@keyframes leo-chat-bubble-in {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes leo-chat-caret-blink {
  0%, 46% {
    opacity: 1;
  }
  47%, 100% {
    opacity: 0;
  }
}

@keyframes leo-chat-send-pulse {
  from {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 8px 24px rgba(68, 234, 223, 0.12);
  }
  to {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 10px 32px rgba(68, 234, 223, 0.34);
  }
}

@keyframes leo-chat-dot {
  0%, 100% {
    opacity: 0.32;
    transform: translateY(0);
  }
  45% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* Backgroun pattern script */
/* =========================================================
   LEO Chat Hero - Background pattern test
   PNG transparente repetido solo a lo ancho
   ========================================================= */

.leo-chat-hero[data-leo-chat-anim] {
  background-image:
    url("/leo-chat-pattern.png"),
    radial-gradient(circle at 50% 14%, rgba(116, 255, 244, 0.09), transparent 28rem),
    radial-gradient(circle at 50% 115%, rgba(116, 255, 244, 0.05), transparent 34rem);
   

  background-repeat:
    repeat-x,
    no-repeat,
    no-repeat,
    no-repeat;

  background-position:
    top center,
    50% 14%,
    50% 115%,
    center;

  background-size:
    auto,
    auto,
    auto,
    auto;
}
