#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: #0067b1;
  color: white;
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#chatbox-header .title-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

#chatbox-header .header-text {
  display: flex;
  flex-direction: column;
}

#chatbox-header .title {
  font-size: 1rem;
  margin: 0;
  line-height: 1.2;
}

.status-container {
  display: flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: normal;
  color: #e0f2fe;
  margin-top: 1px;
  gap: 4px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 4px #22c55e;
}

.status-text {
  color: #4ade80;
  font-weight: 600;
}

.status-subtext {
  opacity: 0.85;
}

#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: #0067b1;
  color: white;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

#chatbox-input button:hover {
  background: #00487c;
}

/* Travel Assistant elements */
.chat-quick-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 8px;
  width: 100%;
}

.chat-quick-btn {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.chat-quick-btn:hover {
  background-color: #0067b1;
  border-color: #0067b1;
  color: white;
}

.chat-quick-btn::after {
  content: "›";
  font-size: 1.2rem;
  margin-left: 8px;
  font-weight: bold;
  opacity: 0.7;
}

.chat-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 8px;
  width: 100%;
}

.chat-pill-btn {
  background-color: #fff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
}

.chat-pill-btn:hover {
  background-color: #0067b1;
  border-color: #0067b1;
  color: white;
}

.chat-recommendation-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 8px;
  margin-bottom: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.chat-recommendation-header {
  font-weight: bold;
  color: #0f172a;
  font-size: 0.9rem;
  margin-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.chat-recommendation-details {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 10px;
}

.chat-recommendation-details strong {
  color: #1e293b;
}

.chat-recommendation-card a.view-plan-btn {
  display: block;
  background-color: #28a745;
  color: white !important;
  text-decoration: none !important;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  transition: background-color 0.2s ease;
}

.chat-recommendation-card a.view-plan-btn:hover {
  background-color: #218838;
}

.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;
  }
}