.ava-live-chat {
  bottom: 18px;
  color: #111827;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  right: 18px;
  z-index: 1000;
}

.ava-live-chat * {
  box-sizing: border-box;
}

.ava-live-chat__button {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #9edfe5;
  border: 2px solid #111827;
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  gap: 10px;
  height: 58px;
  justify-content: center;
  min-height: 58px;
  overflow: hidden;
  padding: 7px;
  min-width: 58px;
  width: 58px;
}

.ava-live-chat__button-icon {
  align-items: center;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.ava-live-chat__button-icon svg {
  display: block;
  fill: none;
  height: 30px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
  width: 30px;
}

.ava-live-chat__button-logo {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.ava-live-chat__prompt {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  bottom: 72px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  max-width: min(270px, calc(100vw - 92px));
  min-width: min(270px, calc(100vw - 92px));
  padding: 24px 34px 16px 16px;
  position: absolute;
  right: 0;
}

.ava-live-chat__prompt[hidden] {
  display: none;
}

.ava-live-chat__prompt-avatar {
  align-items: center;
  background: #eef2f7;
  border-radius: 999px;
  display: flex;
  height: 44px;
  justify-content: center;
  left: 50%;
  overflow: hidden;
  padding: 6px;
  position: absolute;
  top: -24px;
  transform: translateX(-50%);
  width: 44px;
}

.ava-live-chat__prompt-avatar img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.ava-live-chat__prompt-avatar span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ava-live-chat__prompt-close {
  align-items: center;
  background: transparent;
  border: 0;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
}

.ava-live-chat__prompt p {
  color: #1f2937;
  font-size: 13.5px;
  line-height: 1.45;
  margin: 0;
}

.ava-live-chat__panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  bottom: 62px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: min(540px, calc(100vh - 96px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(340px, calc(100vw - 28px));
}

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

.ava-live-chat__header {
  align-items: center;
  background: #111827;
  color: #fff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.ava-live-chat__title {
  background: transparent !important;
  color: #fff !important;
  display: block !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0 !important;
  line-height: 1.2;
  margin: 0;
  max-width: 220px;
  padding: 0 !important;
  text-transform: none !important;
  white-space: normal;
}

body .ava-live-chat .ava-live-chat__header .ava-live-chat__title,
body .ava-live-chat .ava-live-chat__header h2.ava-live-chat__title {
  background: transparent !important;
  color: #fff !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-transform: none !important;
}

.ava-live-chat__status {
  color: #cbd5e1;
  font-size: 12px;
  margin: 4px 0 0;
}

.ava-live-chat__status::before {
  background: #94a3b8;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 7px;
  margin-right: 7px;
  width: 7px;
}

.ava-live-chat__status[data-online="true"]::before {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.ava-live-chat__close {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.ava-live-chat__messages {
  background: #f8fafc;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  overflow-y: auto;
  padding: 14px;
}

.ava-live-chat__message {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 86%;
  padding: 10px 12px;
  word-break: break-word;
}

.ava-live-chat__message--admin {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.ava-live-chat__message--visitor {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
}

.ava-live-chat__message-meta {
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 5px;
  opacity: 0.72;
}

.ava-live-chat__message-body {
  display: block;
  white-space: pre-wrap;
}

.ava-live-chat__empty {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  margin: auto 0;
}

.ava-live-chat__form {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  display: grid;
  flex: 0 1 auto;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.ava-live-chat__identity {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ava-live-chat__identity[hidden] {
  display: none !important;
}

.ava-live-chat__field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ava-live-chat__label {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.ava-live-chat__input,
.ava-live-chat__textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #111827;
  font: inherit;
  font-size: 14px;
  outline: none;
  padding: 10px 11px;
  width: 100%;
}

.ava-live-chat__textarea {
  max-height: 140px;
  min-height: 64px;
  resize: vertical;
}

.ava-live-chat__input:focus,
.ava-live-chat__textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.ava-live-chat__send {
  background: #2563eb;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 42px;
  padding: 0 14px;
}

.ava-live-chat__send:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ava-live-chat__notice {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.ava-live-chat__error {
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 640px) {
  .ava-live-chat {
    bottom: 12px;
    right: 12px;
  }

  .ava-live-chat__button {
    height: 54px;
    min-height: 54px;
    width: 54px;
  }

  .ava-live-chat__prompt {
    bottom: 66px;
    max-width: calc(100vw - 84px);
    min-width: min(260px, calc(100vw - 84px));
  }

  .ava-live-chat__panel {
    bottom: 60px;
    height: auto;
    max-height: calc(100vh - 84px);
    width: calc(100vw - 24px);
  }
}

@supports (height: 100dvh) {
  .ava-live-chat__panel {
    height: auto;
    max-height: min(540px, calc(100dvh - 96px));
  }

  @media (max-width: 640px) {
    .ava-live-chat__panel {
      height: auto;
      max-height: calc(100dvh - 84px);
    }
  }
}

@media (max-width: 360px), (max-height: 620px) {
  .ava-live-chat__header {
    padding: 12px 14px;
  }

  .ava-live-chat__title {
    font-size: 15px;
  }

  .ava-live-chat__status {
    font-size: 11px;
  }

  .ava-live-chat__messages {
    gap: 8px;
    padding: 12px;
  }

  .ava-live-chat__form {
    gap: 8px;
    padding: 12px;
  }

  .ava-live-chat__identity {
    gap: 8px;
  }

  .ava-live-chat__input,
  .ava-live-chat__textarea {
    padding: 8px 10px;
  }

  .ava-live-chat__textarea {
    max-height: 96px;
    min-height: 58px;
  }

  .ava-live-chat__send {
    min-height: 38px;
  }

  .ava-live-chat__notice {
    display: none;
  }
}

body .ava-live-chat > .ava-live-chat__button {
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-clip-path: circle(50% at 50% 50%) !important;
  aspect-ratio: 1 / 1 !important;
  background: #9edfe5 !important;
  border: 2px solid #111827 !important;
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%) !important;
  height: 58px !important;
  line-height: 1 !important;
  max-height: 58px !important;
  max-width: 58px !important;
  min-height: 58px !important;
  min-width: 58px !important;
  padding: 0 !important;
  width: 58px !important;
}

body .ava-live-chat > .ava-live-chat__button .ava-live-chat__button-icon {
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
}

@media (max-width: 640px) {
  body .ava-live-chat > .ava-live-chat__button {
    height: 54px !important;
    max-height: 54px !important;
    max-width: 54px !important;
    min-height: 54px !important;
    min-width: 54px !important;
    width: 54px !important;
  }
}
