.website-chat {
  --website-chat-blue: #0f172a;
  --website-chat-blue-hover: #1d3150;
  --website-chat-ink: #0f172a;
  --website-chat-muted: #64748b;
  --website-chat-line: #d7e0e8;
  --website-chat-surface: rgba(255, 255, 255, 0.96);
  --website-chat-soft: #f7fafc;
  --website-chat-green: #16a06d;
  --website-chat-panel-width: min(380px, calc(100vw - 24px));
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483647;
  display: grid;
  justify-items: end;
  max-width: min(760px, calc(100vw - 24px));
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--website-chat-ink);
}

.website-chat[data-dock="left"] {
  right: auto;
  left: 18px;
  justify-items: start;
}

.website-chat[data-expanded="true"] {
  --website-chat-panel-width: min(760px, calc(100vw - 24px));
}

.website-chat * {
  box-sizing: border-box;
}

.website-chat__launcher,
.website-chat__form button,
.website-chat header button {
  border: 1px solid var(--website-chat-blue);
  background: var(--website-chat-blue);
  color: #fff;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.website-chat__launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 96px;
  min-height: 44px;
  padding: 0 14px;
  letter-spacing: 0;
  box-shadow:
    0 16px 38px rgba(15, 23, 42, 0.3),
    0 3px 10px rgba(15, 23, 42, 0.16);
}

.website-chat__icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.website-chat__launcher[data-unread="true"] {
  background: var(--website-chat-blue-hover);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 0 4px rgba(15, 23, 42, 0.18);
}

.website-chat__launcher[data-typing="true"] {
  background: var(--website-chat-blue);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    0 0 0 4px rgba(15, 23, 42, 0.16);
}

.website-chat__launcher[data-unread="true"]::after {
  content: attr(data-unread-count);
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

.website-chat__launcher[hidden] {
  display: none;
}

.website-chat__panel {
  width: var(--website-chat-panel-width);
  min-width: min(380px, calc(100vw - 24px));
  max-width: min(760px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 96px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: var(--website-chat-surface);
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.24),
    0 8px 20px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.website-chat__panel[hidden] {
  display: none;
}

.website-chat header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--website-chat-blue);
  color: #f8fafc;
}

.website-chat__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.website-chat__brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.website-chat__title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.website-chat__title strong {
  font-size: 1rem;
  line-height: 1.15;
}

.website-chat__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.website-chat__presence {
  width: fit-content;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1;
}

.website-chat__presence::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #9aa8a0;
  display: inline-block;
  margin-right: 0.35rem;
  vertical-align: 0.05rem;
}

.website-chat__presence[data-online="true"] {
  color: #bbf7d0;
}

.website-chat__presence[data-online="true"]::before {
  background: var(--website-chat-green);
}

.website-chat__icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #e5edf6;
  border-color: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}

.website-chat__icon-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.website-chat__icon-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}

.website-chat__icon-button:focus-visible,
.website-chat__launcher:focus-visible,
.website-chat__history:focus-visible,
.website-chat__form button:focus-visible {
  outline: 3px solid rgba(134, 197, 189, 0.55);
  outline-offset: 2px;
}

.website-chat__icon-button[aria-pressed="true"] {
  background: #f8fafc;
  color: var(--website-chat-blue);
  border-color: #f8fafc;
}

.website-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  background: var(--website-chat-soft);
  scrollbar-color: #94a3b8 transparent;
}

.website-chat__empty {
  margin: auto;
  color: #596a60;
  text-align: center;
}

.website-chat__history {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--website-chat-line);
  border-radius: 6px;
  background: #fff;
  color: var(--website-chat-blue);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.website-chat__history:hover {
  border-color: #6ba99e;
  background: #f8fafc;
}

.website-chat__history:disabled {
  cursor: wait;
  opacity: 0.7;
}

.website-chat__history .website-chat__icon {
  width: 16px;
  height: 16px;
}

.website-chat__message {
  width: max-content;
  min-width: 0;
  max-width: min(86%, 520px);
  padding: 10px 12px;
  border: 1px solid var(--website-chat-line);
  border-radius: 8px;
  background: #fff;
  color: var(--website-chat-ink);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.website-chat__message--inbound {
  align-self: flex-end;
  background: #e8f6ee;
  border-color: #9fd5bb;
}

.website-chat__message--outbound {
  align-self: flex-start;
}

.website-chat__message--inbound strong {
  color: #0f766e;
}

.website-chat__message--outbound strong {
  color: var(--website-chat-blue);
}

.website-chat__message--typing {
  min-width: 74px;
}

.website-chat__message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: #365945;
  letter-spacing: 0;
}

.website-chat__message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.45;
}

.website-chat__typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 30px;
}

.website-chat__typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.36;
  animation: website-chat-typing 1.1s ease-in-out infinite;
}

.website-chat__typing-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.website-chat__typing-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes website-chat-typing {
  0%,
  80%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }
  40% {
    opacity: 0.85;
    transform: translateY(-1px);
  }
}

.website-chat__media {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.website-chat__media:first-child {
  margin-top: 0;
}

.website-chat__media a {
  display: block;
  max-width: min(240px, 68vw);
  border: 1px solid #cbd8d1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.website-chat__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.website-chat__products {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.website-chat__products:first-child {
  margin-top: 0;
}

.website-chat__product {
  display: grid;
  gap: 2px;
  max-width: min(260px, 70vw);
  padding: 9px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
  color: var(--website-chat-blue);
  text-decoration: none;
}

.website-chat__product strong,
.website-chat__product small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.website-chat__product strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.website-chat__product small {
  color: var(--website-chat-muted);
  font-size: 0.7rem;
  font-weight: 750;
}

a.website-chat__product:hover {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #dbeafe, #f8fafc);
}

.website-chat__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.website-chat__identity {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 8px;
  padding-bottom: 2px;
}

.website-chat__identity[hidden] {
  display: none;
}

.website-chat__identity p,
.website-chat__identity small {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--website-chat-muted);
}

.website-chat__identity p {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--website-chat-ink);
}

.website-chat__identity label {
  display: grid;
  gap: 4px;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
}

.website-chat__identity label em {
  color: #7b8b82;
  font-style: normal;
  font-weight: 700;
}

.website-chat__identity input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: var(--website-chat-ink);
  background: #f8fafc;
}

.website-chat__identity[data-invalid="true"] input[name="chat_contact"] {
  border-color: #b42318;
}

.website-chat__identity[data-invalid="true"] small {
  color: #b42318;
  font-weight: 750;
}

.website-chat__form textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  resize: none;
  min-height: 82px;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  color: var(--website-chat-ink);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.website-chat__form textarea:focus,
.website-chat__identity input:focus {
  outline: none;
  border-color: #86c5bd;
  box-shadow: 0 0 0 3px rgba(134, 197, 189, 0.3);
}

.website-chat__composer-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.website-chat__form button {
  min-width: 92px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.website-chat__form button:hover {
  background: var(--website-chat-blue-hover);
}

.website-chat__shortcuts {
  margin: 0;
  color: var(--website-chat-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .website-chat__launcher {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    gap: 0;
    padding: 0;
  }

  .website-chat__launcher span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 390px) {
  .website-chat {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-items: end;
    max-width: none;
  }

  .website-chat[data-dock="left"] {
    right: 12px;
    left: 12px;
    justify-items: end;
  }

  .website-chat__panel {
    min-width: 0;
  }

  .website-chat__identity {
    grid-template-columns: 1fr;
  }

  .website-chat header {
    align-items: flex-start;
    gap: 8px;
    padding: 11px 12px;
  }

  .website-chat__header-actions {
    gap: 4px;
  }

  .website-chat__brand-mark {
    display: none;
  }

  .website-chat__icon-button {
    width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .website-chat__form {
    padding: 12px;
  }

  .website-chat__composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .website-chat__form button {
    width: 100%;
  }
}
