/* NCRC chatbot widget */

.ncrc-chat {
  position: fixed;
  z-index: 10040;
  inset-inline-end: 1rem;
  bottom: 1rem;
}

.ncrc-chat__launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  background: #fff;
  color: #1b8354;
  border: 2px solid #1b8354;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ncrc-chat__launcher:hover,
.ncrc-chat__launcher:focus-visible {
  background: #e8f5ee;
  outline: 2px solid #1b8354;
  outline-offset: 2px;
}

.ncrc-chat__panel {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + 0.75rem);
  width: min(24rem, calc(100vw - 2rem));
  height: 28rem;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.ncrc-chat__header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem;
  background: #1b8354;
  color: #fff;
}

.ncrc-chat__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.ncrc-chat__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  opacity: 0.9;
}

.ncrc-chat__close {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
}

.ncrc-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f9fafb;
}

.ncrc-chat__message {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ncrc-chat__message--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.ncrc-chat__message--user {
  align-self: flex-end;
  background: #1b8354;
  color: #fff;
}

.ncrc-chat__link {
  color: #1b8354;
  font-weight: 600;
  text-decoration: underline;
}

.ncrc-chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 1rem 0.5rem;
  background: #f9fafb;
}

.ncrc-chat__chip {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.ncrc-chat__chip:hover {
  border-color: #1b8354;
  color: #1b8354;
}

.ncrc-chat__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.ncrc-chat__input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
}

.ncrc-chat__send {
  background: #1b8354;
  color: #fff;
  border: 0;
  border-radius: 10px;
  width: 2.5rem;
  cursor: pointer;
}

@media (max-width: 575.98px) {
  .ncrc-chat__panel {
    height: 70vh;
  }
}
