#chatbot-container {
  position: fixed;
  bottom: 120px;
  right: 28px;
  z-index: 9999;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;   /* ← chat arriba, botón abajo */
  align-items: flex-end;
  gap: 12px;
}

#chatbot-toggle {
  position: fixed;
  right: 18px;
  bottom: 80px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e63946;
  color: #fff;
  font-size: 26px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}
#chatbot-toggle:hover { transform: scale(1.08); }

#chatbot-box {
  width: 340px;
  max-height: 500px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
}

#chatbot-header {
  background: #e63946;
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#chatbot-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

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

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.chat-msg.bot {
  background: #fff;
  border: 1px solid #e0e0e0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: #e63946;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.chat-option-btn {
  background: #fff;
  border: 1.5px solid #e63946;
  color: #e63946;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-option-btn:hover {
  background: #e63946;
  color: #fff;
}

#chatbot-input-area {
  display: flex;
  border-top: 1px solid #eee;
  background: #fff;
}
#chatbot-input {
  flex: 1;
  padding: 12px 14px;
  border: none;
  outline: none;
  font-size: 14px;
}
#chatbot-send {
  background: #e63946;
  color: #fff;
  border: none;
  padding: 0 16px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}
#chatbot-send:hover { background: #c0303b; }

@media (max-width: 420px) {
  #chatbot-box { width: calc(100vw - 40px); }
}