.live-chat-widget {
  right: 20px;
  bottom: 20px;
}

.live-chat-widget__toggle {
  gap: 8px;
  padding: 9px 13px;
  font-size: 13px;
}

.live-chat-widget__icon {
  width: 24px;
  height: 24px;
}

.live-chat-widget__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(356px, calc(100vw - 24px));
  height: min(460px, calc(100vh - 96px));
  height: min(460px, calc(100dvh - 96px));
  max-height: calc(100dvh - 96px);
  min-height: 0;
  bottom: 62px;
}

.live-chat-widget__panel[hidden] {
  display: none;
}

.live-chat-widget__header {
  padding: 11px 13px;
}

.live-chat-widget__messages {
  min-height: 0;
  max-height: none;
  padding: 10px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.live-chat-widget .live-chat-message {
  max-width: 88%;
  margin: 5px 0;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.45;
}

.live-chat-widget .live-chat-message > p {
  font-size: 14px;
  line-height: 1.45;
}

.live-chat-widget .live-chat-message > time {
  margin-top: 4px;
  font-size: 11px;
}

.live-chat-widget__status {
  margin: 0;
  padding: 5px 12px 0;
  font-size: 12px;
  line-height: 1.35;
}

.live-chat-widget__form {
  gap: 7px;
  padding: 9px 12px 11px;
}

.live-chat-widget__field {
  gap: 5px;
}

.live-chat-widget__field label {
  font-size: 11px;
}

.live-chat-widget__field input,
.live-chat-widget__field textarea {
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 14px;
}

.live-chat-widget__field textarea {
  min-height: 54px;
  max-height: 96px;
  resize: vertical;
}

.live-chat-widget__submit {
  padding: 9px 12px;
  font-size: 13px;
}

@media (max-width: 600px) {
  .live-chat-widget {
    right: 12px;
    bottom: 12px;
  }

  .live-chat-widget__panel {
    width: min(356px, calc(100vw - 32px));
    height: min(460px, calc(100vh - 84px));
    height: min(460px, calc(100dvh - 84px));
    max-height: calc(100dvh - 84px);
    bottom: 60px;
  }
}

.live-chat-widget .live-chat-message,
.live-chat-standalone .live-chat-page__message {
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.live-chat-widget .live-chat-message {
  max-width: 90%;
  padding: 10px 12px;
  border: 1px solid #d6deea;
  border-radius: 12px;
  background: #f1f5f9;
  color: #172033;
  font-size: 15px;
  line-height: 1.55;
}

.live-chat-widget .live-chat-message--customer {
  margin-left: auto;
  border-color: #bfd3f2;
  background: #dbeafe;
  color: #172033;
}

.live-chat-widget .live-chat-message > p,
.live-chat-standalone .live-chat-page__message > p {
  margin: 0;
  color: inherit;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.live-chat-widget .live-chat-message > strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 700;
}

.live-chat-widget .live-chat-message > time,
.live-chat-standalone .live-chat-page__message > time {
  display: block;
  margin-top: 6px;
  color: #5f6f86;
  font-size: 12px;
  line-height: 1.4;
  opacity: 1;
}

.live-chat-standalone .live-chat-page__message {
  padding: 10px 13px;
  background: #f1f5f9;
  color: #172033;
}

.live-chat-standalone .live-chat-page__message--customer {
  border-color: #bfd3f2;
  background: #dbeafe;
  color: #172033;
}

.live-chat-standalone .live-chat-page__message > strong {
  color: inherit;
  font-size: 13px;
  opacity: 1;
}

.live-chat-standalone .live-chat-page__message > time {
  font-size: 12px;
}

html[data-theme="dark"] .live-chat-widget .live-chat-message,
html[data-theme="dark"] .live-chat-standalone .live-chat-page__message--support,
html[data-theme="dark"] .live-chat-standalone .live-chat-page__message--assistant {
  border-color: #40516a;
  background: #263449;
  color: #edf2f8;
}

html[data-theme="dark"] .live-chat-widget .live-chat-message--customer,
html[data-theme="dark"] .live-chat-standalone .live-chat-page__message--customer {
  border-color: #405b7e;
  background: #263b59;
  color: #f4f7fb;
}

html[data-theme="dark"] .live-chat-widget .live-chat-message > time,
html[data-theme="dark"] .live-chat-standalone .live-chat-page__message > time {
  color: #c3d0e1;
}

@media (max-width: 600px) {
  .live-chat-widget .live-chat-message {
    max-width: 94%;
  }

  .live-chat-standalone .live-chat-page__message {
    max-width: 92%;
  }
}
