/* ============================================================
   HERMES — estilos del widget (independientes de styles.css)
   ============================================================ */
.hermes-root{
  --h-navy:#0A2A52; --h-deep:#061A35; --h-teal:#1ACFC0; --h-teal-l:#A8EFE8;
  --h-text:#EAF1F8; --h-muted:#94A7C0; --h-dim:#5A6F8E;
  --h-border:rgba(168,239,232,.16);
  --h-ease:cubic-bezier(.4,0,.2,1);
  position:fixed;right:22px;bottom:22px;z-index:9999;
  font-family:'Inter',system-ui,-apple-system,sans-serif;
}

/* Botón flotante */
.hermes-fab{
  display:inline-flex;align-items:center;gap:11px;
  padding:13px 22px 13px 15px;border:0;border-radius:100px;cursor:pointer;
  background:var(--h-teal);color:var(--h-deep);
  font-family:inherit;font-size:.9rem;font-weight:700;
  box-shadow:0 10px 34px rgba(26,207,192,.34);
  transition:.3s var(--h-ease);position:relative;
}
.hermes-fab:hover{transform:translateY(-2px);box-shadow:0 14px 40px rgba(26,207,192,.44)}
.hermes-fab-ico{display:flex;width:26px;height:26px;flex-shrink:0}
.hermes-fab-ico svg{width:26px;height:26px;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.hermes-fab-dot{
  position:absolute;top:11px;left:32px;width:9px;height:9px;border-radius:50%;
  background:#3ddc84;border:2px solid var(--h-teal);
}
.hermes-root.abierto .hermes-fab{opacity:0;pointer-events:none;transform:scale(.9)}

/* Panel */
.hermes-panel{
  position:absolute;right:0;bottom:0;width:min(390px,calc(100vw - 32px));
  height:min(580px,calc(100dvh - 110px));
  display:flex;flex-direction:column;overflow:hidden;
  background:linear-gradient(170deg,#0d2f5a,var(--h-deep));
  border:1px solid var(--h-border);border-radius:20px;
  box-shadow:0 30px 70px rgba(0,0,0,.55);
  opacity:0;transform:translateY(16px) scale(.97);pointer-events:none;
  transition:.32s var(--h-ease);
}
.hermes-root.abierto .hermes-panel{opacity:1;transform:none;pointer-events:auto}

.hermes-head{
  display:flex;align-items:center;gap:12px;padding:16px 18px;
  border-bottom:1px solid var(--h-border);background:rgba(255,255,255,.03);flex-shrink:0;
}
.hermes-avatar{
  width:40px;height:40px;border-radius:12px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:rgba(26,207,192,.12);border:1px solid rgba(26,207,192,.34);
}
.hermes-avatar svg{width:22px;height:22px;stroke:var(--h-teal);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.hermes-head-id{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.hermes-head-id strong{font-size:.97rem;color:var(--h-text);font-weight:700}
.hermes-head-id span{
  display:inline-flex;align-items:center;gap:6px;
  font-family:'IBM Plex Mono',monospace;font-size:.6rem;text-transform:uppercase;
  letter-spacing:.1em;color:var(--h-teal);
}
.hermes-head-id i{width:6px;height:6px;border-radius:50%;background:#3ddc84;flex-shrink:0;animation:hermesPulse 2s infinite}
@keyframes hermesPulse{0%,100%{opacity:1}50%{opacity:.4}}
.hermes-cerrar{
  width:32px;height:32px;border:0;border-radius:9px;cursor:pointer;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.05);color:var(--h-muted);transition:.2s var(--h-ease);
}
.hermes-cerrar:hover{background:rgba(255,255,255,.1);color:var(--h-text)}
.hermes-cerrar svg{width:15px;height:15px;stroke-width:2.2;stroke-linecap:round}

/* Mensajes */
.hermes-msgs{
  flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:11px;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent;
}
.hermes-msgs::-webkit-scrollbar{width:6px}
.hermes-msgs::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:10px}
.hermes-msg{display:flex;animation:hermesIn .35s var(--h-ease) both}
@keyframes hermesIn{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
.hermes-msg.bot{justify-content:flex-start}
.hermes-msg.user{justify-content:flex-end}
.hermes-burbuja{
  max-width:86%;padding:12px 15px;border-radius:15px;
  font-size:.89rem;line-height:1.58;
}
.hermes-msg.bot .hermes-burbuja{
  background:rgba(255,255,255,.055);border:1px solid var(--h-border);
  color:var(--h-text);border-bottom-left-radius:5px;
}
.hermes-msg.user .hermes-burbuja{
  background:var(--h-teal);color:var(--h-deep);font-weight:500;
  border-bottom-right-radius:5px;
}
.hermes-burbuja strong{color:var(--h-teal-l);font-weight:700}
.hermes-msg.user .hermes-burbuja strong{color:var(--h-deep)}
.hermes-cta{
  display:block;margin-top:12px;padding:10px 16px;border-radius:100px;text-align:center;
  background:var(--h-teal);color:var(--h-deep)!important;
  font-size:.83rem;font-weight:700;text-decoration:none;transition:.25s var(--h-ease);
}
.hermes-cta:hover{background:var(--h-teal-l);transform:translateY(-1px)}

/* Escribiendo */
.hermes-typing .hermes-burbuja{display:flex;gap:4px;padding:15px}
.hermes-typing span{
  width:6px;height:6px;border-radius:50%;background:var(--h-teal);opacity:.5;
  animation:hermesDot 1.3s infinite;
}
.hermes-typing span:nth-child(2){animation-delay:.18s}
.hermes-typing span:nth-child(3){animation-delay:.36s}
@keyframes hermesDot{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}

/* Sugerencias */
.hermes-chips{
  display:flex;flex-wrap:wrap;gap:7px;padding:0 18px 12px;flex-shrink:0;
}
.hermes-chip{
  padding:8px 14px;border-radius:100px;cursor:pointer;
  background:rgba(26,207,192,.09);border:1px solid rgba(26,207,192,.28);
  color:var(--h-teal-l);font-family:inherit;font-size:.78rem;font-weight:500;
  transition:.22s var(--h-ease);
}
.hermes-chip:hover{background:rgba(26,207,192,.2);transform:translateY(-1px)}

/* Formulario */
.hermes-form{
  display:flex;gap:9px;padding:13px 16px;flex-shrink:0;
  border-top:1px solid var(--h-border);background:rgba(255,255,255,.02);
}
.hermes-form input{
  flex:1;min-width:0;padding:12px 16px;border-radius:100px;outline:0;
  background:rgba(255,255,255,.06);border:1px solid var(--h-border);
  color:var(--h-text);font-family:inherit;font-size:.88rem;
  transition:.22s var(--h-ease);
}
.hermes-form input::placeholder{color:var(--h-dim)}
.hermes-form input:focus{border-color:rgba(26,207,192,.5);background:rgba(26,207,192,.06)}
.hermes-form button{
  width:42px;height:42px;flex-shrink:0;border:0;border-radius:50%;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  background:var(--h-teal);color:var(--h-deep);transition:.25s var(--h-ease);
}
.hermes-form button:hover{background:var(--h-teal-l);transform:scale(1.06)}
.hermes-form button svg{width:16px;height:16px;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

.hermes-pie{
  padding:0 18px 14px;font-size:.68rem;color:var(--h-dim);line-height:1.5;text-align:center;flex-shrink:0;
}
.hermes-pie a{color:var(--h-teal);text-decoration:underline}

@media(max-width:520px){
  .hermes-root{right:14px;bottom:14px;left:14px}
  .hermes-fab{width:100%;justify-content:center}
  .hermes-fab-dot{left:auto;right:calc(50% + 52px)}
  .hermes-panel{width:100%;height:min(560px,calc(100dvh - 90px))}
}
@media(prefers-reduced-motion:reduce){
  .hermes-root *{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* Cursor de escritura en vivo */
.hermes-cursor{
  display:inline-block;width:2px;height:1em;vertical-align:text-bottom;
  background:var(--h-teal);margin-left:2px;border-radius:1px;
  animation:hermesBlink .85s step-end infinite;
}
@keyframes hermesBlink{0%,100%{opacity:1}50%{opacity:0}}

/* La burbuja crece suave mientras escribe */
.hermes-msg.bot .hermes-burbuja{transition:none}
