.bark-ai {
  position: fixed;
  right: 96px;
  bottom: 20px;
  z-index: 10050;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.bark-ai * {
  box-sizing: border-box;
}

.bark-ai__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 16px 8px 8px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  cursor: pointer;
}

.bark-ai__launcher-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
}

.bark-ai__launcher-label {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.bark-ai__panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  display: none;
  flex-direction: column;
  width: 390px;
  height: min(610px, calc(100vh - 105px));
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

.bark-ai__panel--open {
  display: flex;
}

.bark-ai__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-bottom: 1px solid #ececec;
  background: #fff;
}

.bark-ai__title {
  color: #111;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
}

.bark-ai__subtitle {
  margin-top: 3px;
  color: #777;
  font-size: 12px;
}

.bark-ai__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
  color: #222;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.bark-ai__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  background: #f7f7f7;
  overscroll-behavior: contain;
}

.bark-ai__message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

.bark-ai__message--assistant {
  margin-right: auto;
  border-bottom-left-radius: 5px;
  background: #fff;
  color: #222;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.bark-ai__message--user {
  margin-left: auto;
  border-bottom-right-radius: 5px;
  background: #111;
  color: #fff;
}

.bark-ai__typing {
  color: #777;
}

.bark-ai__products {
  display: grid;
  gap: 8px;
  margin: 3px 0 14px;
}

.bark-ai__product {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 11px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}

.bark-ai__product:hover,
.bark-ai__product:focus {
  color: inherit;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .08);
}

.bark-ai__product-image {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: #fafafa;
}

.bark-ai__product-body {
  min-width: 0;
  padding: 2px 0;
}

.bark-ai__product-name {
  display: -webkit-box;
  overflow: hidden;
  color: #191919;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bark-ai__product-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}

.bark-ai__product-price {
  color: #111;
  font-size: 14px;
  font-weight: 800;
}

.bark-ai__product-old-price {
  color: #999;
  font-size: 11px;
  text-decoration: line-through;
}

.bark-ai__product-stock {
  margin-top: 3px;
  color: #717171;
  font-size: 11px;
}

.bark-ai__form {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  padding: 10px 10px 8px;
  border-top: 1px solid #ececec;
  background: #fff;
}

.bark-ai__input {
  width: 100%;
  min-height: 44px;
  max-height: 110px;
  resize: none;
  padding: 11px 12px;
  border: 1px solid #ddd;
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.bark-ai__input:focus {
  border-color: #999;
}

.bark-ai__send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: #111;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.bark-ai__send:disabled,
.bark-ai__input:disabled {
  opacity: .55;
  cursor: default;
}

.bark-ai__note {
  padding: 0 12px 9px;
  background: #fff;
  color: #999;
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 560px) {
  .bark-ai {
    right: 88px;
    bottom: 12px;
  }

  .bark-ai__launcher {
    min-height: 54px;
  }

  .bark-ai__launcher-label {
    display: none;
  }

  .bark-ai__launcher {
    width: 54px;
    padding: 7px;
  }

  .bark-ai__panel {
    position: fixed;
    right: 10px;
    bottom: 76px;
    width: calc(100vw - 20px);
    height: min(650px, calc(100dvh - 92px));
    border-radius: 18px;
  }
}
