@font-face {
  font-family: "nunito";
  font-display: swap;
  src: url("/assets/fonts/nunito-semibold.woff2") format("woff2"),
    url("/assets/fonts/nunito-semibold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
}

.livechat-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 2147483639;
  font-family: nunito, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  pointer-events: none;
}

.livechat-dock * {
  box-sizing: border-box;
}

.livechat-panel {
  position: absolute;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  width: min(356px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 100px));
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  border-radius: 8px 8px 0 0;
  box-shadow: rgba(0, 0, 0, 0.18) 0 3px 7.8px -2px, rgba(0, 0, 0, 0.125) 0 0.36px 0.94px -1px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.livechat-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.livechat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #2e2e2e;
  color: #fff;
}

.livechat-panel__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.livechat-panel__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b5a147;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.livechat-panel__close:hover,
.livechat-panel__close:focus-visible {
  background: rgba(181, 161, 71, 0.15);
}

.livechat-panel__messages {
  flex: 1;
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1e1e1e;
}

.livechat-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #f5f5f5;
}

.livechat-msg--agent {
  align-self: flex-start;
  background: rgba(181, 161, 71, 0.18);
  border: 1px solid rgba(181, 161, 71, 0.35);
}

.livechat-msg--user {
  align-self: flex-end;
  background: #2e2e2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.livechat-panel__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #2e2e2e;
}

.livechat-panel__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #b5a147;
  border-radius: 0;
  background: transparent;
  color: #f5f5f5;
  font-size: 14px;
}

.livechat-panel__input::placeholder {
  color: #9a9a9a;
}

.livechat-panel__send {
  flex-shrink: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px 3px;
  background: #b5a147;
  color: #1e1e1e;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.livechat-panel__send:hover,
.livechat-panel__send:focus-visible {
  background: #decf89;
}

.livechat-launcher {
  position: relative;
  display: flex;
  align-items: center;
  width: 255px;
  height: 50px;
  margin: 0 0.8em 0 0;
  padding: 0 0.9em;
  border: 0;
  border-radius: 8px 8px 0 0;
  background-color: #b5a147;
  color: #1e1e1e;
  box-shadow: rgba(0, 0, 0, 0.125) 0 0.362176px 0.941657px -1px,
    rgba(0, 0, 0, 0.18) 0 3px 7.8px -2px;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.2s ease;
  font-weight: 700;
}

.livechat-launcher:hover,
.livechat-launcher:focus-visible {
  background-color: #c4b35a;
}

.livechat-launcher__text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.livechat-launcher__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 4px;
}

.livechat-launcher__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.livechat-dock.is-open .livechat-launcher {
  visibility: hidden;
  pointer-events: none;
}

.fpLink.live-chat-button,
.footer__license-help .live-chat-button {
  color: #b5a147;
  cursor: pointer;
  text-decoration: none;
}

.footer__license-help .live-chat-button:hover,
.footer__license-help .live-chat-button:focus-visible {
  text-decoration: underline;
}

@media (max-width: 599px) {
  .livechat-launcher {
    width: min(255px, calc(100vw - 16px));
    margin-right: 8px;
  }

  .livechat-panel {
    right: 8px;
    width: calc(100vw - 16px);
  }
}
