.nei-guide {
  --nei-guide-navy: #071d2b;
  --nei-guide-teal: #0c6169;
  --nei-guide-lime: #b7eb63;
  --nei-guide-gold: #ffbf36;
  --nei-guide-ink: #0a2635;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99990;
  color: var(--nei-guide-ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.nei-guide [hidden] {
  display: none !important;
}

.nei-guide button,
.nei-guide input,
.nei-guide a {
  font: inherit;
}

.nei-guide__trigger {
  display: flex;
  min-width: 154px;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  border: 2px solid var(--nei-guide-lime);
  border-radius: 999px;
  color: #fff;
  background: var(--nei-guide-navy);
  box-shadow: 0 14px 38px rgb(3 23 34 / 34%);
  cursor: pointer;
}

.nei-guide__trigger-copy {
  display: grid;
  text-align: left;
}

.nei-guide__trigger-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.nei-guide__trigger-copy small,
.nei-guide__header small {
  color: #c1d6dc;
  font-size: 11px;
  line-height: 1.25;
}

.nei-guide__avatar {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #0b394b, #0d6670);
}

.nei-guide__avatar::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--nei-guide-navy);
  border-radius: 50%;
  background: var(--nei-guide-lime);
  content: '';
}

.nei-guide__avatar img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.nei-guide__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  max-height: min(690px, calc(100dvh - 112px));
  overflow: hidden;
  border: 1px solid rgb(7 49 64 / 16%);
  border-radius: 18px;
  background: #f7faf9;
  box-shadow: 0 24px 70px rgb(3 23 34 / 34%);
  animation: nei-guide-in 180ms ease-out;
}

.nei-guide__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 13px;
  color: #fff;
  background: linear-gradient(120deg, var(--nei-guide-navy), var(--nei-guide-teal));
}

.nei-guide__header > span:nth-child(2) {
  display: grid;
}

.nei-guide__header strong {
  font-size: 17px;
  line-height: 1.2;
}

.nei-guide__close {
  display: grid;
  width: 44px;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 10%);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.nei-guide__messages {
  display: grid;
  min-height: 116px;
  max-height: 290px;
  overflow-y: auto;
  gap: 10px;
  padding: 16px 14px 8px;
  overscroll-behavior: contain;
}

.nei-guide__message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
}

.nei-guide__message--guide {
  justify-self: start;
  border-bottom-left-radius: 3px;
  color: #143643;
  background: #e5f0f0;
}

.nei-guide__message--visitor {
  justify-self: end;
  border-bottom-right-radius: 3px;
  color: #fff;
  background: var(--nei-guide-teal);
}

.nei-guide__actions {
  display: grid;
  justify-items: start;
  gap: 7px;
  padding-bottom: 4px;
}

.nei-guide__actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid #8dbb55;
  border-radius: 9px;
  color: #153748;
  background: #effbdc;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.nei-guide__choices {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  padding: 8px 14px 10px;
  scrollbar-width: thin;
}

.nei-guide__choices button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #b7cbd1;
  border-radius: 999px;
  color: #173b49;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.nei-guide__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #dbe7e9;
}

.nei-guide__form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #8da9b2;
  border-radius: 9px;
  color: var(--nei-guide-ink);
  background: #fff;
}

.nei-guide__form button {
  min-width: 72px;
  min-height: 48px;
  padding: 9px 13px;
  border: 2px solid var(--nei-guide-navy);
  border-radius: 9px;
  color: var(--nei-guide-navy);
  background: var(--nei-guide-lime);
  font-weight: 850;
  cursor: pointer;
}

.nei-guide__privacy {
  margin: 0;
  padding: 0 14px 14px;
  color: #506b75;
  font-size: 11px;
  line-height: 1.4;
}

.nei-guide__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

.nei-guide :focus-visible {
  border-radius: 7px;
  outline: 3px solid var(--nei-guide-gold) !important;
  outline-offset: 3px !important;
}

@keyframes nei-guide-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .nei-guide {
    right: 12px;
    bottom: 12px;
  }

  .nei-guide__panel {
    position: fixed;
    right: 12px;
    bottom: 82px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 104px);
  }

  .nei-guide__messages {
    max-height: min(280px, 36dvh);
  }

  .nei-guide__trigger {
    min-width: 132px;
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nei-guide__panel {
    animation: none;
  }
}

@media print {
  .nei-guide {
    display: none !important;
  }
}
