/* ===== MACVILLAS BOT ===== */
.macvillas-bot {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 300px;
  max-width: 300px;
  background: rgba(255,255,255,0.9);
  border: 2px solid #007BFF;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Hidden by default */
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1000;
}

.macvillas-bot.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bot-header {
  background: linear-gradient(90deg, #007BFF, #042591);
  color: #fff;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
}

.bot-body {
  padding: 10px 15px;
  max-height: 250px;
  overflow-y: auto;
  font-size: 14px;
  color: #000;
}

/* Message bubbles */
.bot-message {
  display: flex;
  align-items: flex-start;
  margin: 10px 0;
  font-size: 14px;
}

.bot-message.user {
  justify-content: flex-end;
}

.bot-message.user .msg-text {
  background: #007BFF;
  color: #fff;
  border-radius: 10px 10px 0 10px;
  padding: 8px 12px;
  max-width: 70%;
  word-wrap: break-word;
}

.bot-message.assistant {
  justify-content: flex-start;
}

.bot-message.assistant .msg-text {
  background: #f1f1f1;
  color: #000;
  border-radius: 10px 10px 10px 0;
  padding: 8px 12px;
  max-width: 70%;
  word-wrap: break-word;
}

/* Avatar */
.msg-avatar {
  width: 35px;
  height: 35px;
  margin-right: 10px;
  flex-shrink: 0;
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Footer input */
.bot-footer {
  display: flex;
  padding: 8px 10px;
  border-top: 1px solid #007BFF;
  background: rgba(255,255,255,0.6);
}

.bot-footer input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 16px;
}

.bot-footer button {
  margin-left: 5px;
  background: #007BFF;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
}

/* Toggle button */
.bot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(90deg, #007BFF, #fff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000;
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  z-index: 1000;
}

/* Clickable option buttons */
.bot-options {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}

.bot-option {
  background: #007BFF;
  color: #fff;
  border: none;
  padding: 5px 8px;
  margin: 3px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: 0.3s;
}

.bot-option:hover {
  background: #0056b3;
}

/* Scrollbar */
.bot-body::-webkit-scrollbar {
  width: 6px;
}

.bot-body::-webkit-scrollbar-thumb {
  background: rgba(0,123,255,0.5);
  border-radius: 3px;
}

@media (max-width: 320px) {
  .macvillas-bot {
    width: 280px;
    max-width: 280px;
    right: 10px;
  }
}