#ww-chat-root {
  --wwc-accent: #111111;
  --wwc-coral: #f45d48;
  --wwc-gold: #f5b84b;
  --wwc-mint: #36a884;
  --wwc-ink: #181716;
  --wwc-paper: #fbfaf7;
  --wwc-line: #e4e0d7;
  bottom: 22px;
  color: var(--wwc-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  right: 22px;
  z-index: 2147483000;
}

#ww-chat-root * {
  box-sizing: border-box;
}

.wwc-launcher {
  align-items: center;
  background: var(--wwc-accent);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(18, 18, 18, 0.26);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  height: 60px;
  justify-content: center;
  padding: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  width: 60px;
}

.wwc-launcher:hover,
.wwc-launcher:focus-visible {
  background: #242321;
  box-shadow: 0 20px 48px rgba(18, 18, 18, 0.32);
  outline: none;
  transform: translateY(-2px);
}

.wwc-launcher__icon,
.wwc-launcher svg {
  display: block;
  height: 29px;
  width: 29px;
}

.wwc-launcher svg {
  fill: currentColor;
}

.wwc-panel {
  background: var(--wwc-paper);
  border: 1px solid rgb(6 171 0);
  border-radius: 8px;
  bottom: 76px;
  box-shadow: 0 24px 70px rgba(18, 18, 18, 0.25);
  display: flex;
  flex-direction: column;
  height: min(640px, calc(100vh - 112px));
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 160ms ease, transform 160ms ease;
  width: min(390px, calc(100vw - 32px));
}

.wwc-open .wwc-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.wwc-open .wwc-launcher {
  transform: scale(0.94);
}

.wwc-header {
  align-items: center;
  background:
    linear-gradient(135deg, rgb(6 72 1), rgb(0 0 0)), var(--wwc-accent);
  color: #ffffff;
  display: flex;
  gap: 12px;
  min-height: 76px;
  padding: 15px 16px;
}

.wwc-header__mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  display: flex;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.wwc-header__copy {
  min-width: 0;
}

.wwc-header h2 {
  color: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.wwc-header span {
  color: rgba(255, 255, 255, 0.84);
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
}

.wwc-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  width: 34px;
}

.wwc-close:hover,
.wwc-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.wwc-close svg {
  fill: currentColor;
  height: 19px;
  width: 19px;
}

.wwc-messages {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(251, 250, 247, 0.9)),
    var(--wwc-paper);
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px 14px;
}

.wwc-message {
  display: flex;
  width: 100%;
}

.wwc-message--animate {
  animation: wwcMessageIn 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.wwc-message--user {
  justify-content: flex-end;
}

.wwc-message--assistant {
  justify-content: flex-start;
}

.wwc-message__bubble {
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  max-width: min(82%, 300px);
  overflow-wrap: anywhere;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.wwc-message--assistant .wwc-message__bubble {
  background: #ffffff;
  border: 1px solid var(--wwc-line);
  color: #23201d;
}

.wwc-message--user .wwc-message__bubble {
  background: var(--wwc-accent);
  color: #ffffff;
}

.wwc-message__bubble--markdown {
  display: grid;
  gap: 8px;
  white-space: normal;
}

.wwc-markdown__paragraph,
.wwc-markdown__heading,
.wwc-markdown__quote,
.wwc-markdown__pre,
.wwc-markdown__list {
  margin: 0;
}

.wwc-markdown__heading {
  color: #151412;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.28;
}

.wwc-markdown__list {
  display: grid;
  gap: 5px;
  padding-left: 19px;
}

.wwc-markdown__list li {
  padding-left: 1px;
}

.wwc-markdown__quote {
  border-left: 3px solid var(--wwc-coral);
  color: #514b45;
  padding-left: 9px;
}

.wwc-markdown__pre {
  background: #f3f0e9;
  border: 1px solid #e0dbd0;
  border-radius: 7px;
  color: #221f1c;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
  padding: 9px 10px;
  white-space: pre;
}

.wwc-message__bubble--markdown code {
  background: #f3f0e9;
  border: 1px solid #e0dbd0;
  border-radius: 5px;
  color: #221f1c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  padding: 1px 4px;
}

.wwc-message__bubble--markdown pre code {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.wwc-message__bubble--markdown a {
  color: var(--wwc-accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.wwc-message__bubble--markdown strong {
  font-weight: 800;
}

.wwc-message--pending .wwc-message__bubble {
  align-items: center;
  display: flex;
  gap: 5px;
  min-height: 38px;
  min-width: 58px;
}

.wwc-message--pending span {
  animation: wwcPulse 1s ease-in-out infinite;
  background: var(--wwc-mint);
  border-radius: 50%;
  display: block;
  height: 7px;
  opacity: 0.42;
  width: 7px;
}

.wwc-message--pending span:nth-child(2) {
  animation-delay: 130ms;
}

.wwc-message--pending span:nth-child(3) {
  animation-delay: 260ms;
}

.wwc-form {
  background: #ffffff;
  border-top: 1px solid var(--wwc-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.wwc-composer {
  align-items: flex-end;
  display: flex;
  gap: 9px;
  width: 100%;
}

.wwc-attach {
  align-items: center;
  background: #f5f3ee;
  border: 1px solid #ded9cf;
  border-radius: 8px;
  color: #39352f;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  width: 44px;
}

.wwc-form .wwc-attach {
  align-self: flex-end;
  margin: 0;
}

.wwc-attach:hover,
.wwc-attach:focus-within {
  background: #ffffff;
  border-color: var(--wwc-mint);
  color: var(--wwc-accent);
  outline: none;
}

.wwc-file {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.wwc-attach svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.wwc-attachments {
  display: grid;
  gap: 7px;
  width: 100%;
}

.wwc-attachments[hidden] {
  display: none;
}

.wwc-attachments__list {
  display: grid;
  gap: 6px;
}

.wwc-attachment {
  align-items: center;
  background: #f5f3ee;
  border: 1px solid #ded9cf;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 46px;
  padding: 6px 7px;
}

.wwc-attachment__preview {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e0d7;
  border-radius: 7px;
  color: #6b655c;
  display: flex;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

.wwc-attachment__preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.wwc-attachment__meta {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.wwc-attachment__name {
  color: #24211d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wwc-attachment__size,
.wwc-attachments__error {
  color: #706960;
  font-size: 11px;
  line-height: 1.3;
}

.wwc-attachments__error {
  color: #a33a2b;
  font-weight: 700;
}

.wwc-attachment__remove {
  align-items: center;
  background: #ffffff;
  border: 1px solid #ded9cf;
  border-radius: 50%;
  color: #403b35;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  font-size: 18px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 28px;
}

.wwc-attachment__remove svg {
  display: block;
  fill: currentColor;
  height: 17px;
  width: 17px;
}

.wwc-attachment__remove:hover,
.wwc-attachment__remove:focus-visible {
  border-color: var(--wwc-mint);
  color: var(--wwc-accent);
  outline: none;
}

.wwc-input {
  background: #f5f3ee;
  border: 1px solid #ded9cf;
  border-radius: 8px;
  color: var(--wwc-ink);
  flex: 1;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  max-height: 120px;
  min-height: 44px;
  outline: none;
  padding: 11px 12px;
  resize: none;
}

.wwc-input:focus {
  background: #ffffff;
  border-color: var(--wwc-mint);
  box-shadow: 0 0 0 3px rgba(54, 168, 132, 0.18);
}

.wwc-send {
  align-items: center;
  background: var(--wwc-accent);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 46px;
}

.wwc-send:hover,
.wwc-send:focus-visible {
  background: #242321;
  outline: none;
}

.wwc-send:disabled {
  cursor: wait;
  opacity: 0.62;
}

.wwc-send svg {
  fill: currentColor;
  height: 21px;
  width: 21px;
}

@keyframes wwcPulse {
  0%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes wwcMessageIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wwc-message--animate,
  .wwc-message--pending span {
    animation: none;
  }

  .wwc-panel,
  .wwc-launcher {
    transition: none;
  }
}

@media (max-width: 767.98px) {
  #ww-chat-root {
    bottom: 14px;
    right: 14px;
  }

  .wwc-panel {
    bottom: 72px;
    height: min(620px, calc(100vh - 96px));
    right: 0;
    width: min(390px, calc(100vw - 28px));
  }

  .wwc-launcher {
    display: none;
  }
}

@media (max-width: 520px) {
  .wwc-panel {
    width: calc(100vw - 28px);
  }
}
