/**
 * Chatbot styles for inline HTML pages (no styles.css).
 * Scoped tokens match MFM dark marketing pages (--amber / espresso palette).
 */
#mfm-chatbot-root {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --accent: #f5a623;
  --accent-light: #fcd34d;
  --accent-dim: rgba(245, 166, 35, 0.22);
  --shadow-accent: 0 6px 28px rgba(245, 166, 35, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --bg-subtle: #231d16;
  --bg-raised: #2a231b;
  --bg: #120f0b;
  --text: #f0e8dc;
  --text-2: #a89880;
  --text-3: #6a5a48;
  --line: rgba(240, 232, 220, 0.12);
  --line-subtle: rgba(240, 232, 220, 0.06);
  --radius: 10px;
  --radius-lg: 14px;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10002;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: calc(100vw - 2rem);
  font-family: var(--font, "Geist", system-ui, sans-serif);
  pointer-events: none;
}
#mfm-chatbot-root > * {
  pointer-events: auto;
}
.mfm-chatbot-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-light) 100%);
  box-shadow: var(--shadow-accent), var(--shadow-md);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.mfm-chatbot-toggle:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow-accent), var(--shadow-lg);
}
.mfm-chatbot-toggle:focus-visible {
  outline: none;
  box-shadow: var(--shadow-accent), 0 0 0 3px var(--accent-dim);
}
.mfm-chatbot-panel {
  position: relative;
  width: min(100vw - 2rem, 22rem);
  max-height: min(70vh, 28rem);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  flex-shrink: 0;
}
.mfm-chatbot-panel[hidden] {
  display: none !important;
}
.mfm-chatbot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(245, 166, 35, 0.1) 0%,
    rgba(35, 29, 22, 0.98) 100%
  );
}
.mfm-chatbot-head-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.mfm-chatbot-head-text strong {
  font-size: 0.9375rem;
  color: var(--text);
}
.mfm-chatbot-head-text span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
}
.mfm-chatbot-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  margin: -0.25rem -0.35rem -0.25rem 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--radius);
  position: relative;
  z-index: 2;
}
.mfm-chatbot-close:hover {
  color: var(--text);
}
.mfm-chatbot-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mfm-chatbot-messages {
  flex: 1;
  min-height: 8rem;
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mfm-chatbot-bubble {
  max-width: 95%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  line-height: 1.45;
}
.mfm-chatbot-bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}
.mfm-chatbot-bubble--assistant {
  align-self: flex-start;
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--line-subtle);
}
.mfm-chatbot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0.75rem 0.5rem;
}
.mfm-chatbot-chip {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-2);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.mfm-chatbot-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.mfm-chatbot-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem 0.85rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mfm-chatbot-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--bg-subtle);
  color: var(--text);
}
.mfm-chatbot-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.mfm-chatbot-send {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-light) 100%);
}
.mfm-chatbot-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
@media (max-width: 480px) {
  #mfm-chatbot-root {
    bottom: 1rem;
    right: 1rem;
    max-width: calc(100vw - 2rem);
  }
  .mfm-chatbot-panel {
    width: 100%;
    max-height: 58vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mfm-chatbot-toggle {
    transition: none;
  }
}
