:root {
  /* Uses site tokens when present */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mm-chatbot-launcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1500;
  background: linear-gradient(45deg, var(--accent, #22c55e), var(--accent-2, #16a34a));
  color: var(--primary, #0b0f14);
  border: 0;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  padding: 0;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mm-chatbot-launcherIcon svg {
  width: 22px;
  height: 22px;
}

.mm-chatbot-launcher:focus-visible {
  outline: 2px solid var(--focus, #22c55e);
  outline-offset: 3px;
}

.mm-chatbot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1500;
  display: none;
}

.mm-chatbot-panel {
  position: fixed;
  right: 16px;
  bottom: 72px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 120px));
  display: none;
  z-index: 1600;

  background: rgba(11, 15, 20, 0.96);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  color: #f8fafc !important;
}

[data-theme="light"] .mm-chatbot-panel {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
}

.mm-chatbot-panel[data-open="true"] { display: flex; flex-direction: column; }
.mm-chatbot-overlay[data-open="true"] { display: block; }

.mm-chatbot-header {
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border, rgba(148,163,184,0.18));
  background: var(--secondary, rgba(18, 20, 26, 0.85));
}

[data-theme="light"] .mm-chatbot-header {
  background: rgba(248, 250, 252, 0.95);
}

.mm-chatbot-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-chatbot-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(148,163,184,0.12);
  border: 1px solid rgba(148,163,184,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #f8fafc);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mm-chatbot-titleText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mm-chatbot-titleText strong {
  color: #f8fafc !important;
  font-size: 0.95rem;
}

.mm-chatbot-titleText span {
  color: #a1aab8 !important;
  font-size: 0.8rem;
  line-height: 1.3;
}

[data-theme="light"] .mm-chatbot-titleText strong {
  color: #0f172a !important;
}

[data-theme="light"] .mm-chatbot-titleText span {
  color: #475569 !important;
}

.mm-chatbot-close {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.22);
  color: #f8fafc !important;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

[data-theme="light"] .mm-chatbot-close {
  color: #0f172a !important;
  border: 1px solid rgba(148,163,184,0.3);
}

.mm-chatbot-close:hover { border-color: rgba(34,197,94,0.45); }
.mm-chatbot-close:focus-visible { outline: 2px solid var(--focus, #22c55e); outline-offset: 2px; }

.mm-chatbot-body {
  padding: 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mm-chatbot-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 92%;
}

.mm-chatbot-msg[data-role="user"] { align-self: flex-end; }
.mm-chatbot-msg[data-role="bot"] { align-self: flex-start; }

.mm-chatbot-bubble {
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.55;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.mm-chatbot-msg[data-role="user"] .mm-chatbot-bubble {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.22);
  color: #f8fafc !important;
}

.mm-chatbot-msg[data-role="bot"] .mm-chatbot-bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148,163,184,0.18);
  color: #f8fafc !important;
}

[data-theme="light"] .mm-chatbot-msg[data-role="bot"] .mm-chatbot-bubble {
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(148,163,184,0.25);
  color: #0f172a !important;
}

[data-theme="light"] .mm-chatbot-msg[data-role="user"] .mm-chatbot-bubble {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #0f172a !important;
}

.mm-chatbot-meta {
  font-size: 0.75rem;
  color: #a1aab8 !important;
}

[data-theme="light"] .mm-chatbot-meta {
  color: #475569 !important;
}

.mm-chatbot-suggestions {
  padding: 0 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mm-chatbot-chip {
  background: rgba(148,163,184,0.10);
  border: 1px solid rgba(148,163,184,0.22);
  color: #f8fafc !important;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

[data-theme="light"] .mm-chatbot-chip {
  background: rgba(148,163,184,0.08);
  border: 1px solid rgba(148,163,184,0.3);
  color: #0f172a !important;
}

.mm-chatbot-chip:hover { border-color: rgba(34,197,94,0.45); }
.mm-chatbot-chip:focus-visible { outline: 2px solid var(--focus, #22c55e); outline-offset: 2px; }

.mm-chatbot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.mm-chatbot-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(148,163,184,0.10);
  border: 1px solid rgba(148,163,184,0.22);
  color: #f8fafc !important;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
}

[data-theme="light"] .mm-chatbot-action {
  background: rgba(148,163,184,0.08);
  border: 1px solid rgba(148,163,184,0.3);
  color: #0f172a !important;
}

.mm-chatbot-action:hover {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.12);
}

.mm-chatbot-action:focus-visible {
  outline: 2px solid var(--focus, #22c55e);
  outline-offset: 2px;
}

.mm-chatbot-footer {
  padding: 12px;
  border-top: 1px solid var(--border, rgba(148,163,184,0.18));
  background: var(--secondary, rgba(18, 20, 26, 0.65));
  display: grid;
  gap: 10px;
}

[data-theme="light"] .mm-chatbot-footer {
  background: rgba(248, 250, 252, 0.9);
}

.mm-chatbot-inputRow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.mm-chatbot-input {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 10px;
  color: #f8fafc !important;
}

[data-theme="light"] .mm-chatbot-input {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(148,163,184,0.3);
  color: #0f172a !important;
}

.mm-chatbot-input::placeholder {
  color: rgba(248, 250, 252, 0.5) !important;
}

[data-theme="light"] .mm-chatbot-input::placeholder {
  color: rgba(15, 23, 42, 0.5) !important;
}

.mm-chatbot-input:focus-visible { outline: 2px solid var(--focus, #22c55e); outline-offset: 2px; }

.mm-chatbot-send {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(45deg, var(--accent, #22c55e), var(--accent-2, #16a34a));
  color: var(--primary, #0b0f14);
}

.mm-chatbot-send:focus-visible { outline: 2px solid var(--focus, #22c55e); outline-offset: 2px; }

.mm-chatbot-voice {
  min-height: 44px;
  min-width: 44px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(148,163,184,0.16));
  background: var(--secondary, #12141a);
  color: var(--text, #f8fafc);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mm-chatbot-voice:hover {
  background: rgba(148,163,184,0.1);
  border-color: var(--accent, #22c55e);
}

.mm-chatbot-voice.active {
  background: var(--accent, #22c55e);
  color: var(--primary, #0b0f14);
  border-color: var(--accent, #22c55e);
  animation: pulse 1.5s ease-in-out infinite;
}

.mm-chatbot-voice svg {
  width: 18px;
  height: 18px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.mm-chatbot-voice:focus-visible { outline: 2px solid var(--focus, #22c55e); outline-offset: 2px; }

.mm-chatbot-disclaimer {
  font-size: 0.78rem;
  color: #a1aab8 !important;
  line-height: 1.4;
}

[data-theme="light"] .mm-chatbot-disclaimer {
  color: #475569 !important;
}

@media (max-width: 768px) {
  .mm-chatbot-panel {
    right: 12px;
    bottom: 68px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 120px);
  }
  .mm-chatbot-launcher { right: 12px; bottom: 12px; }
}

