.cm-assistant {
  --cm-assistant-bottom: 20px;
  --cm-assistant-vh: 100dvh;
  color: #141414;
  font:
    14px/1.55 "Golos Text",
    system-ui,
    sans-serif;
  position: relative;
  z-index: 105;
}
.cm-assistant *,
.cm-assistant *::before,
.cm-assistant *::after {
  box-sizing: border-box;
}
.cm-assistant [hidden],
.cm-assistant[hidden] {
  display: none !important;
}
.cm-assistant button,
.cm-assistant textarea {
  font: inherit;
}
.cm-assistant button,
.cm-assistant a {
  -webkit-tap-highlight-color: transparent;
}
.cm-assistant button {
  cursor: pointer;
}
.cm-assistant button:disabled {
  cursor: default;
  opacity: 0.5;
}
.cm-assistant button:focus-visible,
.cm-assistant a:focus-visible,
.cm-assistant textarea:focus-visible,
.cm-assistant-transcript:focus-visible {
  outline: 2px solid #141414;
  outline-offset: 4px;
}
.cm-assistant svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
.cm-assistant p {
  margin: 0;
}
.cm-assistant-trigger {
  position: fixed;
  right: 24px;
  bottom: max(var(--cm-assistant-bottom), env(safe-area-inset-bottom));
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 14px 20px;
  background: #141414;
  color: #fff;
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.18);
  transition: background-color 0.18s ease;
}
.cm-assistant-trigger:hover,
.cm-assistant-send:hover:enabled {
  background: #333;
}
.cm-assistant-panel {
  position: fixed;
  bottom: calc(var(--cm-assistant-bottom) + 64px);
  right: 24px;
  width: min(410px, calc(100vw - 32px));
  height: min(
    660px,
    calc(var(--cm-assistant-vh) - var(--cm-assistant-bottom) - 88px)
  );
  min-height: 280px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 16px 64px rgb(0 0 0 / 0.2);
  animation: cm-assistant-enter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cm-assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px 16px 22px;
  gap: 8px;
  border-bottom: 1px solid #e3e3e0;
  cursor: grab;
  touch-action: none;
  flex: 0 0 auto;
}
.cm-assistant-header:active {
  cursor: grabbing;
}
.cm-assistant-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cm-assistant-header p {
  color: #555;
  font-size: 12px;
}
.cm-assistant-icon-button {
  background: transparent;
  color: #141414;
  border: 0;
  padding: 11px;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}
.cm-assistant-icon-button span,
.cm-assistant-send span,
.cm-assistant-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.cm-assistant-icon-button:hover {
  background: #f3f3f0;
}
.cm-assistant-context {
  padding: 10px 22px;
  background: #f6f6f3;
  color: #555;
  font-size: 12px;
  overflow-wrap: anywhere;
  flex: 0 0 auto;
}
.cm-assistant-conversation {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b2b2ae #fff;
  flex: 1;
  min-height: 0;
  padding: 22px;
}
.cm-assistant-introduction {
  font-size: 14px;
  margin-bottom: 20px;
}
.cm-assistant-starters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.cm-assistant-suggestion {
  text-align: left;
  color: #141414;
  background: #fff;
  border: 1px solid #ccc;
  min-height: 44px;
  padding: 10px 12px;
}
.cm-assistant-suggestion:hover {
  border-color: #141414;
  background: #f6f6f3;
}
.cm-assistant-transcript {
  outline-offset: 4px;
}
.cm-assistant-message {
  overflow-wrap: anywhere;
  margin-bottom: 24px;
}
.cm-assistant-message:last-child {
  margin-bottom: 0;
}
.cm-assistant-speaker {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #666;
  margin-bottom: 5px;
}
.cm-assistant-message p {
  white-space: pre-wrap;
}
.cm-assistant-message-user {
  padding: 12px 14px;
  background: #f2f2ef;
  margin-left: 30px;
}
.cm-assistant-message-user .cm-assistant-speaker {
  color: #555;
}
.cm-assistant-product {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #e3e3e0;
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}
.cm-assistant-product:hover .cm-assistant-product-open {
  text-decoration: underline;
}
.cm-assistant-product img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #f6f6f3;
}
.cm-assistant-product-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.cm-assistant-product-copy strong {
  font-weight: 500;
}
.cm-assistant-product-sizes {
  color: #555;
  font-size: 11px;
}
.cm-assistant-product-open {
  font-size: 12px;
  margin-top: 2px;
}
.cm-assistant-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.cm-assistant-actions a {
  color: #141414;
  text-underline-offset: 4px;
  min-height: 44px;
  padding: 10px 0;
}
.cm-assistant-failure {
  padding: 12px 22px 0;
  font-size: 12px;
}
.cm-assistant-status {
  min-height: 25px;
  padding: 2px 22px 6px;
  font-size: 12px;
  color: #555;
}
.cm-assistant-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 16px 0 22px;
}
.cm-assistant textarea {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  max-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #b2b2ae;
  border-radius: 0;
  background: #fff;
  color: #141414;
  caret-color: #141414;
  font-size: 16px;
}
.cm-assistant textarea::placeholder {
  color: #666;
  opacity: 1;
}
.cm-assistant-send {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  background: #141414;
  color: #fff;
  padding: 11px;
  margin-bottom: 10px;
}
.cm-assistant-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px 8px 22px;
}
.cm-assistant-footer > span {
  font-size: 10px;
  color: #666;
}
.cm-assistant-text-button {
  font-size: 11px !important;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #555;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cm-assistant-text-button:hover {
  color: #141414;
}
body.cm-assistant-mobile-open {
  overflow: hidden;
}
@keyframes cm-assistant-enter {
  from {
    transform: translateY(10px);
  }
  to {
    transform: none;
  }
}
@media (max-width: 640px) {
  .cm-assistant-trigger {
    right: 16px;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 13px;
  }
  .cm-assistant-panel {
    top: var(--cm-assistant-top, 0px);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--cm-assistant-vh);
    min-height: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .cm-assistant-header {
    padding: 14px 12px 14px 18px;
    cursor: default;
    touch-action: auto;
  }
  .cm-assistant-header h2 {
    font-size: 15px;
  }
  .cm-assistant-header p {
    font-size: 11px;
  }
  .cm-assistant-context {
    padding: 10px 18px;
  }
  .cm-assistant-conversation {
    padding: 18px;
  }
  .cm-assistant-form {
    padding: 0 12px 0 18px;
  }
  .cm-assistant-footer {
    padding: 6px 12px 6px 18px;
  }
  .cm-assistant-footer > span {
    max-width: 170px;
  }
  .cm-assistant-status {
    padding-left: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm-assistant-panel {
    animation: none;
  }
  .cm-assistant-trigger {
    transition: none;
  }
}
