.sales-chat {
  --chat-orange: #ff6414;
  --chat-purple: #8d5cff;
  --chat-bg: #202020;
  --chat-panel: #292929;
  --chat-border: rgba(255, 255, 255, .11);
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  color: #f7f7f7;
  font-family: "Roboto Condensed", Arial, sans-serif;
  letter-spacing: 0;
}

.sales-chat *, .sales-chat *::before, .sales-chat *::after { box-sizing: border-box; }
.sales-chat button, .sales-chat textarea { font: inherit; letter-spacing: 0; }
.sales-chat-toggle {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 7px 18px 7px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 15%, rgba(141, 92, 255, .75), transparent 32%),
    linear-gradient(135deg, #18151f 0%, #2b1a46 44%, #ff6414 130%);
  color: #fff;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    0 0 28px rgba(141, 92, 255, .18);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}
.sales-chat-toggle::before {
  content: "";
  position: absolute;
  inset: -60% -20%;
  z-index: -1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 48%, transparent 62%);
  transform: translateX(-65%) rotate(8deg);
  transition: transform .55s ease;
}
.sales-chat-toggle:hover,
.sales-chat-toggle:focus-visible {
  border-color: rgba(255, 255, 255, .42);
  filter: brightness(1.06);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(255, 255, 255, .08) inset,
    0 0 34px rgba(255, 100, 20, .2),
    0 0 42px rgba(141, 92, 255, .28);
  transform: translateY(-3px);
}
.sales-chat-toggle:hover::before,
.sales-chat-toggle:focus-visible::before {
  transform: translateX(70%) rotate(8deg);
}
.sales-chat-toggle-icon {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .24), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  box-shadow:
    0 0 18px rgba(141, 92, 255, .45),
    0 0 0 5px rgba(255, 255, 255, .05);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}
.sales-chat-toggle-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  right: 3px;
  top: 2px;
  border-radius: 50%;
  background: #52d273;
  box-shadow: 0 0 0 3px rgba(82, 210, 115, .16);
}
.sales-chat-toggle b {
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1;
}
.sales-chat-toggle b strong {
  font-size: 17px;
  font-weight: 900;
}
.sales-chat-toggle b small {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.sales-chat.is-open .sales-chat-toggle { visibility: hidden; }
.sales-chat-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(170px, 1fr) auto auto auto;
  width: min(390px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid var(--chat-border);
  border-radius: 8px;
  background: var(--chat-bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}
.sales-chat.is-open .sales-chat-panel { opacity: 1; pointer-events: auto; transform: none; }
.sales-chat-header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--chat-border);
  background: #171717;
}
.sales-chat-header > div { display: flex; align-items: center; gap: 10px; }
.sales-chat-header strong, .sales-chat-header small { display: block; }
.sales-chat-header strong { font-size: 16px; }
.sales-chat-header small { margin-top: 2px; color: #aaa; font-size: 12px; }
.sales-chat-status { width: 10px; height: 10px; border-radius: 50%; background: #52d273; box-shadow: 0 0 0 4px rgba(82, 210, 115, .12); }
.sales-chat-actions { display: flex; align-items: center; gap: 5px; }
.sales-chat-actions button { min-height: 34px; border: 0; background: transparent; color: #bbb; cursor: pointer; }
.sales-chat-actions button:hover, .sales-chat-actions button:focus-visible { color: #fff; }
.sales-chat-actions [data-chat-close] { width: 34px; padding: 0; font-size: 26px; }
.sales-chat-messages { overflow-y: auto; padding: 16px 14px 8px; scrollbar-color: #555 transparent; }
.sales-chat-message { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 13px; }
.sales-chat-message.user { align-items: flex-end; }
.sales-chat-bubble { max-width: 88%; padding: 10px 12px; border: 1px solid var(--chat-border); border-radius: 7px 7px 7px 2px; background: #333; color: #eee; font-size: 14px; line-height: 1.42; white-space: pre-wrap; }
.sales-chat-message.user .sales-chat-bubble { border-color: rgba(255, 100, 20, .5); border-radius: 7px 7px 2px 7px; background: #44281b; }
.sales-chat-products { display: grid; width: 94%; gap: 6px; margin-top: 7px; }
.sales-chat-product { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; min-height: 52px; align-items: center; gap: 9px; padding: 6px; border: 1px solid var(--chat-border); border-radius: 6px; background: #181818; color: #fff; text-decoration: none; }
.sales-chat-product:hover, .sales-chat-product:focus-visible { border-color: var(--chat-orange); }
.sales-chat-product img { width: 40px; height: 40px; border-radius: 3px; object-fit: cover; }
.sales-chat-product strong, .sales-chat-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-chat-product strong { font-size: 13px; }
.sales-chat-product small { margin-top: 2px; color: #999; font-size: 11px; }
.sales-chat-product-offer { display: grid; justify-items: end; gap: 3px; }
.sales-chat-product-offer b { color: #fff; font-size: 13px; }
.sales-chat-product-offer small { color: var(--chat-orange); font-size: 10px; font-weight: 800; }
.sales-chat-suggestions { display: flex; min-height: 59px; gap: 6px; overflow-x: auto; padding: 6px 14px 10px; scrollbar-width: none; }
.sales-chat-suggestions button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(255, 100, 20, .48); border-radius: 16px; background: transparent; color: #eee; font-size: 12px; cursor: pointer; }
.sales-chat-suggestions button:hover, .sales-chat-suggestions button:focus-visible { background: #44281b; }
.sales-chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 10px 12px 7px; border-top: 1px solid var(--chat-border); background: var(--chat-panel); }
.sales-chat-form textarea { min-height: 42px; max-height: 90px; resize: none; padding: 10px 11px; border: 1px solid var(--chat-border); border-radius: 5px; outline: 0; background: #171717; color: #fff; }
.sales-chat-form textarea:focus { border-color: var(--chat-orange); box-shadow: 0 0 0 2px rgba(255, 100, 20, .15); }
.sales-chat-form button { min-width: 68px; border: 0; border-radius: 5px; background: var(--chat-orange); color: #fff; font-weight: 700; cursor: pointer; }
.sales-chat-form button:disabled, .sales-chat-form textarea:disabled { cursor: wait; opacity: .65; }
.sales-chat-note { margin: 0; padding: 0 12px 9px; background: var(--chat-panel); color: #888; font-size: 10px; text-align: center; }
.sales-chat-typing { display: flex; width: fit-content; gap: 4px; margin: 0 0 12px; padding: 12px; border-radius: 7px; background: #333; }
.sales-chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: #aaa; animation: chat-pulse 1s infinite ease-in-out; }
.sales-chat-typing i:nth-child(2) { animation-delay: .15s; }
.sales-chat-typing i:nth-child(3) { animation-delay: .3s; }
.sales-chat .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@keyframes chat-pulse { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .sales-chat-panel, .sales-chat-typing i { transition: none; animation: none; } }
@media (max-width: 540px) {
  .sales-chat { right: 12px; bottom: 12px; }
  .sales-chat-toggle {
    min-height: 50px;
    padding: 6px 13px 6px 7px;
  }
  .sales-chat-toggle-icon {
    width: 34px;
    height: 34px;
  }
  .sales-chat-toggle b strong {
    font-size: 15px;
  }
  .sales-chat-toggle b small {
    display: none;
  }
  .sales-chat-panel { position: fixed; inset: 8px; width: auto; height: auto; border-radius: 6px; }
  .sales-chat-bubble { max-width: 92%; }
}

@media (max-width: 540px) {
  .product-page .sales-chat {
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .product-page .sales-chat-toggle {
    min-height: 44px;
    padding: 5px 10px 5px 6px;
    box-shadow:
      0 12px 30px rgba(0, 0, 0, .42),
      0 0 22px rgba(141, 92, 255, .18);
  }

  .product-page .sales-chat-toggle-icon {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .product-page .sales-chat-toggle b strong {
    font-size: 14px;
  }

  .product-page .sales-chat-panel {
    inset: 8px 8px calc(82px + env(safe-area-inset-bottom)) 8px;
  }
}
