.mh-chatbot {
  --mh-chat-navy: #000d2a;
  --mh-chat-gold: #e2ab33;
  --mh-chat-panel-bg: #f8f9fc;
  --mh-chat-assistant-bg: #001746;
  --mh-chat-user-bg: #f4ce7a;
  --mh-chat-muted: #63708c;
  --mh-chat-border: rgba(0, 13, 42, 0.14);
  --mh-chat-shadow: 0 20px 45px rgba(0, 13, 42, 0.28);
  --mh-chat-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 400;
  font-family: var(--mh-chat-font);
}

.mh-chatbot__launcher {
  width: 52px;
  height: 52px;
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  background: var(--mh-chat-navy);
  color: var(--mh-chat-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(0, 13, 42, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mh-chatbot__launcher:hover,
.mh-chatbot__launcher:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 18px 34px rgba(0, 13, 42, 0.38);
}

.mh-chatbot__launcher:focus-visible,
.mh-chatbot__close:focus-visible,
.mh-chatbot__send:focus-visible,
.mh-chatbot__input:focus-visible {
  outline: 2px solid var(--mh-chat-gold);
  outline-offset: 2px;
}

.mh-chatbot__launcher svg {
  width: 24px;
  height: 24px;
}

.mh-chatbot__panel {
  position: fixed;
  right: 24px;
  bottom: 98px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
  height: min(560px, calc(100dvh - 28px));
  background: var(--mh-chat-panel-bg);
  border-radius: 18px;
  border: 1px solid var(--mh-chat-border);
  box-shadow: var(--mh-chat-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.mh-chatbot__panel.is-open {
  display: flex;
}

.mh-chatbot__header {
  background: linear-gradient(110deg, #000d2a 0%, #03205c 100%);
  color: #f5f7ff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(226, 171, 51, 0.3);
}

.mh-chatbot__title-wrap {
  min-width: 0;
}

.mh-chatbot__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mh-chatbot__subtitle {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #e6cb8f;
}

.mh-chatbot__close {
  border: 1px solid rgba(226, 171, 51, 0.42);
  background: rgba(255, 255, 255, 0.1);
  color: #fff9e8;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mh-chatbot__close:hover {
  background: rgba(226, 171, 51, 0.22);
}

.mh-chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.mh-chatbot__bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 0.95rem;
  word-break: break-word;
  white-space: pre-wrap;
}

.mh-chatbot__bubble--assistant {
  align-self: flex-start;
  background: var(--mh-chat-assistant-bg);
  color: #f7f9ff;
  border-top-left-radius: 6px;
}

.mh-chatbot__bubble--user {
  align-self: flex-end;
  background: var(--mh-chat-user-bg);
  color: #111827;
  border-top-right-radius: 6px;
}

.mh-chatbot__typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border-top-left-radius: 6px;
  background: var(--mh-chat-assistant-bg);
}

.mh-chatbot__typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f5f7ff;
  opacity: 0.5;
  animation: mhChatTyping 1.2s infinite ease-in-out;
}

.mh-chatbot__typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.mh-chatbot__typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes mhChatTyping {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.mh-chatbot__composer {
  border-top: 1px solid var(--mh-chat-border);
  background: #ffffff;
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.mh-chatbot__input {
  flex: 1;
  resize: none;
  border: 1px solid rgba(0, 13, 42, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.4;
  min-height: 44px;
  max-height: 108px;
  color: #111827;
}

.mh-chatbot__input::placeholder {
  color: #7a859f;
}

.mh-chatbot__send {
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mh-chat-gold);
  color: var(--mh-chat-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 44px;
  transition: filter 0.2s ease;
}

.mh-chatbot__send:hover:not(:disabled) {
  filter: brightness(1.03);
}

.mh-chatbot__send:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.mh-chatbot__send svg {
  width: 20px;
  height: 20px;
}

.mh-chatbot__disclaimer {
  margin: 0;
  font-size: 0.72rem;
  color: var(--mh-chat-muted);
  text-align: center;
  padding: 0 12px 11px;
  background: #ffffff;
}

@media (max-width: 600px) {
  .mh-chatbot__panel {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 84px;
    top: 10px;
    height: auto;
    max-height: none;
    border-radius: 16px;
  }

  .mh-chatbot__messages {
    padding: 14px;
  }
}

/* Mobile: align the chat launcher into the same column as the phone/WhatsApp
   float stack (.conversion-float is right:var(--sp-4), 44px, bottom calc(sp-5+52)).
   Launcher becomes the bottom item: same right edge + size, 8px gap above it. */
@media (max-width: 768px) {
  .mh-chatbot {
    right: var(--sp-4);
    bottom: var(--sp-5);
  }
  .mh-chatbot__launcher {
    width: 44px;
    height: 44px;
  }
  .mh-chatbot__launcher svg {
    width: 22px;
    height: 22px;
  }
}

/* Quick-reply / suggestion chips */
.mh-chatbot__chips {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin-top: -2px;
}

.mh-chatbot__chip {
  border: 1px solid var(--mh-chat-gold);
  background: rgba(226, 171, 51, 0.12);
  color: #001746;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.2;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.mh-chatbot__chip:hover {
  background: rgba(226, 171, 51, 0.24);
  transform: translateY(-1px);
}

.mh-chatbot__chip:focus-visible {
  outline: 2px solid var(--mh-chat-gold);
  outline-offset: 2px;
}
