/* Asistente IA flotante — Iquitos Turístico */
#ia-boton{
  position:fixed;left:18px;bottom:18px;z-index:70;
  width:56px;height:56px;border-radius:50%;border:0;cursor:pointer;
  background:linear-gradient(135deg,var(--verde,#0B6B3A),var(--verde-medio,#159457));
  color:#fff;font-size:1.6rem;line-height:1;
  display:grid;place-items:center;
  box-shadow:0 10px 26px rgba(11,107,58,.35);
  transition:transform .18s ease,box-shadow .18s ease;
}
#ia-boton:hover{transform:translateY(-3px) scale(1.03);box-shadow:0 14px 30px rgba(11,107,58,.45);}
#ia-boton[hidden],.ia-panel[hidden]{display:none!important;}

.ia-panel{
  position:fixed;left:18px;bottom:84px;z-index:70;
  width:min(360px,calc(100vw - 36px));
  height:min(520px,calc(100vh - 120px));
  display:flex;flex-direction:column;
  background:#fff;border:1px solid var(--borde,#E4EEE7);border-radius:18px;overflow:hidden;
  box-shadow:0 18px 50px rgba(11,60,35,.28);
  font-family:"Segoe UI",Roboto,Inter,system-ui,-apple-system,sans-serif;
  font-size:.9rem;color:var(--texto,#173B2B);
}
.ia-head{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;color:#fff;
  background:linear-gradient(135deg,#0B6B3A,#159457);
}
.ia-avatar{
  width:34px;height:34px;flex:none;border-radius:50%;
  background:rgba(255,255,255,.18);display:grid;place-items:center;font-size:1.1rem;
}
.ia-titulo{display:flex;flex-direction:column;line-height:1.2;min-width:0;}
.ia-titulo b{font-size:.95rem;}
.ia-titulo small{font-size:.7rem;opacity:.85;}
.ia-cerrar{
  margin-left:auto;width:30px;height:30px;flex:none;border:0;border-radius:50%;
  background:rgba(255,255,255,.18);color:#fff;font-size:1.2rem;line-height:1;cursor:pointer;
}
.ia-cerrar:hover{background:rgba(255,255,255,.32);}

.ia-mensajes{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#F8FBF9;}
.ia-msg{max-width:86%;padding:10px 13px;border-radius:14px;line-height:1.5;word-break:break-word;white-space:normal;}
.ia-msg.bot{align-self:flex-start;background:#fff;border:1px solid #E4EEE7;border-bottom-left-radius:4px;}
.ia-msg.user{align-self:flex-end;background:#0B6B3A;color:#fff;border-bottom-right-radius:4px;}
.ia-msg a{color:#0B6B3A;font-weight:700;text-decoration:underline;}
.ia-msg.user a{color:#FFF7DC;}
.ia-msg p{margin:0 0 6px;}
.ia-msg p:last-child{margin-bottom:0;}
.ia-typing{display:inline-flex;gap:4px;align-items:center;}
.ia-typing i{width:6px;height:6px;border-radius:50%;background:#159457;display:block;animation:ia-pulse 1s infinite ease-in-out;}
.ia-typing i:nth-child(2){animation-delay:.15s;}
.ia-typing i:nth-child(3){animation-delay:.3s;}
@keyframes ia-pulse{0%,60%,100%{transform:translateY(0);opacity:.45;}30%{transform:translateY(-4px);opacity:1;}}

.ia-chips{display:flex;gap:6px;overflow-x:auto;padding:8px 12px 4px;border-top:1px solid #EDF3EF;scrollbar-width:thin;}
.ia-chips button{
  flex:none;border:1px solid #CFE6D8;background:#E8F6ED;color:#0B6B3A;
  border-radius:999px;padding:6px 10px;font-size:.76rem;font-weight:700;cursor:pointer;
}
.ia-chips button:hover{background:#D4EFDF;}
.ia-form{display:flex;gap:8px;padding:10px 12px 12px;border-top:1px solid #EDF3EF;background:#fff;}
.ia-form input{
  flex:1;min-width:0;border:1px solid #DCE9E0;border-radius:999px;
  padding:10px 14px;outline:0;color:#173B2B;font-size:.88rem;
}
.ia-form input:focus{border-color:#159457;box-shadow:0 0 0 2px #E8F6ED;}
.ia-form button{
  width:42px;height:42px;flex:none;border:0;border-radius:50%;cursor:pointer;
  background:#D62828;color:#fff;font-size:1rem;display:grid;place-items:center;
}
.ia-form button:hover{background:#B71F1F;}
.ia-form button:disabled{opacity:.5;cursor:not-allowed;}

@media(max-width:560px){
  #ia-boton{left:12px;bottom:12px;width:52px;height:52px;}
  .ia-panel{left:12px;bottom:72px;width:calc(100vw - 24px);height:min(500px,calc(100vh - 96px));}
}
