/* Company assistant */
.jg-chat {
  position: fixed;
  z-index: 60;
  bottom: 22px;
  inset-inline-end: 22px;
  display: grid;
  justify-items: end;
  gap: 10px;
}
.chat-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  color: white;
  background: #193e60;
  box-shadow: 0 8px 30px #0004;
  border-radius: 50px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.85rem;
}
.chat-toggle svg {
  width: 23px;
  height: 23px;
}
.chat-panel {
  width: min(360px, calc(100vw - 30px));
  max-block-size: calc(100dvh - 109px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  box-shadow: 0 16px 65px #0005;
  color: var(--ink);
  position: absolute;
  bottom: 65px;
  inset-inline-end: 0;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #17364f;
  color: white;
  padding: 14px;
}
.chat-avatar {
  height: 38px;
  width: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d8bb83;
  border-radius: 50%;
  color: #e4c894;
  font-weight: 800;
  flex: none;
}
.chat-head strong,
.chat-head small {
  display: block;
}
.chat-head small {
  font-size: 0.8125rem;
  color: #d4e0eb;
}
.chat-head button {
  margin-inline-start: auto;
  background: none;
  border: 0;
  color: white;
  font-size: 1.6rem;
  line-height: 1;
}
.chat-messages {
  height: min(245px, 32vh);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background: var(--paper);
  overscroll-behavior: contain;
}
.chat-bubble {
  font-size: 0.84rem;
  padding: 10px 12px;
  max-width: 90%;
  border-radius: 11px;
  white-space: pre-wrap;
  text-align: start;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.chat-bubble.bot {
  background: var(--surface);
  border: 1px solid var(--line);
  align-self: flex-start;
}
.chat-bubble.user {
  background: #215f86;
  color: white;
  align-self: flex-end;
}
.chat-suggestions {
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 100px;
  overflow: auto;
}
.chat-suggestions button {
  background: var(--surface);
  color: var(--blue);
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 16px;
  font-size: 0.8125rem;
}
.chat-form {
  display: flex;
  gap: 7px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.chat-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  padding: 9px 11px;
  border-radius: 7px;
}
.chat-form button {
  background: #215f86;
  color: white;
  border: 0;
  border-radius: 7px;
  min-width: 40px;
  font-size: 1.25rem;
}
.chat-form button:disabled,
.chat-suggestions button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.chat-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 10px 9px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.chat-foot a {
  color: var(--blue);
}
html[data-theme="dark"] .chat-foot a {
  color: var(--blue);
}
@media (max-width: 43rem) {
  .jg-chat {
    bottom: 0.9rem;
    inset-inline-end: 0.9rem;
  }
  .chat-toggle {
    padding: 0.6rem 0.85rem;
  }
  .chat-panel {
    bottom: 3.55rem;
    max-block-size: calc(100dvh - 5rem);
  }
  .chat-messages {
    height: min(220px, 29dvh);
  }
}
