#mb-chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
}

#mb-chatbot-toggle {
  background: #ff8c12;
  color: #fff;
  border: none;
  border-radius: 24px;
  height: 48px;
  padding: 0 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 140, 18, 0.3);
  font-weight: 500;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.5;
}

.mb-chat-icon {
  width: 18px;
  height: 18px;
  display: block;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H8l-4 4v-4H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2zm3 5h10v2H7V8zm0 4h7v2H7v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H8l-4 4v-4H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2zm3 5h10v2H7V8zm0 4h7v2H7v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}

.mb-chat-label {
  display: block;
  line-height: 1;
}

#mb-chatbot-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(255, 140, 18, 0.38);
}

#mb-chatbot-toggle:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(255, 140, 18, 0.3);
}

#mb-chatbot-window {
  width: 360px;
  max-height: 560px;
  background: #f4f6fb;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: mb-slide-up 0.2s ease-out;
}

@keyframes mb-slide-up {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#mb-chatbot-header {
  background: linear-gradient(135deg, #ffb347, #ff8c2b);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
}

#mb-chatbot-close {
  background: rgba(0, 0, 0, 0.08);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

#mb-chatbot-close:hover {
  background: rgba(0, 0, 0, 0.16);
}

#mb-chatbot-close:active {
  transform: scale(0.95);
}

#mb-chatbot-messages {
  padding: 12px 14px;
  height: 380px;
  overflow-y: auto;
  background: #eef2ff;
}

.mb-msg {
  margin-bottom: 10px;
  max-width: 90%;
  line-height: 1.5;
  font-size: 15px;
}

.mb-msg-bot {
  background: #ffffff;
  border-radius: 18px;
  padding: 10px 12px;
  font-weight: 400;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.mb-msg-user {
  background: #4f46e5;
  color: #ffffff;
  border-radius: 18px;
  padding: 10px 12px;
  margin-left: auto;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

#mb-chatbot-input-area {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 8px;
  background: #f5f5f5;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

#mb-chatbot-input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 999px;
  background: #ffffff;
}

#mb-chatbot-input:focus {
  outline: none;
  box-shadow: 0 0 0 1px #ffb347;
}

#mb-chatbot-send {
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 999px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform 0.12s ease, filter 0.12s ease;
}

#mb-chatbot-send:hover {
  filter: brightness(1.05);
}

#mb-chatbot-send:active {
  transform: scale(0.96);
}

.mb-intro {
  background: #ffffff;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.mb-intro-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.mb-intro-text {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 6px;
}

.mb-intro-options div {
  font-size: 15px;
  margin-bottom: 2px;
}

@media (max-width: 640px) {
  #mb-chatbot-widget {
    right: 12px;
    bottom: 12px;
  }

  #mb-chatbot-toggle {
    max-width: calc(100vw - 24px);
    padding: 0 16px;
    gap: 6px;
  }

  .mb-chat-label {
    font-size: 14px;
  }

  #mb-chatbot-window {
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    border-radius: 20px;
  }

  #mb-chatbot-header {
    font-size: 15px;
  }

  #mb-chatbot-messages {
    height: min(380px, calc(100vh - 220px));
  }
}
