/* ============================================================
   G&J Web Studio — Asistente virtual
   Capa a pantalla completa (no una burbuja de chat al uso), con
   fondo de constelación y revelado del texto letra a letra.

   Todo va con el prefijo .gyjbot- a propósito: el sitio ya tiene
   .btn, .badge, .tag y .tier, y no deben tocarse desde aquí.
   ============================================================ */

.gyjbot{
  --gb-bg:#07080b;
  --gb-panel:rgba(20,22,28,.72);
  --gb-elev:rgba(255,255,255,.06);
  --gb-ink:#f5f6f8;
  --gb-dim:#9aa0aa;
  --gb-line:rgba(255,255,255,.12);
  --gb-accent:#ffffff;
  --gb-accent-ink:#08080a;
  --gb-blue:#8fb8ff;
  --gb-online:#5ddc9b;

  font-family:var(--ff-body,'Inter',system-ui,sans-serif);
}
.gyjbot *{box-sizing:border-box}

/* El sitio aplica `body.has-custom-cursor *{cursor:none}`. Dentro del
   asistente hay que devolver el cursor real o escribir se siente roto. */
body.has-custom-cursor .gyjbot,
body.has-custom-cursor .gyjbot *{cursor:auto}
body.has-custom-cursor .gyjbot button,
body.has-custom-cursor .gyjbot a{cursor:pointer}
body.has-custom-cursor .gyjbot input{cursor:text}

/* Con el asistente abierto se bloquea el scroll del sitio: si no, al
   llegar al final del hilo la página de detrás empieza a moverse. */
body.gyjbot-locked{overflow:hidden}

/* ---------- Botón flotante (única parte que queda a la vista) ---------- */
.gyjbot__fab{
  position:fixed;right:1.5rem;bottom:1.5rem;z-index:9600;
  width:60px;height:60px;border-radius:50%;border:1px solid var(--gb-line);
  background:var(--gb-accent);color:var(--gb-accent-ink);
  display:grid;place-items:center;
  box-shadow:0 18px 40px -12px rgba(0,0,0,.8);
  transition:transform .22s ease,box-shadow .22s ease;
}
.gyjbot__fab:hover{transform:translateY(-3px) scale(1.04);box-shadow:0 22px 48px -12px rgba(0,0,0,.9)}
.gyjbot__fab svg{width:25px;height:25px;fill:currentColor;transition:opacity .16s ease,transform .16s ease}
.gyjbot__fab .gyjbot-ico-close{position:absolute;opacity:0;transform:scale(.6) rotate(-45deg)}
.gyjbot.is-open .gyjbot__fab{background:transparent;color:var(--gb-ink);border-color:var(--gb-line)}
.gyjbot.is-open .gyjbot__fab .gyjbot-ico-chat{opacity:0;transform:scale(.6) rotate(45deg)}
.gyjbot.is-open .gyjbot__fab .gyjbot-ico-close{opacity:1;transform:scale(1) rotate(0)}
.gyjbot__dot{
  position:absolute;top:5px;right:5px;width:12px;height:12px;border-radius:50%;
  background:var(--gb-online);border:2px solid var(--gb-accent);
}
.gyjbot.is-open .gyjbot__dot{display:none}

/* ---------- El escenario a pantalla completa ---------- */
.gyjbot__stage{
  position:fixed;inset:0;z-index:9500;
  display:flex;flex-direction:column;
  background:radial-gradient(120% 90% at 50% 0%,#11141c,var(--gb-bg) 70%);
  opacity:0;visibility:hidden;transform:scale(1.02);
  transition:opacity .38s ease,transform .38s ease,visibility .38s;
}
.gyjbot.is-open .gyjbot__stage{opacity:1;visibility:visible;transform:scale(1)}

.gyjbot__stars{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.55}

/* ---------- Barra superior ---------- */
.gyjbot__topbar{
  position:relative;z-index:2;flex:none;
  display:flex;align-items:center;gap:1rem;
  padding:1.1rem clamp(1rem,5vw,3rem);
  border-bottom:1px solid var(--gb-line);
}
.gyjbot__brand{display:flex;align-items:center;gap:.7rem;margin-right:auto;min-width:0}
.gyjbot__avatar{
  width:38px;height:38px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:var(--gb-accent);color:var(--gb-accent-ink);
  font-weight:700;font-size:.82rem;letter-spacing:.02em;
}
.gyjbot__id{display:flex;flex-direction:column;min-width:0}
.gyjbot__id strong{font-size:.95rem;color:var(--gb-ink);line-height:1.2}
.gyjbot__state{
  font-family:var(--ff-mono,monospace);font-size:.68rem;color:var(--gb-dim);
  display:flex;align-items:center;gap:.35rem;
}
.gyjbot__state::before{
  content:'';width:6px;height:6px;border-radius:50%;background:var(--gb-online);
  box-shadow:0 0 8px var(--gb-online);
}
.gyjbot__langs{display:flex;gap:.3rem;flex:none}
.gyjbot__lang{
  font-family:var(--ff-mono,monospace);font-size:.66rem;letter-spacing:.04em;
  color:var(--gb-dim);background:transparent;border:1px solid var(--gb-line);
  border-radius:999px;padding:.28rem .6rem;transition:all .2s ease;
}
.gyjbot__lang:hover{color:var(--gb-ink);border-color:var(--gb-blue)}
.gyjbot__lang.is-on{color:var(--gb-accent-ink);background:var(--gb-accent);border-color:var(--gb-accent)}
.gyjbot__x{
  flex:none;width:38px;height:38px;border-radius:50%;
  background:transparent;border:1px solid var(--gb-line);color:var(--gb-dim);
  display:grid;place-items:center;transition:all .2s ease;
}
.gyjbot__x:hover{color:var(--gb-ink);border-color:var(--gb-ink)}
.gyjbot__x svg{width:16px;height:16px;fill:currentColor}

/* ---------- Hilo de conversación ---------- */
.gyjbot__scroll{
  position:relative;z-index:2;flex:1;overflow-y:auto;
  padding:clamp(1.2rem,4vh,2.6rem) clamp(1rem,5vw,3rem);
  scrollbar-width:thin;scrollbar-color:var(--gb-line) transparent;
}
.gyjbot__scroll::-webkit-scrollbar{width:8px}
.gyjbot__scroll::-webkit-scrollbar-thumb{background:var(--gb-line);border-radius:8px}
.gyjbot__thread{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:.9rem}

.gyjbot__msg{
  max-width:88%;font-size:.95rem;line-height:1.6;
  padding:.85rem 1.1rem;border-radius:16px;
  animation:gyjbotIn .35s cubic-bezier(.2,.7,.3,1) both;
}
.gyjbot__msg p{margin:0 0 .6rem}
.gyjbot__msg p:last-child{margin:0}
.gyjbot__msg--bot{
  align-self:flex-start;color:var(--gb-ink);
  background:var(--gb-panel);border:1px solid var(--gb-line);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom-left-radius:5px;
}
.gyjbot__msg--user{
  align-self:flex-end;color:var(--gb-accent-ink);
  background:var(--gb-accent);font-weight:500;
  border-bottom-right-radius:5px;
}
.gyjbot__msg strong{font-weight:700}
@keyframes gyjbotIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* tarjeta de recomendación final */
.gyjbot__reco{
  margin:.9rem 0;padding:1rem 1.1rem;border-radius:14px;
  background:linear-gradient(140deg,rgba(143,184,255,.14),rgba(143,184,255,.04));
  border:1px solid rgba(143,184,255,.32);
}
.gyjbot__reco-badge{
  display:inline-block;font-family:var(--ff-mono,monospace);font-size:.7rem;
  letter-spacing:.06em;text-transform:uppercase;color:var(--gb-blue);
  border:1px solid rgba(143,184,255,.4);border-radius:999px;
  padding:.25rem .7rem;margin-bottom:.6rem;
}
.gyjbot__reco p{margin:0;font-size:.92rem;color:var(--gb-ink)}
.gyjbot__note{font-size:.82rem;color:var(--gb-dim)}

/* botones de acción dentro de un mensaje */
.gyjbot__actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.9rem}
.gyjbot__action{
  font-size:.85rem;font-weight:600;text-decoration:none;border-radius:999px;
  padding:.6rem 1.1rem;transition:transform .18s ease,box-shadow .18s ease;
}
.gyjbot__action--wa{background:#25d366;color:#062512}
.gyjbot__action--call{background:transparent;color:var(--gb-ink);border:1px solid var(--gb-line)}
.gyjbot__action:hover{transform:translateY(-2px)}
.gyjbot__action--wa:hover{box-shadow:0 10px 26px -8px rgba(37,211,102,.7)}

/* "escribiendo…" */
.gyjbot__typing{
  align-self:flex-start;display:flex;gap:5px;padding:.9rem 1.1rem;
  background:var(--gb-panel);border:1px solid var(--gb-line);border-radius:16px;
  border-bottom-left-radius:5px;width:fit-content;
}
.gyjbot__typing i{
  width:7px;height:7px;border-radius:50%;background:var(--gb-dim);
  animation:gyjbotBlink 1.2s infinite;
}
.gyjbot__typing i:nth-child(2){animation-delay:.18s}
.gyjbot__typing i:nth-child(3){animation-delay:.36s}
@keyframes gyjbotBlink{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

/* ---------- Opciones ---------- */
.gyjbot__chips{
  max-width:720px;margin:1.1rem auto 0;
  display:flex;flex-wrap:wrap;gap:.5rem;
}
.gyjbot__chip{
  font-size:.87rem;color:var(--gb-ink);
  background:var(--gb-elev);border:1px solid var(--gb-line);
  border-radius:999px;padding:.6rem 1.1rem;
  transition:all .2s ease;
  animation:gyjbotIn .3s cubic-bezier(.2,.7,.3,1) both;
}
.gyjbot__chip:hover{border-color:var(--gb-blue);background:rgba(143,184,255,.12);transform:translateY(-2px)}

/* ---------- Barra inferior ---------- */
.gyjbot__dock{
  position:relative;z-index:2;flex:none;
  padding:1rem clamp(1rem,5vw,3rem) 1.2rem;
  border-top:1px solid var(--gb-line);
  background:rgba(7,8,11,.7);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
}
.gyjbot__form{max-width:720px;margin:0 auto;display:flex;gap:.6rem}
.gyjbot__input{
  flex:1;min-width:0;font:inherit;font-size:.95rem;color:var(--gb-ink);
  background:var(--gb-elev);border:1px solid var(--gb-line);
  border-radius:999px;padding:.85rem 1.2rem;transition:border-color .2s ease;
}
.gyjbot__input::placeholder{color:var(--gb-dim)}
.gyjbot__input:focus{outline:none;border-color:var(--gb-blue)}
.gyjbot__send{
  flex:none;width:46px;height:46px;border-radius:50%;border:0;
  background:var(--gb-accent);color:var(--gb-accent-ink);
  display:grid;place-items:center;transition:transform .18s ease;
}
.gyjbot__send:hover{transform:scale(1.06)}
.gyjbot__send svg{width:19px;height:19px;fill:currentColor}
.gyjbot__foot{
  max-width:720px;margin:.7rem auto 0;text-align:center;
  font-size:.74rem;color:var(--gb-dim);
}
.gyjbot__foot a{color:var(--gb-blue);text-decoration:none}
.gyjbot__foot a:hover{text-decoration:underline}

/* ---------- Móvil ---------- */
@media (max-width:560px){
  .gyjbot__fab{right:1rem;bottom:1rem;width:54px;height:54px}
  .gyjbot__msg{max-width:94%;font-size:.9rem}
  .gyjbot__id strong{font-size:.88rem}
  .gyjbot__chip{font-size:.82rem;padding:.55rem .9rem}
}

@media (prefers-reduced-motion:reduce){
  .gyjbot__stage,.gyjbot__msg,.gyjbot__chip,.gyjbot__fab,.gyjbot__action{transition:none;animation:none}
  .gyjbot__typing i{animation:none;opacity:.5}
}
