.sw-assist-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9990;
  font-family: var(--font-body, "Google Sans", Arial, sans-serif);
  color: var(--color-text, #111);
}

.sw-assist-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--color-dark, #111);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.22);
}

.sw-assist-launcher:hover,
.sw-assist-launcher:focus-visible {
  background: var(--color-accent, #e10600);
  outline: none;
}

.sw-assist-launcher[hidden],
.sw-assist-panel[hidden] {
  display: none !important;
}

.sw-assist-panel {
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 32px));
  background: #fff;
  border: 1px solid var(--color-line, #e8e8e8);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sw-assist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--color-line, #e8e8e8);
  background: #fafafa;
}

.sw-assist-head strong {
  display: block;
  font-family: var(--font-heading, Montserrat, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.3;
}

.sw-assist-head span {
  display: block;
  margin-top: 2px;
  color: var(--color-muted, #666);
  font-size: 12px;
  line-height: 1.35;
}

.sw-assist-close {
  border: 0;
  background: transparent;
  color: #111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.sw-assist-messages {
  flex: 1;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

.sw-assist-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sw-assist-bubble.is-bot {
  align-self: flex-start;
  background: #f3f3f3;
  border-top-left-radius: 4px;
}

.sw-assist-bubble.is-user {
  align-self: flex-end;
  background: #111;
  color: #fff;
  border-top-right-radius: 4px;
}

.sw-assist-bubble.is-error {
  align-self: stretch;
  background: #fff1f0;
  color: #8a1f11;
  border: 1px solid #f3c4bd;
}

.sw-assist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}

.sw-assist-chip {
  border: 1px solid var(--color-line, #e8e8e8);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #111;
}

.sw-assist-chip:hover,
.sw-assist-chip:focus-visible {
  border-color: #111;
  outline: none;
}

.sw-assist-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--color-line, #e8e8e8);
  background: #fff;
}

.sw-assist-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-line, #e8e8e8);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
}

.sw-assist-form input:focus {
  outline: 2px solid #111;
  outline-offset: 1px;
}

.sw-assist-form button {
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  background: var(--color-accent, #e10600);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.sw-assist-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.sw-assist-foot {
  padding: 0 12px 10px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--color-muted, #666);
}

.sw-assist-foot a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .sw-assist-root {
    right: 10px;
    bottom: 10px;
  }

  .sw-assist-panel {
    width: calc(100vw - 20px);
    height: min(70vh, 560px);
  }
}
