.product-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  font-family: inherit
}

.product-chat__toggle {
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand-green);
  color: #fff;
  padding: .85rem 1.15rem;
  box-shadow: 0 12px 35px #21451960;
  cursor: pointer;
  font-size: .9rem
}

.product-chat__toggle span {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .01em
}

.product-chat__icon { width: 1.65rem; height: 1.65rem; flex-shrink: 0; }
.product-chat__toggle { min-height: 3.5rem; border: 1px solid #ffffff30; transition: background .2s, box-shadow .2s; }
.product-chat__toggle:hover { background: #284b36; box-shadow: 0 8px 24px #21451940; }
.product-chat__toggle:focus-visible { outline: 3px solid #92ae78; outline-offset: 4px; }
.product-chat__panel { max-height: calc(100dvh - 7rem); }

.product-chat__panel {
  position: absolute;
  right: 0;
  bottom: 4.25rem;
  width: min(390px, calc(100vw - 2rem));
  height: min(600px, calc(100vh - 7rem));
  overflow: hidden;
  border: 1px solid #eae3cf;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 20px 55px #21451945
}

.product-chat__panel:not([hidden]) {
  display: flex;
  flex-direction: column
}

.product-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-green);
  color: #fff;
  padding: 1rem 1.1rem
}

.product-chat__header strong,
.product-chat__header span {
  display: block
}

.product-chat__header span {
  margin-top: .15rem;
  font-size: .72rem;
  opacity: .75
}

.product-chat__header button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.7rem;
  cursor: pointer
}

.product-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--brand-cream)
}

.product-chat__message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: .7rem;
  border-radius: 1rem;
  padding: .7rem .85rem;
  font-size: .88rem;
  line-height: 1.5;
  white-space: pre-wrap
}

.product-chat__message a {
  font-weight: 700;
  text-decoration: underline
}

.product-chat__message--assistant {
  background: #fff;
  border: 1px solid #eae3cf;
  color: #34342f
}

.product-chat__message--user {
  margin-left: auto;
  background: var(--brand-green);
  color: #fff
}

.product-chat__message--loading {
  color: #666b5e
}

.product-chat__suggestions {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding: .55rem .8rem;
  background: var(--brand-cream)
}

.product-chat__suggestions button {
  flex: none;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-green);
  padding: .45rem .7rem;
  font-size: .72rem;
  cursor: pointer
}

.product-chat__form {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  border-top: 1px solid #eae3cf;
  padding: .75rem
}

.product-chat__form textarea {
  flex: 1;
  max-height: 6rem;
  resize: none;
  border: 1px solid #d8ceb3;
  border-radius: 1rem;
  padding: .7rem .8rem;
  font: inherit;
  font-size: .88rem;
  outline: none
}

.product-chat__form textarea:focus {
  border-color: var(--brand-leaf)
}

.product-chat__form button {
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand-green);
  color: #fff;
  cursor: pointer
}

.product-chat__form button:disabled {
  opacity: .5
}

.product-chat__note {
  margin: 0;
  padding: 0 .8rem .6rem;
  color: #666b5e;
  text-align: center;
  font-size: .65rem
}

@media(max-width:520px) {
  .product-chat {
    right: .75rem;
    bottom: .75rem
  }

  .product-chat__panel {
    position: fixed;
    inset: auto .75rem 5rem;
    width: auto;
    height: min(32rem, 72dvh);
    max-height: calc(100dvh - 6rem)
  }

  .product-chat__toggle strong {
    display: none
  }
}

.product-chat__products {
  display: grid;
  gap: .55rem;
  margin: .1rem 0 .8rem
}

.product-chat__product {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  border: 1px solid #eae3cf;
  border-radius: 1rem;
  background: #fff;
  padding: .55rem
}

.product-chat__product>button {
  border: 0;
  border-radius: .7rem;
  background: var(--brand-green);
  color: #fff;
  padding: .55rem .65rem;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer
}

.product-chat__product>button.is-added {
  background: var(--brand-leaf)
}

.product-chat__product img {
  width: 3rem;
  height: 3rem;
  border-radius: .7rem;
  object-fit: cover;
  background: #f7f3e7
}

.product-chat__product-info {
  min-width: 0
}

.product-chat__product-info a {
  display: block;
  overflow: hidden;
  color: #292923;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap
}

.product-chat__product-info span {
  display: block;
  margin-top: .2rem;
  color: #617064;
  font-size: .68rem
}

