.minty-chat-fab {
  position: fixed;
  right: 24px;
  bottom: var(--sm-fab-bottom, 24px);
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  min-width: 52px;
  padding: 0 20px 0 16px;
  border: 1px solid #145c32;
  border-radius: 999px;
  background: #145c32;
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 10, 10, .12), 0 10px 24px -8px rgba(10, 10, 10, .32);
  font: 600 15px/1 var(--sm-font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, opacity .15s ease, visibility .15s ease;
}
.minty-chat-fab:hover { transform: translateY(-1px); background: #0e3d1f; border-color: #0e3d1f; }
.minty-chat-fab:hover .minty-glyph path[stroke="#145c32"] { stroke: #0e3d1f; }
.minty-chat-fab:focus-visible { outline: 2px solid var(--sm-accent, #145c32); outline-offset: 3px; }
.minty-chat-fab svg { width: 24px; height: 24px; flex: 0 0 auto; }
.minty-chat-fab .minty-fab-label { color: #fff; white-space: nowrap; }
.minty-chat-fab[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, #145c32 22%, transparent), 0 10px 24px -8px rgba(10, 10, 10, .32); }
html[data-theme="dark"] .minty-chat-fab { border-color: color-mix(in srgb, #fff 18%, #145c32); }
.minty-chat-fab.is-covered { visibility: hidden; opacity: 0; pointer-events: none; }
.minty-chat-fab.is-lifted { translate: 0 calc(-1 * var(--minty-lift, 0px)); }
.minty-chat-fab.is-dodged { translate: 0 calc(-1 * var(--minty-dodge, 0px)); }
.minty-chat-fab.is-dodged[aria-expanded="true"] { translate: none; }
.minty-chat-window {
  position: fixed;
  right: 24px;
  bottom: calc(var(--sm-fab-bottom, 24px) + 68px);
  z-index: 9999;
  display: none;
  flex-direction: column;
  width: 368px;
  max-width: calc(100vw - 24px);
  max-height: min(540px, calc(100vh - var(--sm-fab-bottom, 24px) - 100px));
  overflow: hidden;
  border: 1px solid var(--sm-line, #e7e4dc);
  border-radius: 16px;
  background: var(--sm-surface, #fff);
  color: var(--sm-ink, #111512);
  box-shadow: var(--sm-shadow-pop, 0 4px 12px rgba(17,21,18,.08), 0 24px 48px rgba(17,21,18,.12));
  font-family: var(--sm-font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
}
.minty-chat-window.open { display: flex; }
.minty-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px 16px;
  border-bottom: 1px solid var(--sm-line, #e7e4dc);
}
.minty-chat-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: none;
}
.minty-chat-avatar svg { width: 32px; height: 32px; }
.minty-chat-title { flex: 1; min-width: 0; }
.minty-chat-title strong { display: block; color: var(--sm-ink, #111512); font: 600 15px/1.2 var(--sm-font-display, "Space Grotesk", system-ui, sans-serif); }
.minty-chat-title span { display: block; margin-top: 2px; color: var(--sm-muted, #5f6f64); font-size: 12.5px; }
.minty-chat-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--sm-muted, #5f6f64);
  cursor: pointer;
}
.minty-chat-close:hover { background: var(--sm-mint-soft, #e6f3e9); color: var(--sm-ink, #111512); }
.minty-chat-close:focus-visible { outline: 2px solid var(--sm-accent, #145c32); outline-offset: 1px; }
.minty-chat-close svg { width: 16px; height: 16px; }
.minty-chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  overflow-y: auto;
  padding: 16px;
  background: var(--sm-paper, #faf8f3);
}
.minty-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.minty-msg.bot {
  align-self: flex-start;
  border: 1px solid var(--sm-line, #e7e4dc);
  border-bottom-left-radius: 4px;
  background: var(--sm-surface, #fff);
  color: var(--sm-ink, #111512);
}
.minty-msg.user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--sm-accent, #145c32);
  color: var(--sm-on-accent, #fff);
}
.minty-msg.typing { color: var(--sm-muted, #5f6f64); font-style: italic; }
.minty-msg.error { border-color: color-mix(in srgb, var(--sm-danger, #b42318) 30%, var(--sm-line, #e7e4dc)); background: var(--sm-danger-soft, #fdecea); color: var(--sm-danger, #b42318); }
.minty-msg a { color: inherit; font-weight: 600; }
.minty-chat-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
  background: var(--sm-paper, #faf8f3);
}
.minty-starter {
  padding: 7px 11px;
  border: 1px solid var(--sm-line, #e7e4dc);
  border-radius: 999px;
  background: var(--sm-surface, #fff);
  color: var(--sm-ink-2, #4a524c);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.minty-starter:hover { border-color: color-mix(in srgb, var(--sm-accent, #145c32) 40%, var(--sm-line, #e7e4dc)); color: var(--sm-ink, #111512); }
.minty-starter:focus-visible { outline: 2px solid var(--sm-accent, #145c32); outline-offset: 2px; }
.minty-chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-top: 1px solid var(--sm-line, #e7e4dc);
  background: var(--sm-surface, #fff);
}
.minty-chat-window .minty-chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--sm-line, #e7e4dc);
  border-radius: 12px;
  outline: none;
  background: var(--sm-paper, #faf8f3);
  color: var(--sm-ink, #111512);
  box-shadow: none;
  font: 400 14px/1.4 var(--sm-font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.minty-chat-window .minty-chat-input:focus,
.minty-chat-window .minty-chat-input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--sm-accent, #145c32) 50%, var(--sm-line, #e7e4dc));
  background: var(--sm-surface, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sm-accent, #145c32) 16%, transparent);
}
.minty-chat-input::placeholder { color: var(--sm-muted, #5f6f64); }
.minty-chat-send {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sm-accent, #145c32);
  color: var(--sm-on-accent, #fff);
  cursor: pointer;
}
.minty-chat-send svg { width: 20px; height: 20px; }
.minty-chat-send:hover { background: var(--sm-accent-ink, #0e3d1f); }
.minty-chat-send:focus-visible { outline: 2px solid var(--sm-accent, #145c32); outline-offset: 2px; }
.minty-chat-send:disabled { opacity: .45; cursor: default; }
body[data-shell] .minty-chat-fab { height: 48px; min-width: 48px; padding: 0 18px 0 14px; font-size: 14.5px; }
body[data-shell] .minty-chat-fab svg { width: 22px; height: 22px; }
body[data-shell] .minty-chat-fab { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, opacity .15s ease, visibility .15s ease, translate .2s ease; }
body[data-shell] .minty-chat-fab.is-compact:not([aria-expanded="true"]) { width: 44px; height: 44px; min-width: 44px; padding: 0; }
body[data-shell] .minty-chat-fab.is-compact:not([aria-expanded="true"]) .minty-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 639.98px) {
  .minty-chat-fab { right: 16px; width: 52px; padding: 0; }
  .minty-chat-fab .minty-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body[data-shell] .minty-chat-fab { width: 44px; height: 44px; min-width: 44px; padding: 0; }
  .minty-chat-window {
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - var(--sm-fab-bottom, 24px) - 92px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .minty-chat-fab, body[data-shell] .minty-chat-fab { transition: none; }
  .minty-chat-fab:hover { transform: none; }
}
@media print { .minty-chat-fab, .minty-chat-window { display: none !important; } }
.minty-msg.user.is-failed { opacity: .6; }
.minty-retry {
  display: inline-flex; align-items: center; min-height: 32px; margin-left: 2px; padding: 0 10px; border: 1px solid currentColor; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.minty-retry:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.minty-retry:focus-visible { outline: 2px solid var(--sm-accent, #145c32); outline-offset: 2px; }
@media (max-width: 760px), (pointer: coarse) {
  .minty-chat-window .minty-chat-input { font-size: 16px; }
}
