/* Botón flotante */
#asicon-chat-launcher {
  bottom: 10px;
  background-color: rgba(255, 255, 255, 0.6);
  z-index: 2147483000;

  background-image: url('../../resources/images/bot/andy-regular.png');
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;

  transition: all 0.25s ease-in-out;
}

/* 👇 Cambio de imagen al pasar el mouse */
#asicon-chat-launcher:hover,
#asicon-chat-launcher:active {
  background-image: url('../../resources/images/bot/andy-hover.png');
  box-shadow: 3px 3px 6px rgba(0,0,0,.28);
  transform: translateY(-1px);
}

/* Modal overlay */
#asicon-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  z-index: 2147483001;
}

#asicon-chat-close svg {
  width: 25px;
  height: 22px;
}

/* Modal contenedor */
#asicon-chat-modal {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: 380px;
  max-width: 96vw;
  height: 560px;
  max-height: 80vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483002;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Header del chat */
#asicon-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #004080; /* o el color de tu header */
  color: #fff;
  padding: 8px 12px;
  border-bottom: 1px solid #bebebe;
}

/* Contenedor de avatar + título */
.chat-header-content {
  display: flex;
  align-items: center;
  gap: 8px; /* espacio entre imagen y texto */
}

/* Imagen de perfil de Andy */
.asicon-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;       /* 👈 esquinas suaves */
  object-fit: cover;
  border: 0px solid #bebebe;
}

#asicon-chat-header .title {
  font-weight: 600;
  font-size: 15px;
}

#asicon-chat-close {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #ff0000;
  cursor: pointer;
  padding: 0;
}

/* Cuerpo del chat */
#asicon-chat-body {
  flex: 1;
  background: #f7f7f8;
  padding: 12px;
  overflow-y: auto;
}
.asicon-msg {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 82%;
  word-wrap: break-word;
}
.asicon-user { background: #e8f0ff; margin-left: auto; }
.asicon-bot  { background: #efefef; }

/* Input */
#asicon-chat-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #eee;
}

#asicon-chat-textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
}
#asicon-chat-send {
  background: #2C528D;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 6px 14px;
  cursor: pointer;
  align-self: center;
  width: auto;
  white-space: nowrap;
}

#asicon-chat-footer {
  font-size: 11px;
  color: #666;
  text-align: center;
  padding: 8px;
  border-top: 1px solid #eee;
  background: #fafafa;
}
#asicon-chat-footer a {
  color: #2C528D;
  text-decoration: none;
}
#asicon-chat-footer a:hover {
  text-decoration: underline;
}

/* Helpers */
.asicon-muted { color:#777; font-size: 14px; padding: 8px 12px; }

/* Oculta cualquier SVG o ícono dentro del botón */
#asicon-chat-launcher > svg,
#asicon-chat-launcher svg,
#asicon-chat-launcher .icon,
#asicon-chat-launcher img {
  display: none !important;
}

/* Limpieza de pseudo-elementos */
#asicon-chat-launcher::before,
#asicon-chat-launcher::after {
  content: none !important;
  background: none !important;
}

/* =========================
   1200px
========================= */
@media (max-width: 1200px) {

  #asicon-chat-modal {
    width: 360px;
    height: 520px;
    right: 16px;
    bottom: 82px;
  }

  #asicon-chat-header .title {
    font-size: 14px;
  }
}


/* =========================
   1100px
========================= */
@media (max-width: 1100px) {

  #asicon-chat-modal {
    width: 340px;
    height: 500px;
    right: 14px;
    bottom: 78px;
  }

  .asicon-msg {
    font-size: 14px;
    padding: 9px 11px;
  }
}


/* =========================
   900px (tablet)
========================= */
@media (max-width: 900px) {

  #asicon-chat-modal {
    width: 320px;
    height: 480px;
    right: 12px;
    bottom: 74px;
  }

  #asicon-chat-body {
    padding: 10px;
  }

  .asicon-msg {
    max-width: 85%;
    font-size: 14px;
  }

  #asicon-chat-textarea {
    font-size: 14px;
    min-height: 40px;
  }

  #asicon-chat-send {
    padding: 6px 12px;
    font-size: 14px;
  }
}


/* =========================
   600px (mobile)
========================= */
@media (max-width: 600px) {

  /* Modal fullscreen tipo app */
  #asicon-chat-modal {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  /* Overlay más fuerte */
  #asicon-chat-overlay {
    background: rgba(0,0,0,0.5);
  }

  /* Header compacto */
  #asicon-chat-header {
    padding: 6px 10px;
  }

  #asicon-chat-header .title {
    font-size: 14px;
  }

  .asicon-chat-avatar {
    width: 24px;
    height: 24px;
  }

  /* Mensajes */
  .asicon-msg {
    max-width: 90%;
    font-size: 14px;
    padding: 8px 10px;
  }

  /* Input */
  #asicon-chat-inputbar {
    padding: 8px;
  }

  #asicon-chat-textarea {
    font-size: 14px;
    min-height: 38px;
  }

  #asicon-chat-send {
    padding: 6px 10px;
    font-size: 13px;
  }

  /* Botón flotante */
  #asicon-chat-launcher {
    width: 60px;
    height: 60px;
    right: 10px;
    bottom: 10px;
    background-size: contain; /* evita recorte de la imagen */
  }

  /* Evita hover raro en mobile */
  #asicon-chat-launcher:hover {
    transform: none;
    box-shadow: none;
  }
}
