#mbb-assistant-root {
  --mbba-green: #1f6f43;
  --mbba-green-dark: #15472d;
  --mbba-gold: #f0c15b;
  --mbba-ink: #17261f;
  --mbba-muted: #66736d;
  --mbba-paper: #ffffff;
  --mbba-panel: #f8faf6;
  bottom: 18px;
  font-family: Poppins, Arial, sans-serif;
  position: fixed;
  right: 18px;
  z-index: 99999;
}

.mbba-launcher {
  align-items: center;
  background: var(--mbba-green);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 30px;
  font-weight: 800;
  height: 62px;
  justify-content: center;
  line-height: 1;
  transition: background 160ms ease, transform 160ms ease;
  width: 62px;
}

.mbba-launcher:hover,
.mbba-launcher:focus {
  background: var(--mbba-green-dark);
  transform: translateY(-2px);
}

.mbba-launcher img {
  border-radius: 50%;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.mbba-launcher-nudge {
  animation: mbba-launcher-bounce 900ms ease-in-out 0s 1;
}

@keyframes mbba-launcher-bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  18% {
    transform: translateY(-10px) scale(1.04);
  }
  36% {
    transform: translateY(0) scale(1);
  }
  54% {
    transform: translateY(-6px) scale(1.025);
  }
  72% {
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mbba-launcher,
  .mbba-launcher-nudge {
    animation: none;
    transition: none;
  }
}

.mbba-panel {
  background: var(--mbba-paper);
  border: 1px solid rgba(23, 38, 31, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  height: min(620px, calc(100vh - 36px));
  overflow: hidden;
  width: min(390px, calc(100vw - 36px));
}

.mbba-panel[hidden],
.mbba-launcher[hidden] {
  display: none;
}

.mbba-header {
  align-items: center;
  background: linear-gradient(135deg, var(--mbba-green-dark), var(--mbba-green));
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.mbba-header h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.mbba-header p {
  color: var(--mbba-gold);
  font-size: 12px;
  font-weight: 600;
  margin: 2px 0 0;
}

.mbba-close {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  height: 36px;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.mbba-messages {
  background: var(--mbba-panel);
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.mbba-message {
  display: flex;
  margin-bottom: 12px;
}

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

.mbba-bubble {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 86%;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.mbba-message-assistant .mbba-bubble {
  background: #fff;
  border: 1px solid rgba(23, 38, 31, 0.12);
  color: var(--mbba-ink);
}

.mbba-message-assistant .mbba-bubble a {
  color: var(--mbba-green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mbba-message-assistant .mbba-bubble a:hover,
.mbba-message-assistant .mbba-bubble a:focus {
  color: var(--mbba-green-dark);
}

.mbba-message-user .mbba-bubble {
  background: var(--mbba-green);
  color: #fff;
}

.mbba-form {
  background: #fff;
  border-top: 1px solid rgba(23, 38, 31, 0.12);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  padding: 12px;
}

.mbba-input {
  border: 1px solid rgba(23, 38, 31, 0.22);
  border-radius: 8px;
  color: var(--mbba-ink);
  font: inherit;
  min-height: 46px;
  padding: 10px;
  resize: none;
}

.mbba-input:focus {
  border-color: var(--mbba-green);
  box-shadow: 0 0 0 3px rgba(31, 111, 67, 0.18);
  outline: none;
}

.mbba-send {
  align-self: end;
  background: var(--mbba-green);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 46px;
  min-width: 78px;
  padding: 0 14px;
}

.mbba-send:disabled {
  background: var(--mbba-muted);
  cursor: wait;
}

@media (max-width: 520px) {
  #mbb-assistant-root {
    bottom: 12px;
    right: 12px;
  }

  .mbba-panel {
    height: min(640px, calc(100vh - 24px));
    width: calc(100vw - 24px);
  }

  .mbba-form {
    grid-template-columns: 1fr;
  }

  .mbba-send {
    width: 100%;
  }
}
