:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  background: #0d111c;
  color: #e8f1ff;
}

.demo-shell {
  max-width: 420px;
  min-height: 100vh;
  margin: 0 auto;
  background: #111827;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, .18);
}

.demo-head {
  padding: 18px 16px 10px;
  background: #121826;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.demo-head h1 {
  margin: 0;
  font-size: 20px;
}

.demo-card {
  margin: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(15, 23, 42, .52));
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
}

.demo-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  font-size: 14px;
}

.demo-card button:not(.chat-launch) {
  margin: 4px 4px 0 0;
  border: 1px solid rgba(251, 191, 36, .24);
  border-radius: 8px;
  color: #ffe178;
  background: rgba(251, 191, 36, .10);
  padding: 8px 10px;
  font-weight: 850;
}

.chat-launch {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  color: #e8f1ff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(15, 23, 42, .52));
  text-align: left;
}

.chat-launch-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #9fc7ff;
  background: rgba(54, 168, 244, .10);
  border: 1px solid rgba(54, 168, 244, .20);
  font-size: 16px;
}

.chat-launch strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e8f1ff;
  font-size: 12px;
  font-weight: 950;
}

.chat-launch small {
  min-width: 0;
  display: block;
  margin-top: 3px;
  color: #9fb1c8;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-launch em {
  min-width: 42px;
  min-height: 24px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffe178;
  background: rgba(251, 191, 36, .10);
  border: 1px solid rgba(251, 191, 36, .24);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.chat-launch.has-new {
  border-color: rgba(251, 191, 36, .42);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, .12), 0 0 18px rgba(251, 191, 36, .12);
}

.chat-launch.has-new em {
  color: #06111f;
  background: linear-gradient(180deg, #ffe778, #f7b718);
  border-color: rgba(255, 224, 120, .72);
}

.chat-modal {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(2, 6, 23, .18);
  backdrop-filter: none;
  overscroll-behavior: contain;
  touch-action: none;
}

.chat-panel {
  width: min(100vw, 430px);
  height: min(100vh, 650px);
  display: grid;
  grid-template-rows: 55px minmax(0, 1fr) auto;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 0;
  background: #111827;
  box-shadow: none;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}

.chat-head {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: #121826;
}

.chat-head strong {
  min-width: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-head span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-head button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  color: #e8f1ff;
  background: rgba(255, 255, 255, .07);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.chat-head button svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
}

.chat-thread {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 18px 12px 12px;
  background: linear-gradient(180deg, #121826 0%, #0d111c 100%);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 96, 243, .70) rgba(15, 23, 42, .72);
}

.chat-thread::-webkit-scrollbar {
  width: 7px;
}

.chat-thread::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, .72);
  border-radius: 999px;
  cursor: default;
}

.chat-thread::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(251, 191, 36, .90), rgba(217, 119, 6, .70));
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .70);
  box-shadow: 0 0 8px rgba(251, 191, 36, .26);
  cursor: grab;
}

.chat-thread::-webkit-scrollbar-thumb:active {
  cursor: grabbing;
}

.chat-time {
  justify-self: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #94a3b8;
  background: rgba(255, 255, 255, .06);
  font-size: 10px;
  font-weight: 850;
}

.chat-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 7px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(148, 163, 184, .18);
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

.chat-row.own .chat-avatar,
.chat-row.buyer .chat-avatar {
  color: #c7f9d4;
  background: rgba(37, 211, 102, .16);
  border-color: rgba(37, 211, 102, .28);
}

.chat-bubble {
  position: relative;
  max-width: 76%;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
  word-break: break-word;
  outline: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.chat-bubble.own,
.chat-bubble.buyer {
  grid-column: 2;
  justify-self: end;
  color: #eaffef;
  background: rgba(37, 211, 102, .18);
  border: 1px solid rgba(37, 211, 102, .28);
}

.chat-bubble.other,
.chat-bubble.seller {
  grid-column: 2;
  justify-self: start;
  color: #e8f1ff;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(148, 163, 184, .18);
}

.chat-bubble.own::after,
.chat-bubble.other::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.chat-bubble.own::after {
  right: -5px;
  border-left: 6px solid rgba(37, 211, 102, .18);
}

.chat-bubble.other::after {
  left: -5px;
  border-right: 6px solid rgba(255, 255, 255, .075);
}

.chat-bubble.is-copy-pressing {
  border-color: rgba(255, 231, 120, .72);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, .18), 0 0 16px rgba(251, 191, 36, .20);
}

.chat-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  border: 1px dashed rgba(255, 255, 255, .16);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.chat-form {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  grid-template-rows: 60px;
  gap: 8px;
  align-items: start;
  padding: 11px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: #111827;
  min-height: 83px;
  box-sizing: border-box;
}

.chat-form.has-pending-image,
.chat-form:has(.chat-pending-image.show) {
  grid-template-rows: 58px 60px;
}

.chat-pending-image {
  grid-column: 1 / -1;
  display: none;
  height: 58px;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .20);
  background: rgba(15, 23, 42, .82);
}

.chat-pending-image.show {
  display: flex;
}

.chat-pending-image img {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .12);
}

.chat-pending-image span {
  min-width: 0;
  flex: 1;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-pending-image button,
.chat-image-btn,
.chat-send-btn {
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .20);
  color: #f8c934;
  background: rgba(15, 23, 42, .82);
  font-size: 20px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  cursor: pointer;
}

.chat-image-btn {
  align-self: start;
  margin-top: 0;
}

.chat-send-btn {
  align-self: start;
  margin-top: 18px;
}

.chat-send-btn svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
  transform: translate(-1px, 1px);
}

.chat-pending-image button {
  flex: 0 0 auto;
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #e8f1ff;
  background: rgba(255, 255, 255, .06);
}

.chat-pending-image button svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  transform: translate(-50%, -50%);
}

.chat-image-btn:active,
.chat-send-btn:active {
  background: rgba(30, 41, 59, .92);
  color: #ffe178;
}

.chat-image-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-file-input {
  display: none;
}

.chat-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 60px;
  max-height: 92px;
  resize: none;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, .20);
  color: #e8f1ff;
  background: rgba(15, 23, 42, .82);
  outline: 0;
  font-size: 16px;
  line-height: 1.32;
  font-weight: 850;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, .45) rgba(15, 23, 42, .72);
  cursor: text;
}

.chat-image {
  display: block;
  width: min(100%, 180px);
  min-height: 92px;
  max-height: 240px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(2, 6, 23, .35);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.chat-bubble.has-image {
  padding: 5px;
  max-width: min(76%, 200px);
}

.chat-copy-menu {
  position: fixed;
  z-index: 1100;
  transform: translate(-50%, -100%);
  padding: 8px;
  border-radius: 10px;
  color: #f8fafc;
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
}

.chat-copy-menu::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(15, 23, 42, .96);
  border-right: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.chat-copy-menu button {
  position: relative;
  z-index: 1;
  min-width: 54px;
  height: 58px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  color: #f8fafc;
  background: transparent;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.chat-toast {
  position: fixed;
  z-index: 1100;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(17, 24, 39, .96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .25);
  font-size: 13px;
}

.chat-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .88);
  backdrop-filter: blur(4px);
}

.chat-image-viewer img {
  max-width: 100%;
  max-height: calc(100vh - 104px);
  object-fit: contain;
  border-radius: 8px;
}

.chat-image-viewer button {
  position: fixed;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  color: #f8fafc;
  background: rgba(15, 23, 42, .72);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.chat-scrollbar {
  position: sticky;
  right: 2px;
  top: 0;
  justify-self: end;
  width: 7px;
  height: 100%;
  display: none;
  grid-row: 1 / -1;
  pointer-events: none;
}

.chat-scrollbar.show {
  display: block;
}

.chat-scrollbar i {
  position: absolute;
  right: 0;
  top: var(--chat-thumb-top, 2px);
  width: 7px;
  height: var(--chat-thumb-height, 24px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(251, 191, 36, .90), rgba(217, 119, 6, .70));
  box-shadow: 0 0 8px rgba(251, 191, 36, .26);
}

/* Canonical mobile Order Messages window, copied into the plugin shell. */
.mobile-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(2, 6, 23, .18);
  overscroll-behavior: contain;
  touch-action: none;
}

.mobile-chat-panel {
  width: min(100%, 430px);
  height: min(100vh, 650px);
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto;
  border: 1px solid rgba(64, 166, 255, .46);
  border-radius: 0;
  background: #0d1526;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}

@media (min-width: 700px) and (min-height: 620px) {
  .mobile-chat-modal {
    align-items: center;
    padding: 28px 0;
  }

  .mobile-chat-panel {
    height: min(650px, calc(100vh - 56px));
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .30);
  }
}

.mobile-chat-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid rgba(64, 166, 255, .24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 12% 0%, rgba(82, 189, 255, .16), transparent 38%),
    linear-gradient(180deg, #12203a 0%, #0f182b 100%);
}

.mobile-chat-head strong {
  min-width: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-chat-title-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}

.mobile-chat-title-copy small {
  color: rgba(224, 236, 255, .62);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-chat-title-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 44%),
    linear-gradient(135deg, #52bdff 0%, #2788ee 62%, #5b68ef 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    inset 0 -2px 0 rgba(5, 48, 127, .22),
    0 8px 18px rgba(39, 136, 238, .24);
  position: relative;
}

.mobile-chat-title-icon::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56zM512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56zM512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mobile-chat-head button {
  width: 89px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #e8f1ff;
  background: transparent;
  line-height: 1;
  cursor: pointer;
}

.mobile-chat-exit-btn img {
  width: 89px;
  height: 42px;
  display: block;
  pointer-events: none;
}

.mobile-chat-exit-btn {
  transition: filter .16s ease, transform .16s ease;
}

.mobile-chat-exit-btn:hover {
  filter: brightness(1.14);
  transform: translateY(-1px);
}

.mobile-chat-thread {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 18px 12px 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(39, 136, 238, .10), transparent 28%),
    linear-gradient(180deg, #101b31 0%, #0b111f 100%);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 96, 128, .34) rgba(15, 23, 42, .36);
}

.mobile-chat-thread::-webkit-scrollbar {
  width: 7px;
}

.mobile-chat-thread:hover::-webkit-scrollbar {
  width: 9px;
}

.mobile-chat-thread::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, .34);
  border-radius: 999px;
  cursor: default;
}

.mobile-chat-thread::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(86, 96, 126, .34), rgba(58, 67, 96, .28));
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .48);
  box-shadow: 0 0 4px rgba(70, 82, 112, .08);
  cursor: grab;
}

.mobile-chat-thread::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(96, 108, 140, .46), rgba(68, 78, 108, .38));
  box-shadow: 0 0 6px rgba(70, 82, 112, .14);
}

.mobile-chat-thread::-webkit-scrollbar-thumb:active {
  cursor: grabbing;
}

.mobile-chat-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 7px;
}

.mobile-chat-time-separator {
  justify-self: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #94a3b8;
  background: rgba(255, 255, 255, .06);
  font-size: 10px;
  font-weight: 850;
}

.mobile-chat-avatar {
  width: 30px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #dbeafe;
  background: rgba(92, 101, 132, .10);
  border: 1px solid rgba(122, 132, 166, .18);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.mobile-chat-row.buyer .mobile-chat-avatar {
  grid-column: 3;
  color: #d7ddf0;
  background: rgba(92, 101, 132, .10);
  border-color: rgba(122, 132, 166, .18);
}

.mobile-chat-bubble {
  position: relative;
  max-width: 76%;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  word-break: break-word;
  outline: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: default;
}

.mobile-chat-bubble[data-chat-copy] {
  cursor: text;
}

.mobile-chat-bubble.buyer {
  grid-column: 2;
  justify-self: end;
  color: #fff;
  background: linear-gradient(135deg, rgba(55, 64, 94, .60) 0%, rgba(59, 56, 96, .56) 100%);
  border: 1px solid rgba(124, 135, 168, .17);
}

.mobile-chat-bubble.seller {
  grid-column: 2;
  justify-self: start;
  color: #e8f1ff;
  background: rgba(75, 83, 112, .08);
  border: 1px solid rgba(124, 135, 168, .15);
}

.mobile-chat-bubble.buyer::after,
.mobile-chat-bubble.seller::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.mobile-chat-bubble.buyer::after {
  right: -5px;
  border-left: 6px solid rgba(58, 60, 94, .58);
}

.mobile-chat-bubble.seller::after {
  left: -5px;
  border-right: 6px solid rgba(75, 83, 112, .08);
}

.mobile-chat-bubble.is-copy-pressing {
  border-color: rgba(255, 231, 120, .72);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, .18), 0 0 16px rgba(251, 191, 36, .20);
}

.mobile-chat-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  border: 1px dashed rgba(64, 166, 255, .24);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.mobile-chat-form {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  grid-template-rows: 60px;
  gap: 8px;
  align-items: start;
  min-height: 83px;
  box-sizing: border-box;
  padding: 11px 10px 10px;
  border-top: 1px solid rgba(64, 166, 255, .22);
  background:
    linear-gradient(180deg, rgba(18, 32, 58, .98), rgba(12, 21, 39, .98));
}

.mobile-chat-form.has-pending-image,
.mobile-chat-form:has(.mobile-chat-pending-image.show) {
  grid-template-rows: 58px 60px;
}

.mobile-chat-pending-image {
  grid-column: 1 / -1;
  display: none;
  height: 58px;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(64, 166, 255, .28);
  background: rgba(15, 23, 42, .82);
}

.mobile-chat-pending-image.show {
  display: flex;
}

.mobile-chat-pending-image img {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(64, 166, 255, .32);
}

.mobile-chat-pending-image span {
  min-width: 0;
  flex: 1;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-chat-pending-image button,
.mobile-chat-image-btn,
.mobile-chat-send-btn {
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(64, 166, 255, .36);
  color: #e8f1ff;
  background: rgba(39, 136, 238, .14);
  font-size: 20px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  cursor: pointer;
}

.mobile-chat-image-btn {
  align-self: start;
}

.mobile-chat-send-btn {
  align-self: start;
  margin-top: 18px;
}

.mobile-chat-send-btn {
  border: 0;
  background: transparent url("assets/send-disabled.png") center / 42px 42px no-repeat;
  box-shadow: none;
  cursor: pointer;
}

.mobile-chat-send-btn.is-send-active {
  background-image: url("assets/send-active.png");
  background-size: 42px 42px;
}

.mobile-chat-image-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-chat-pending-image button {
  flex: 0 0 auto;
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #e8f1ff;
  background: rgba(39, 136, 238, .14);
}

.mobile-chat-pending-image button svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  transform: translate(-50%, -50%);
}

.mobile-chat-file-input {
  display: none;
}

.mobile-chat-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 60px;
  max-height: 92px;
  resize: none;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(64, 166, 255, .30);
  color: #e8f1ff;
  background: rgba(15, 23, 42, .82);
  outline: 0;
  font-size: 16px;
  line-height: 1.32;
  font-weight: 500;
  cursor: text;
}

.mobile-chat-form textarea.is-compose-active {
  border-color: rgba(83, 184, 255, .82);
  box-shadow: 0 0 0 2px rgba(39, 136, 238, .17);
}

.mobile-chat-image {
  display: block;
  width: min(100%, 180px);
  min-height: 92px;
  max-height: 240px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(64, 166, 255, .30);
  background: rgba(2, 6, 23, .35);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.mobile-chat-bubble.has-image {
  padding: 5px;
  max-width: min(76%, 200px);
}

.mobile-chat-image-caption {
  display: block;
  padding: 4px 5px 2px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  word-break: break-word;
}

.mobile-chat-scrollbar {
  position: sticky;
  right: 7px;
  top: 0;
  justify-self: end;
  width: 6px;
  height: 100%;
  display: none;
  grid-row: 1 / -1;
  pointer-events: none;
  cursor: grab;
}

.mobile-chat-scrollbar.show {
  display: block;
}

.mobile-chat-scrollbar i {
  position: absolute;
  right: 0;
  top: var(--mobile-chat-thumb-top, 2px);
  width: 5px;
  height: var(--mobile-chat-thumb-height, 24px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(83, 184, 255, .24), rgba(39, 136, 238, .16));
  box-shadow: none;
  transition: width .16s ease, filter .16s ease, box-shadow .16s ease;
  cursor: grab;
}

.mobile-chat-thread:hover .mobile-chat-scrollbar i {
  width: 7px;
  filter: brightness(1.06);
  box-shadow: 0 0 5px rgba(39, 136, 238, .10);
}

.mobile-chat-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .88);
  backdrop-filter: blur(4px);
}

.mobile-chat-image-viewer img {
  max-width: 100%;
  max-height: calc(100vh - 104px);
  object-fit: contain;
  border-radius: 8px;
}

.mobile-chat-image-viewer button {
  position: fixed;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(64, 166, 255, .40);
  color: #f8fafc;
  background: rgba(39, 136, 238, .18);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.mobile-chat-copy-menu {
  position: fixed;
  z-index: 1200;
  transform: translate(-50%, -100%);
  padding: 8px;
  border-radius: 10px;
  color: #f8fafc;
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(64, 166, 255, .36);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38), 0 0 0 2px rgba(39, 136, 238, .08);
}

.mobile-chat-copy-menu::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(15, 23, 42, .96);
  border-right: 1px solid rgba(64, 166, 255, .36);
  border-bottom: 1px solid rgba(64, 166, 255, .36);
}

.mobile-chat-copy-menu button {
  position: relative;
  z-index: 1;
  min-width: 54px;
  height: 58px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  color: #f8fafc;
  background: transparent;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.zayse-chat-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.zayse-chat-modal select,
.zayse-chat-modal textarea,
.mobile-chat-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.mobile-chat-modal select,
.mobile-chat-modal textarea,
.chat-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.chat-modal select,
.chat-modal textarea,
[data-chat-input] {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
