/* Huellas Asesor — Lavanda Serena */
#hase-root{
  --arena:#E8DFD3;
  --azul:#1B3B5F;--azul-claro:#2C5A8E;--azul-suave:#E6EDF3;
  --lavanda:#1B3B5F;--lavanda-osc:#0F2940;--lavanda-claro:#E6EDF3;
  --marfil:#FBF8F3;--crema:#F5EDE0;--laton:#B08D57;
  --tierra:#5A4332;
  --ciruela:#1B3B5F;
  --texto:#1F2D3E;--texto-suave:#52647A;--linea:rgba(27,59,95,.16);
  --wa:#5c8a6e;
  position:fixed;bottom:24px;right:24px;z-index:99999;
  font-family:"Mulish",-apple-system,Segoe UI,Roboto,sans-serif;
}

/* Launcher button */
#hase-root .hase-launcher{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--lavanda);color:#fff;border:0;
  padding:14px 20px;border-radius:60px;
  box-shadow:0 12px 30px -8px rgba(61,47,66,.45),0 4px 12px rgba(61,47,66,.18);
  cursor:pointer;font-weight:700;font-size:.95rem;
  transition:transform .25s ease,background .25s ease,box-shadow .25s ease;
}
#hase-root .hase-launcher:hover{transform:translateY(-3px);background:var(--lavanda-osc);box-shadow:0 16px 36px -8px rgba(61,47,66,.55),0 6px 14px rgba(61,47,66,.22)}
#hase-root .hase-launcher svg{width:22px;height:22px}
#hase-root .hase-icon-open{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center}
#hase-root .hase-icon-open svg{width:22px;height:22px}
#hase-root .hase-icon-close{display:none}
#hase-root[data-open] .hase-icon-open{display:none}
#hase-root[data-open] .hase-icon-close{display:block}
#hase-root[data-open] .hase-launcher-label{display:none}
@media(max-width:600px){
  #hase-root{bottom:14px;right:14px}
  #hase-root .hase-launcher-label{display:none}
  #hase-root .hase-launcher{padding:14px;border-radius:50%}
}

/* Panel */
#hase-root .hase-panel[hidden]{display:none !important}
#hase-root .hase-panel{
  position:fixed;bottom:96px;right:24px;
  width:380px;max-width:calc(100vw - 28px);
  height:min(620px,calc(100vh - 130px));
  background:var(--marfil);
  border-radius:18px;
  box-shadow:0 26px 60px -14px rgba(27,59,95,.4),0 10px 24px rgba(27,59,95,.18);
  display:flex;flex-direction:column;overflow:hidden;
  animation:hase-up .3s ease;
}
@keyframes hase-up{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){
  #hase-root .hase-panel{bottom:84px;right:14px;left:14px;width:auto;height:calc(100vh - 110px)}
}

#hase-root .hase-head{
  background:var(--ciruela);color:#fff;
  padding:16px 18px;display:flex;align-items:center;gap:12px;
}
#hase-root .hase-head-icon{
  width:42px;height:42px;border-radius:50%;
  background:var(--lavanda);display:flex;align-items:center;justify-content:center;color:#fff;
}
#hase-root .hase-head-icon svg{width:24px;height:24px}
#hase-root .hase-head-title{
  font-family:"Cormorant Garamond",Georgia,serif;font-size:1.15rem;font-weight:600;
  margin:0;color:#fff;line-height:1.1;
}
#hase-root .hase-head-sub{margin:2px 0 0;font-size:.74rem;color:#cdc2d0;letter-spacing:.04em}
#hase-root .hase-close{margin-left:auto;background:transparent;border:0;color:#cdc2d0;cursor:pointer;padding:6px}
#hase-root .hase-close:hover{color:#fff}
#hase-root .hase-close svg{width:20px;height:20px}

/* Messages */
#hase-root .hase-messages{
  flex:1;overflow-y:auto;padding:18px;background:var(--marfil);
}
#hase-root .hase-msg{
  margin-bottom:14px;max-width:88%;
  animation:hase-fade .25s ease;
}
@keyframes hase-fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
#hase-root .hase-msg.bot{
  background:var(--lavanda-claro);
  border-radius:14px 14px 14px 4px;
  padding:12px 14px;font-size:.92rem;color:var(--texto);line-height:1.55;
  margin-right:auto;
}
#hase-root .hase-msg.bot strong{color:var(--ciruela)}
#hase-root .hase-msg.bot ul,#hase-root .hase-msg.bot ol{padding-left:18px;margin:6px 0}
#hase-root .hase-msg.bot li{margin:2px 0}
#hase-root .hase-msg.bot p{margin:0 0 .5em}
#hase-root .hase-msg.bot p:last-child{margin-bottom:0}
#hase-root .hase-msg.user{
  background:var(--lavanda);color:#fff;
  border-radius:14px 14px 4px 14px;
  padding:10px 14px;font-size:.92rem;
  margin-left:auto;
}

/* Acciones (botones inline en respuestas) */
#hase-root .hase-actions{margin-top:10px;display:flex;flex-direction:column;gap:6px}
#hase-root .hase-action{
  display:inline-block;background:#fff;border:1px solid var(--linea);
  color:var(--ciruela);border-radius:10px;padding:8px 12px;
  font-size:.85rem;font-weight:600;cursor:pointer;text-align:left;
  text-decoration:none;transition:.2s;
}
#hase-root .hase-action:hover{border-color:var(--lavanda);background:var(--lavanda-claro)}
#hase-root .hase-action.wa{background:var(--wa);color:#fff;border-color:var(--wa)}
#hase-root .hase-action.wa:hover{background:#4d7a5e;color:#fff}
#hase-root .hase-action.tel{background:var(--ciruela);color:#fff;border-color:var(--ciruela)}
#hase-root .hase-action.tel:hover{background:var(--lavanda-osc)}
#hase-root .hase-action::before{
  display:inline-block;width:14px;margin-right:6px;font-weight:700;
}
#hase-root .hase-action.wa::before{content:"›"}
#hase-root .hase-action.tel::before{content:"☎"}
#hase-root .hase-action[href*="mailto"]::before{content:"✉"}

/* Quick replies inline (dentro del scroll del chat) */
#hase-root .hase-quick-inline{
  display:flex;flex-direction:column;gap:6px;
  margin:6px 0 14px 0;
  animation:hase-fade .25s ease;
}
#hase-root .hase-quick-btn{
  background:#fff;border:1px solid var(--linea);color:var(--azul);
  border-radius:8px;padding:8px 12px;font-size:.82rem;font-weight:600;
  cursor:pointer;transition:.2s;text-align:left;font-family:inherit;
  line-height:1.25;
}
#hase-root .hase-quick-btn:hover{
  border-color:var(--azul);background:var(--azul-suave);
}

/* Input row */
#hase-root .hase-input-row{
  display:flex;align-items:center;gap:8px;
  padding:10px 14px;background:#fff;
  border-top:1px solid var(--linea);
}
#hase-root .hase-input-row input{
  flex:1;background:transparent;border:0;font-size:.92rem;
  padding:10px 4px;color:var(--texto);font-family:inherit;
}
#hase-root .hase-input-row input:focus{outline:none}
#hase-root .hase-input-row button{
  background:var(--lavanda);border:0;color:#fff;
  width:38px;height:38px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  transition:background .2s ease;
}
#hase-root .hase-input-row button:hover{background:var(--lavanda-osc)}
#hase-root .hase-input-row button svg{width:18px;height:18px}

#hase-root .hase-foot{
  text-align:center;font-size:.7rem;color:var(--texto-suave);
  padding:8px 18px 12px;margin:0;background:#fff;
}

/* Loading dots */
#hase-root .hase-typing{
  display:inline-block;margin:4px 0;
}
#hase-root .hase-typing span{
  display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--lavanda);
  margin:0 2px;animation:hase-typing 1.2s infinite ease-in-out;
}
#hase-root .hase-typing span:nth-child(2){animation-delay:.15s}
#hase-root .hase-typing span:nth-child(3){animation-delay:.3s}
@keyframes hase-typing{0%,80%,100%{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}

/* Scrollbar */
#hase-root .hase-messages::-webkit-scrollbar{width:6px}
#hase-root .hase-messages::-webkit-scrollbar-thumb{background:var(--linea);border-radius:3px}
