.luna-seller-chat-trigger {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid #8000ff;
  border-radius: 8px;
  background: #fff;
  color: #6500c8;
  font: 600 14px/1.2 Montserrat, Arial, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.luna-seller-chat-trigger:hover,
.luna-seller-chat-trigger:focus-visible {
  background: #f7f1ff;
  color: #51059d;
  box-shadow: 0 6px 18px rgba(81, 5, 157, .12);
  outline: 0;
}

.luna-seller-chat-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.luna-product-seller-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.luna-product-seller-wrap .luna-product-seller__profile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.luna-product-seller-wrap .luna-seller-chat-trigger {
  width: 100%;
}

.luna-buyer-chat[hidden] {
  display: none !important;
}

.luna-buyer-chat {
  position: fixed;
  z-index: 13050;
  top: var(--luna-buyer-chat-viewport-top, 0);
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: var(--luna-buyer-chat-vh, 100dvh);
  font-family: Montserrat, Arial, sans-serif;
  color: #1e1b2e;
}

.luna-buyer-chat *,
.luna-buyer-chat *::before,
.luna-buyer-chat *::after {
  box-sizing: border-box;
}

.luna-buyer-chat__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(24, 20, 33, .48);
  cursor: default;
}

.luna-buyer-chat__dialog {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(460px, calc(100vw - 36px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #e4deed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(30, 27, 46, .24);
}

.luna-buyer-chat__head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid #ece7f1;
  background: #fff;
}

.luna-buyer-chat__avatar {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1e7ff;
  color: #6500c8;
}

.luna-buyer-chat__avatar svg {
  width: 22px;
  height: 22px;
}

.luna-buyer-chat__title {
  min-width: 0;
  flex: 1 1 auto;
}

.luna-buyer-chat__title strong,
.luna-buyer-chat__title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luna-buyer-chat__title strong {
  font-size: 15px;
  font-weight: 700;
}

.luna-buyer-chat__title span {
  margin-top: 3px;
  color: #706a7c;
  font-size: 12px;
}

.luna-buyer-chat__close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4d4858;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.luna-buyer-chat__close:hover,
.luna-buyer-chat__close:focus-visible {
  background: #f3f1f6;
  outline: 0;
}

.luna-buyer-chat__messages {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  background: #f7f6f9;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.luna-buyer-chat__state {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 28px;
  color: #706a7c;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.luna-buyer-chat__message {
  display: flex;
  margin-bottom: 10px;
}

.luna-buyer-chat__message.is-own {
  justify-content: flex-end;
}

.luna-buyer-chat__bubble {
  width: fit-content;
  max-width: 88%;
  padding: 10px 12px 7px;
  border: 1px solid #e6e1eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(30, 27, 46, .04);
}

.luna-buyer-chat__message.is-own .luna-buyer-chat__bubble {
  border-color: #e7d6fb;
  background: #f1e7ff;
}

.luna-buyer-chat__body {
  margin: 0;
  color: #2d2936;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.luna-buyer-chat__time {
  display: block;
  margin-top: 5px;
  color: #817b8b;
  font-size: 10px;
  line-height: 1.2;
  text-align: right;
}

.luna-buyer-chat__product {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  margin: -2px -4px 10px;
  padding: 8px;
  border: 1px solid #e8e3ed;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.luna-buyer-chat__product-media {
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: #f1eff4;
  color: #8b8495;
}

.luna-buyer-chat__product-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.luna-buyer-chat__product-copy {
  min-width: 0;
  align-self: center;
}

.luna-buyer-chat__product-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1e1b2e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.luna-buyer-chat__product-copy span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #706a7c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luna-buyer-chat__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #e8e3ed;
  background: #fff;
}

.luna-buyer-chat__composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 11px 12px;
  border: 1px solid #dcd5e6;
  border-radius: 8px;
  outline: 0;
  color: #1e1b2e;
  font: 500 13px/1.45 Montserrat, Arial, sans-serif;
  letter-spacing: 0;
}

.luna-buyer-chat__composer textarea:focus {
  border-color: #8000ff;
  box-shadow: 0 0 0 3px rgba(128, 0, 255, .1);
}

.luna-buyer-chat__send {
  display: inline-flex;
  min-width: 46px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: #8000ff;
  color: #fff;
  font: 700 13px/1 Montserrat, Arial, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
}

.luna-buyer-chat__send:disabled {
  cursor: wait;
  opacity: .58;
}

.luna-buyer-chat__send svg {
  width: 17px;
  height: 17px;
}

body.luna-buyer-chat-open {
  overflow: hidden;
}

body.luna-buyer-chat-open .luna-appeal-widget,
body.luna-buyer-chat-open .luna-mobile-nav__item--chat {
  visibility: hidden !important;
  pointer-events: none !important;
}

.luna-appeal-channel--supplier .luna-appeal-channel__icon--supplier {
  background: #6500c8;
  color: #fff;
  box-shadow: 0 8px 20px rgba(81, 5, 157, .18);
}

.luna-appeal-channel--supplier .luna-appeal-channel__icon--supplier::before {
  display: none;
}

.luna-appeal-channel--supplier .luna-appeal-channel__icon--supplier svg {
  width: 32px;
  height: 32px;
  filter: none;
}

.luna-appeal-channel--supplier small b {
  color: #6500c8;
  font-weight: 800;
}

@media (max-width: 640px) {
  .element {
    overflow-x: clip;
  }

  .element__info,
  .element__left-column {
    min-width: 0;
    max-width: 100%;
  }

  .element__left-column {
    width: 100%;
  }

  .luna-product-seller-wrap .luna-product-seller__profile {
    gap: 12px;
  }

  .luna-product-seller-wrap .luna-seller-chat-trigger {
    width: 100%;
  }

  .luna-buyer-chat__dialog {
    inset: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
  }

  .luna-buyer-chat__head {
    min-height: 64px;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  }

  .luna-buyer-chat__messages {
    padding: 12px;
  }

  .luna-buyer-chat__composer {
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  }

  .luna-buyer-chat__send span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .luna-seller-chat-trigger {
    transition: none;
  }
}
