.nav24-chat {
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 5px;
  color: #25313c;
  display: flex;
  flex-direction: column;
  height: var(--nav24-chat-collapsed-height, 115px);
  min-height: min(115px, calc(100vh - 16px));
  bottom: 24px;
  position: fixed;
  right: 24px;
  width: var(--nav24-chat-width, 360px);
  min-width: 360px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(32, 48, 64, 0.08);
  transition: height 280ms ease;
  z-index: 2147483647;
}

.nav24-chat--initializing {
  visibility: hidden;
}

.nav24-chat--initializing,
.nav24-chat--initializing .nav24-chat__messages {
  transition: none !important;
}

.nav24-chat.is-expanded {
  height: var(--nav24-chat-expanded-height, 520px);
  min-height: min(240px, calc(100vh - 16px));
}

.nav24-chat.is-expanded.is-welcome {
  height: min(240px, calc(100vh - 16px));
}

.nav24-chat__header {
  align-items: center;
  background: #1d4752;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  height: 51px;
  padding: 12px 14px;
  position: relative;
  flex: 0 0 auto;
  cursor: move;
  touch-action: none;
}

.nav24-chat.is-dragging .nav24-chat__header {
  cursor: grabbing;
  user-select: none;
}

.nav24-chat.is-resizing {
  user-select: none;
  transition: none;
}

.nav24-chat__title {
  font-size: 13px;
  font-weight: 600;
}

.nav24-chat__status {
  color: #b9e3c6;
  font-size: 11px;
}

.nav24-chat__status.is-busy {
  color: #f7d58b;
}

.nav24-chat__actions {
  align-items: center;
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.nav24-chat__action {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  height: 26px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background-color 160ms ease, border-color 160ms ease;
  width: 28px;
}

.nav24-chat__icon {
  display: block;
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

.nav24-chat .nav24-chat__icon path {
  fill: none;
}

.nav24-chat__menu-toggle .nav24-chat__icon circle {
  fill: currentColor;
  stroke: none;
}

.nav24-chat__menu-toggle .nav24-chat__icon {
  height: 18px;
  width: 18px;
}

.nav24-chat__action:hover,
.nav24-chat__action:focus {
  background: #5fbaae;
  border-color: rgba(255, 255, 255, 0.65);
  color: #ffffff;
  outline: 0;
}

.nav24-chat__menu {
  position: relative;
}

.nav24-chat__menu-items {
  background: #ffffff;
  border: 1px solid #c8d1d9;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(32, 48, 64, 0.18);
  min-width: max-content;
  padding: 4px;
  position: absolute;
  right: 0;
  top: 31px;
  z-index: 2;
}

.nav24-chat__menu-items button {
  background: #ffffff;
  border: 0;
  border-radius: 3px;
  color: #25313c;
  cursor: pointer;
  display: block;
  font-size: 11px;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  width: 100%;
}

.nav24-chat__menu-items button:hover,
.nav24-chat__menu-items button:focus {
  background: #e7edf2;
  outline: 0;
}

.nav24-chat__toggle [data-chat-collapse-icon] {
  display: none;
}

.nav24-chat.is-expanded .nav24-chat__toggle [data-chat-expand-icon] {
  display: none;
}

.nav24-chat.is-expanded .nav24-chat__toggle [data-chat-collapse-icon] {
  display: inline;
}

.nav24-chat__messages {
  background: #f7f9fb;
  display: flex;
  box-sizing: border-box;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  opacity: 0;
  padding: 0 6px 0 12px;
  transition: opacity 180ms ease, padding 280ms ease;
}

.nav24-chat__messages::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.nav24-chat.is-expanded .nav24-chat__messages {
  opacity: 1;
  padding: 14px 12px 36px;
}

.nav24-chat__message {
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.45;
  max-width: 95%;
  padding: 9px 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.nav24-chat__message p {
  margin: 0 0 8px;
}

.nav24-chat__message p:last-child {
  margin-bottom: 0;
}

.nav24-chat__message ul {
  margin: 4px 0 8px;
  padding-left: 18px;
}

.nav24-chat__message li {
  margin: 3px 0;
}

.nav24-chat__message h4,
.nav24-chat__message h5 {
  margin: 0 0 4px;
}

.nav24-chat__message code {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  padding: 1px 3px;
}

.nav24-chat__message--assistant {
  align-self: flex-start;
  background: #e7edf2;
  margin: 0;
  text-align: left;
}

.nav24-chat__message--user {
  align-self: flex-end;
  background: #d8eee5;
  margin-top: 4px;
}

.nav24-chat__message--error {
  background: #f9e4e1;
  color: #8e2b23;
}

.nav24-chat__message--pending {
  color: #687783;
  font-style: italic;
}

.nav24-chat__form {
  background: #ffffff;
  border-top: 1px solid #e4e9ee;
  box-sizing: border-box;
  display: flex;
  gap: 7px;
  height: 64px;
  padding: 10px;
  flex: 0 0 auto;
}

.nav24-chat__form textarea {
  border: 1px solid #c8d1d9;
  border-radius: 4px;
  box-sizing: border-box;
  color: #25313c;
  flex: 1;
  font-size: 12px;
  min-width: 0;
  padding: 8px;
  resize: none;
}

.nav24-chat__form textarea:focus {
  border-color: #3478a8;
  outline: 2px solid rgba(52, 120, 168, 0.2);
}

.nav24-chat__form textarea:disabled {
  background: #f1f4f6;
  cursor: wait;
}

.nav24-chat__form button {
  align-self: flex-end;
  background: #398279;
  border: 0;
  box-sizing: border-box;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  padding: 9px 11px;
  height: 100%;
}

.nav24-chat__form button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.nav24-chat__disclaimer {
  background: #f7f9fb;
  bottom: 64px;
  box-sizing: border-box;
  color: #8b97a3;
  display: none;
  font-size: 10px;
  height: 22px;
  left: 0;
  line-height: 22px;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 16px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav24-chat.is-expanded .nav24-chat__disclaimer {
  display: block;
}
