.mst-site-assistant-root,
.mst-site-assistant-root * {
  box-sizing: border-box;
}

.mst-site-assistant-root {
  position: fixed;
  right: var(--mst-site-assistant-right, max(18px, calc((100vw - 1460px) / 2 + 18px)));
  bottom: var(--mst-site-assistant-bottom, 18px);
  z-index: 2147483200;
  width: max-content;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #101828;
  max-width: calc(100vw - 36px);
}

.mst-site-assistant-toggle {
  width: auto;
  min-width: 132px;
  max-width: 100%;
  height: 56px;
  padding: 7px 10px 7px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(16, 24, 40, 0.16);
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.24);
  cursor: grab;
  font: inherit;
  touch-action: none;
  user-select: none;
}

.mst-site-assistant-toggle::before {
  content: "";
  display: none;
}

.mst-site-assistant-toggle-logo {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 999px;
  background: #ffffff url("/assets/brand/mikesullytools-brand-mark-96.webp") center / 24px 24px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.12);
}

.mst-site-assistant-toggle-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  width: 72px;
  justify-items: center;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

.mst-site-assistant-toggle-text span,
.mst-site-assistant-toggle-text strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
}

.mst-site-assistant-toggle-text span,
.mst-site-assistant-toggle-text strong {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.mst-site-assistant-toggle:hover,
.mst-site-assistant-toggle:focus-visible {
  background: #0f766e;
  outline: none;
}

.mst-site-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(650px, calc(100vh - 110px));
  display: none;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24);
}

.mst-site-assistant-root.is-open .mst-site-assistant-panel {
  display: grid;
}

.mst-site-assistant-root.is-panel-left .mst-site-assistant-panel {
  right: auto;
  left: 0;
}

.mst-site-assistant-root.is-panel-below .mst-site-assistant-panel {
  top: 70px;
  bottom: auto;
}

.mst-site-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.1);
  background: #f8fafc;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.mst-site-assistant-root.is-dragging .mst-site-assistant-toggle,
.mst-site-assistant-root.is-dragging .mst-site-assistant-header {
  cursor: grabbing;
}

.mst-site-assistant-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mst-site-assistant-title strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

.mst-site-assistant-title span {
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.3;
}

.mst-site-assistant-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.mst-site-assistant-close:hover,
.mst-site-assistant-close:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  color: #0f766e;
  outline: none;
}

.mst-site-assistant-messages {
  min-height: 260px;
  overflow-y: auto;
  padding: 14px;
  background: #ffffff;
}

.mst-site-assistant-message {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mst-site-assistant-bubble {
  width: fit-content;
  max-width: 100%;
  padding: 10px 11px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mst-site-assistant-message.is-user {
  justify-items: end;
}

.mst-site-assistant-message.is-user .mst-site-assistant-bubble {
  background: #111827;
  color: #ffffff;
}

.mst-site-assistant-message.is-assistant .mst-site-assistant-bubble {
  border: 1px solid rgba(16, 24, 40, 0.1);
  background: #f8fafc;
  color: #182230;
}

.mst-site-assistant-sources {
  display: grid;
  gap: 6px;
}

.mst-site-assistant-source {
  display: block;
  padding: 8px 9px;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: #175cd3;
  font-size: 0.8rem;
  line-height: 1.35;
  text-decoration: none;
}

.mst-site-assistant-source span {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 0.74rem;
}

.mst-site-assistant-source:hover,
.mst-site-assistant-source:focus-visible {
  border-color: rgba(23, 92, 211, 0.28);
  background: #f8fbff;
  outline: none;
}

.mst-site-assistant-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.mst-site-assistant-prompt {
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.mst-site-assistant-prompt:hover,
.mst-site-assistant-prompt:focus-visible {
  border-color: rgba(15, 118, 110, 0.3);
  color: #0f766e;
  outline: none;
}

.mst-site-assistant-form {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-top: 1px solid rgba(16, 24, 40, 0.1);
  background: #f8fafc;
}

.mst-site-assistant-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mst-site-assistant-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(16, 24, 40, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: #101828;
  font-size: 0.9rem;
}

.mst-site-assistant-input:focus {
  border-color: rgba(15, 118, 110, 0.45);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.mst-site-assistant-send {
  min-width: 74px;
  height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
}

.mst-site-assistant-send:hover,
.mst-site-assistant-send:focus-visible {
  background: #115e59;
  outline: none;
}

.mst-site-assistant-send:disabled,
.mst-site-assistant-input:disabled {
  cursor: wait;
  opacity: 0.66;
}

.mst-site-assistant-note {
  color: #667085;
  font-size: 0.72rem;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .mst-site-assistant-root {
    right: var(--mst-site-assistant-right, 20px);
    bottom: var(--mst-site-assistant-bottom, 12px);
    max-width: calc(100vw - 40px);
  }

  .mst-site-assistant-panel {
    position: fixed;
    right: 12px;
    left: 12px;
    bottom: 76px;
    width: auto;
    max-height: calc(100vh - 104px);
  }

  .mst-site-assistant-root.is-panel-left .mst-site-assistant-panel {
    right: 12px;
    left: 12px;
  }

  .mst-site-assistant-root.is-panel-below .mst-site-assistant-panel {
    top: 12px;
    bottom: auto;
  }

  .mst-site-assistant-toggle {
    min-width: 130px;
    height: 54px;
    padding: 7px 10px 7px 8px;
  }
}
