#chatbox {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 360px;
  max-height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  z-index: 9999;
}

#chatbox-header {
  background-color: #1a73e8;
  color: white;
  padding: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Alinea elementos a los lados */
}

#chatbox-header .title-container {
  display: flex;
  align-items: center;
  gap: 10px; /* Espacio entre logo y título */
}

#chatbox-header .title {
  margin: 0;
}

#chatbox-header .button-group {
  display: flex;
  align-items: center;
  gap: 10px; /* Espacio entre botones */
}

#chatbox-header .hide-btn {
  font-size: 24px;
  cursor: pointer;
}

#chatbox-header .close-btn {
  font-size: 24px;
  cursor: pointer;
}

#chatbox-header img {
  width: 30px;
  height: 30px;
}

#chatbox-header img[src=""] {
  display: none;
}

#chatbox-header img[src="/assets/imgs/Axure_SIM-ICON.png"]:not([src*="invalid"]) {
  content: url('/assets/imgs/Axure_SIM-ICON.png');
}

#chatbox-messages {
  flex-grow: 1;
  padding: 10px;
  overflow-y: auto;
  background: #f8f9fa;
}

.chat-msg {
  max-width: 70%;
  margin: 5px 0;
  padding: 10px 15px;
  border-radius: 15px;
  overflow-wrap: break-word; /* Asegura que el texto largo se ajuste */
}

.chat-msg.user {
  text-align: right;
  color: #1a73e8; /* Azul minimalista */
  background-color: #e8e8e8;
  margin-left: 30%;
  border-radius: 15px 15px 0 15px;
}

.chat-msg.bot {
  text-align: left;
  color: #333; /* Negro minimalista */
  background-color: #fff;
  margin-right: 30%;
  border-radius: 15px 15px 15px 0;
}

.chat-msg.bot a {
  color: #1a73e8; /* Color azul para enlaces */
  text-decoration: underline;
  cursor: pointer;
}

.chat-msg.bot a:hover {
  color: #1557b0; /* Color más oscuro al pasar el ratón */
}

#chatbox-input {
  display: flex;
  border-top: 1px solid #ddd;
}

#chatbox-input input {
  flex-grow: 1;
  border: none;
  padding: 10px;
}

#chatbox-input button {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
}

.chat-boaticon {
  cursor: pointer;
}

/* Estilos para móviles (pantalla completa) */
@media (max-width: 768px) {
  #chatbox {
    width: 100%;
    height: 100%;
    max-height: 100%;
    bottom: 0;
    right: 0;
    top: 0;
    left: 0;
    border-radius: 0;
    margin: 0;
  }
  #chatbox-messages {
    flex-grow: 1;
    padding: 10px;
  }
  #chatbox-input {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: none;
    background: white;
    padding: 10px;
  }
}