/* Chatbot flotante */
#btn-chatbot {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #043C66;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(4,60,102,.35);
  transition: background .2s;
}
#btn-chatbot:hover { background: #0a5ca8; }
#btn-chatbot svg { width: 26px; height: 26px; fill: #fff; }

#ventana-chatbot {
  position: fixed;
  bottom: 94px;
  right: 28px;
  z-index: 1000;
  width: 340px;
  max-height: 480px;
  background: #f7f8fa;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(4,60,102,.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Montserrat', Arial, sans-serif;
}
#ventana-chatbot.hidden { display: none; }

.chatbot-header {
  background: #043C66;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
}
#cerrar-chatbot {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

#cuerpo-chatbot {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg-user {
  display: flex;
  justify-content: flex-end;
}
.chat-msg-bot {
  display: flex;
  justify-content: flex-start;
}
.chat-bubble-user {
  background: #043C66;
  color: #fff;
  border-radius: 14px 14px 2px 14px;
  padding: 8px 14px;
  max-width: 80%;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-bubble-bot {
  background: #fff;
  color: #2d2d2d;
  border: 1px solid #dde3ea;
  border-radius: 14px 14px 14px 2px;
  padding: 8px 14px;
  max-width: 80%;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.chatbot-loading { color: #888; font-size: 13px; padding: 4px 0; }

.chatbot-input-row {
  border-top: 1px solid #e0e6ef;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
}
#input-mensaje-ia {
  flex: 1;
  border: 1px solid #ccd4de;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
#input-mensaje-ia:focus { border-color: #043C66; }
#btn-enviar-ia {
  background: #043C66;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
#btn-enviar-ia:hover { background: #0a5ca8; }
#btn-enviar-ia:disabled { background: #9ab8cc; cursor: default; }
