/* ===========================================================
   Asistente virtual "Pregúntanos" — mismos tokens que el resto del sitio.
   Terracota solo en botón de enviar, enlaces y chips (acento mínimo).
   =========================================================== */
.chat-launcher{
  position:fixed; right:22px; bottom:90px; z-index:155;
  display:inline-flex; align-items:center; gap:10px;
  height:48px; padding:0 20px 0 16px; border:0; border-radius:999px;
  background:var(--accent); color:var(--accent-ink);
  font:400 15px/1 'Jost', -apple-system, 'Segoe UI', sans-serif; letter-spacing:.02em;
  box-shadow:0 4px 14px rgba(0,0,0,.18); cursor:pointer;
}
.chat-launcher svg{ width:22px; height:22px; flex:none; }
.chat-launcher:hover{ background:#7F3F2C; }
.chat-launcher:focus-visible, .chat-panel button:focus-visible, .chat-panel textarea:focus-visible, .chat-panel a:focus-visible{
  outline:3px solid var(--focus); outline-offset:2px;
}
.chat-launcher[hidden]{ display:none; }

.chat-panel{
  position:fixed; right:22px; bottom:22px; z-index:160;
  width:380px; height:min(600px, calc(100dvh - 44px));
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--bg); color:var(--ink);
  border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:0 12px 40px rgba(38,34,32,.22);
  font-family:'Jost', -apple-system, 'Segoe UI', sans-serif; font-weight:300; font-size:15px; line-height:1.55;
}
.chat-panel[hidden]{ display:none; }
.chat-panel:focus{ outline:none; }

.chat-head{
  display:flex; align-items:center; gap:12px; padding:14px 16px;
  background:var(--bg-wood); border-bottom:1px solid var(--line);
}
.chat-head img{ width:40px; height:40px; border-radius:50%; background:#fff; border:1px solid var(--line); flex:none; }
.chat-head-text{ flex:1; min-width:0; }
.chat-title{
  margin:0; font-family:'Cormorant Garamond', Georgia, serif; font-weight:500;
  font-size:22px; line-height:1.1; color:var(--ink);
}
.chat-sub{ margin:2px 0 0; font-size:12.5px; color:var(--ink-soft); }
.chat-close{
  width:44px; height:44px; flex:none; border:0; background:transparent; color:var(--ink);
  border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.chat-close:hover{ background:rgba(38,34,32,.07); }
.chat-close svg{ width:20px; height:20px; }

.chat-log{
  flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px;
  overscroll-behavior:contain;
}
.chat-msg{
  max-width:86%; padding:10px 14px; border-radius:var(--radius);
  white-space:pre-wrap; overflow-wrap:anywhere;
}
.chat-msg.bot{ align-self:flex-start; background:var(--bg-wood); color:var(--ink); }
.chat-msg.me{ align-self:flex-end; background:var(--ink); color:#fff; }
.chat-msg a{ color:var(--accent); text-decoration:underline; text-underline-offset:2px; }
.chat-msg.me a{ color:#fff; }
.chat-typing{ color:var(--ink-soft); font-style:italic; }

.chat-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:2px; }
.chat-chip{
  border:1px solid var(--accent); background:var(--bg); color:var(--accent);
  border-radius:999px; padding:7px 14px; min-height:36px; cursor:pointer;
  font:400 14px/1.2 'Jost', -apple-system, 'Segoe UI', sans-serif;
}
.chat-chip:hover{ background:var(--accent); color:var(--accent-ink); }

.chat-note{
  margin:0; padding:8px 16px; font-size:12.5px; line-height:1.45; color:var(--ink-soft);
  background:var(--bg-soft); border-top:1px solid var(--line); max-width:none;
}
.chat-note strong{ font-weight:500; color:var(--ink); }
.chat-note a{ color:var(--ink-soft); text-decoration:underline; text-underline-offset:2px; }

.chat-form{ display:flex; align-items:flex-end; gap:8px; padding:10px 12px 12px; border-top:1px solid var(--line); background:var(--bg); }
.chat-input{
  flex:1; resize:none; min-height:44px; max-height:110px; padding:10px 12px;
  border:1px solid #8C8176; border-radius:var(--radius); background:#fff; color:var(--ink);
  font:300 16px/1.4 'Jost', -apple-system, 'Segoe UI', sans-serif;
}
/* Sin halo azul: el foco del campo se marca con el borde en terracota (visible, 5.8:1 sobre blanco) */
.chat-panel .chat-input:focus, .chat-panel .chat-input:focus-visible{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 1px var(--accent);
}
.chat-send{
  flex:none; min-width:44px; height:44px; padding:0 16px; border:0; border-radius:var(--radius);
  background:var(--accent); color:var(--accent-ink); cursor:pointer;
  font:400 15px/1 'Jost', -apple-system, 'Segoe UI', sans-serif;
}
.chat-send:hover{ background:#7F3F2C; }
.chat-send:disabled{ background:#8C8176; cursor:not-allowed; }

@media (max-width:640px){
  .chat-launcher{ width:56px; height:56px; padding:0; justify-content:center; right:22px; bottom:90px; }
  .chat-launcher span{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .chat-launcher svg{ width:26px; height:26px; }
  .chat-panel{ inset:0; width:auto; height:100dvh; border:0; border-radius:0; }
}
