#wm-livechat-root {
  --wm-chat-red: #ed1c24;
  --wm-chat-yellow: #ffeb00;
  --wm-chat-ink: #101820;
  --wm-chat-panel: #fff;
  --wm-chat-soft: #f2f5f7;
  --wm-chat-line: #d7e0e6;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--wm-chat-ink);
  letter-spacing: 0;
}

.wm-livechat-launcher {
  display: flex;
  width: 64px;
  height: 64px;
  margin-left: auto;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #087cf0;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .28),
    inset 0 0 0 1px rgba(255, 255, 255, .32);
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.wm-livechat-launcher:hover,
.wm-livechat-launcher:focus-visible {
  background: #006fe0;
  transform: translateY(-2px);
  box-shadow:
    0 13px 28px rgba(0, 0, 0, .32),
    inset 0 0 0 1px rgba(255, 255, 255, .38);
}

.wm-livechat-launcher:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.wm-livechat-launcher-icon {
  position: relative;
  display: block;
  width: 38px;
  height: 31px;
}

.wm-livechat-launcher-icon::before,
.wm-livechat-launcher-icon::after {
  position: absolute;
  content: "";
}

.wm-livechat-launcher-icon::before {
  top: 2px;
  left: 1px;
  width: 36px;
  height: 24px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 66, 143, .2);
}

.wm-livechat-launcher-icon::after {
  right: 7px;
  bottom: 1px;
  width: 10px;
  height: 9px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.wm-livechat-panel {
  display: grid;
  width: min(390px, calc(100vw - 24px));
  height: min(650px, calc(100vh - 104px));
  margin-bottom: 12px;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--wm-chat-line);
  border-radius: 8px;
  background: var(--wm-chat-panel);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .32);
}

.wm-livechat-panel[hidden],
.wm-livechat-launcher[hidden] {
  display: none;
}

.wm-livechat-header {
  display: flex;
  min-height: 66px;
  padding: 10px 12px;
  align-items: center;
  gap: 10px;
  border-top: 4px solid var(--wm-chat-yellow);
  border-bottom: 1px solid #293845;
  background: var(--wm-chat-ink);
  color: #fff;
}

.wm-livechat-header img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.wm-livechat-header-copy {
  min-width: 0;
  flex: 1;
}

.wm-livechat-header-copy strong,
.wm-livechat-header-copy span {
  display: block;
}

.wm-livechat-header-copy strong {
  font-size: 16px;
}

.wm-livechat-header-copy span {
  margin-top: 2px;
  color: #c8d3da;
  font-size: 12px;
}

.wm-livechat-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.wm-livechat-body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  background: #fff;
}

.wm-livechat-screen {
  display: flex;
  min-height: 100%;
  padding: 20px;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.wm-livechat-screen h2,
.wm-livechat-screen p {
  margin: 0;
}

.wm-livechat-screen h2 {
  font-size: 20px;
}

.wm-livechat-screen p {
  color: #526472;
  font-size: 14px;
  line-height: 1.5;
}

.wm-livechat-field {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.wm-livechat-field input,
.wm-livechat-field select,
.wm-livechat-field textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #b9c7d0;
  border-radius: 5px;
  outline: 0;
  background: #fff;
  color: #101820;
  font: inherit;
  font-weight: 400;
  letter-spacing: 0;
}

.wm-livechat-field textarea {
  min-height: 112px;
  resize: vertical;
}

.wm-livechat-field input:focus,
.wm-livechat-field select:focus,
.wm-livechat-field textarea:focus {
  border-color: var(--wm-chat-red);
  box-shadow: 0 0 0 3px rgba(237, 28, 36, .12);
}

.wm-livechat-button {
  display: inline-flex;
  min-height: 42px;
  padding: 10px 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wm-chat-red);
  border-radius: 5px;
  background: var(--wm-chat-red);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.wm-livechat-button:disabled {
  opacity: .55;
  cursor: wait;
}

.wm-livechat-button--secondary {
  border-color: #b9c7d0;
  background: #fff;
  color: #18232d;
}

.wm-livechat-start-media {
  display: grid;
  gap: 9px;
}

.wm-livechat-start-media > .wm-livechat-button {
  width: 100%;
  gap: 8px;
}

.wm-livechat-add-icon {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.wm-livechat-pending-media {
  display: grid;
  gap: 6px;
}

.wm-livechat-pending-media > span {
  display: grid;
  min-width: 0;
  min-height: 34px;
  padding: 5px 6px 5px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--wm-chat-line);
  border-radius: 5px;
  background: var(--wm-chat-soft);
  font-size: 12px;
}

.wm-livechat-pending-media > span > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-livechat-pending-media button {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5a6872;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.wm-livechat-notice {
  padding: 11px 12px;
  border-left: 4px solid var(--wm-chat-yellow);
  border-radius: 4px;
  background: #fffbe0;
  color: #27323a;
  font-size: 13px;
  line-height: 1.45;
}

.wm-livechat-notice--error {
  border-left-color: var(--wm-chat-red);
  background: #fff1f1;
  color: #94131a;
}

.wm-livechat-thread {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.wm-livechat-context {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--wm-chat-line);
  background: #fff;
}

.wm-livechat-messages {
  display: flex;
  min-height: 0;
  padding: 14px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background: var(--wm-chat-soft);
}

.wm-livechat-message {
  max-width: 84%;
  padding: 9px 11px;
  align-self: flex-start;
  border: 1px solid #d4dee4;
  border-radius: 6px 6px 6px 2px;
  background: #fff;
  color: #1c2a34;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.wm-livechat-message-text {
  white-space: pre-wrap;
}

.wm-livechat-attachments {
  display: grid;
  margin-top: 7px;
  gap: 7px;
}

.wm-livechat-attachments a,
.wm-livechat-attachments img,
.wm-livechat-attachments video {
  display: block;
  width: 100%;
  max-width: 270px;
}

.wm-livechat-attachments img,
.wm-livechat-attachments video {
  max-height: 240px;
  border-radius: 4px;
  object-fit: contain;
  background: #081017;
}

.wm-livechat-message--customer {
  align-self: flex-end;
  border-color: #d8ca00;
  border-radius: 6px 6px 2px 6px;
  background: var(--wm-chat-yellow);
}

.wm-livechat-message--system {
  max-width: 100%;
  align-self: stretch;
  border: 0;
  border-left: 3px solid var(--wm-chat-red);
  border-radius: 0;
  background: #e8edf0;
  color: #42525d;
  font-size: 12px;
}

.wm-livechat-message small {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
}

.wm-livechat-composer {
  display: grid;
  padding: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid var(--wm-chat-line);
  background: #fff;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.wm-livechat-composer.is-dragover {
  background: #fffbd2;
  box-shadow: inset 0 0 0 2px var(--wm-chat-yellow);
}

.wm-livechat-composer textarea {
  min-height: 42px;
  max-height: 110px;
  padding: 10px 11px;
  resize: none;
  border: 1px solid #b9c7d0;
  border-radius: 5px;
  color: #101820;
  font: inherit;
  letter-spacing: 0;
}

.wm-livechat-attach {
  display: inline-flex;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9c7d0;
  border-radius: 5px;
  background: #fff;
  color: var(--wm-chat-ink);
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.wm-livechat-attach:hover,
.wm-livechat-attach:focus-visible {
  border-color: var(--wm-chat-red);
  color: var(--wm-chat-red);
}

.wm-livechat-composer .wm-livechat-button {
  width: 70px;
}

.wm-livechat-escalation {
  display: grid;
  max-height: 310px;
  padding: 12px;
  gap: 10px;
  overflow-y: auto;
  border-bottom: 1px solid var(--wm-chat-line);
  background: #fff;
}

.wm-livechat-loading {
  margin: auto;
  color: #536671;
  font-size: 14px;
}

@media (max-width: 520px) {
  #wm-livechat-root {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .wm-livechat-panel {
    width: auto;
    height: calc(100dvh - 20px);
    margin-bottom: 0;
  }

  .wm-livechat-launcher {
    width: 58px;
    height: 58px;
  }
}
