.nk-lc {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 80;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.nk-lc__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border: 0;
  background: #003a70;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.28);
}

.nk-lc__toggle:hover,
.nk-lc__toggle:focus-visible {
  background: #00264d;
}

.nk-lc__toggle svg {
  flex: 0 0 auto;
}

.nk-lc__panel {
  position: absolute;
  right: 0;
  bottom: 3.4rem;
  width: min(22.5rem, calc(100vw - 1.5rem));
  background: #fff;
  border: 1px solid #c5d0dc;
  box-shadow: 0 12px 32px rgba(11, 31, 58, 0.18);
  color: #152033;
}

.nk-lc__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem 0.7rem;
  background: #003a70;
  color: #fff;
}

.nk-lc__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.nk-lc__status {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.9;
}

.nk-lc__close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.nk-lc__body {
  padding: 0.9rem 0.95rem 1rem;
}

.nk-lc__note {
  margin: 0 0 0.75rem;
  color: #4b5a6e;
  font-size: 0.8rem;
  line-height: 1.45;
}

.nk-lc__start label,
.nk-lc__composer label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.nk-lc__start input,
.nk-lc__composer textarea {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid #c5d0dc;
  font: inherit;
}

.nk-lc__start button,
.nk-lc__composer button,
.nk-lc-inbox__composer button,
.nk-lc-inbox__toolbar button {
  background: #003a70;
  color: #fff;
  border: 0;
  min-height: 2.3rem;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nk-lc__error {
  margin: 0 0 0.6rem;
  color: #8b1e1e;
  font-size: 0.82rem;
}

.nk-lc__messages,
.nk-lc-inbox__messages {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 16rem;
  overflow: auto;
  margin-bottom: 0.75rem;
}

.nk-lc__msg {
  max-width: 92%;
  padding: 0.45rem 0.55rem;
  background: #f4f7fa;
  border: 1px solid #d7e0ea;
}

.nk-lc__msg--visitor {
  align-self: flex-end;
  background: #e8f0f8;
}

.nk-lc__msg--staff {
  align-self: flex-start;
  background: #fff;
}

.nk-lc__msg--system {
  align-self: stretch;
  background: #fff8e8;
  border-color: #e0c36a;
}

.nk-lc__who {
  display: block;
  margin-bottom: 0.15rem;
  color: #4b5a6e;
  font-size: 0.72rem;
  font-weight: 600;
}

.nk-lc__msg p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.nk-lc-inbox {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  min-height: 28rem;
  border: 1px solid #d8dde4;
  background: #fff;
}

.nk-lc-inbox__side {
  border-right: 1px solid #d8dde4;
  background: #f4f7fa;
}

.nk-lc-inbox__list {
  display: flex;
  flex-direction: column;
}

.nk-lc-inbox__item {
  display: block;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-bottom: 1px solid #d8dde4;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.nk-lc-inbox__item strong,
.nk-lc-inbox__preview,
.nk-lc-inbox__item em {
  display: block;
}

.nk-lc-inbox__preview,
.nk-lc-inbox__item em {
  color: #4b5a6e;
  font-size: 0.8rem;
  font-style: normal;
}

.nk-lc-inbox__preview {
  margin: 0.2rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nk-lc-inbox__item.is-waiting {
  box-shadow: inset 3px 0 0 #c2410c;
}

.nk-lc-inbox__item.is-active {
  background: #fff;
}

.nk-lc-inbox__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.9rem 1rem 1rem;
}

.nk-lc-inbox__toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.nk-lc-inbox__meta {
  color: #4b5a6e;
  font-size: 0.85rem;
}

.nk-lc-inbox__messages {
  flex: 1;
  max-height: 22rem;
  min-height: 12rem;
}

.nk-lc-inbox__empty {
  margin: 2rem 0;
  color: #4b5a6e;
}

.nk-lc-inbox__composer textarea {
  width: 100%;
  min-height: 4.5rem;
  margin: 0.4rem 0 0.65rem;
  padding: 0.5rem;
  border: 1px solid #c5d0dc;
  font: inherit;
}

@media (max-width: 800px) {
  .nk-lc-inbox {
    grid-template-columns: 1fr;
  }
}
