#fabGroup .fab-calc { display: none !important; }
#fabGroup .fab-chat {
  min-width: 188px;
  min-height: 48px;
  padding: 0 22px;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: #303431;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  font: 700 14px/1 'Inter', sans-serif;
}
#fabGroup .fab-chat:hover { background: #414743; }
#fabGroup .fab-chat:focus-visible,
.boreal-chat button:focus-visible,
.boreal-chat a:focus-visible,
.boreal-chat input:focus-visible { outline: 2px solid #38ba78; outline-offset: 3px; }
body.boreal-chat-open #fabGroup { visibility: hidden; }
body.boreal-chat-open { overflow: hidden; }

.boreal-chat[hidden] { display: none !important; }
.boreal-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100% - 32px));
  height: min(630px, calc(100dvh - 32px));
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid #303734;
  border-radius: 8px;
  background: #111513;
  color: #f3f6f4;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  font-family: 'Inter', sans-serif;
}
.boreal-chat-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #303734;
  background: #191e1b;
}
.boreal-chat-identity { display: flex; align-items: center; gap: 11px; }
.boreal-chat-avatar,
.boreal-chat-message-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #246549;
  color: #fff;
  font: 800 18px/1 'Inter', sans-serif;
}
.boreal-chat-heading { display: flex; flex-direction: column; gap: 3px; }
.boreal-chat-heading strong { font-size: 14px; line-height: 1.2; }
.boreal-chat-heading span { color: #a3b1a8; font-size: 11px; }
.boreal-chat-close {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #444e48;
  border-radius: 50%;
  background: #242a26;
  color: #e7ece8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.boreal-chat-close:hover { background: #343d36; }
.boreal-chat-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
  min-height: 110px;
  overflow-y: auto;
  padding: 20px 16px;
  scrollbar-color: #4a5b50 transparent;
}
.boreal-chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  animation: boreal-chat-in .25s ease-out both;
}
.boreal-chat-row-user { justify-content: flex-end; }
.boreal-chat-message-avatar {
  width: 26px;
  height: 26px;
  background: #34453a;
  font-size: 12px;
}
.boreal-chat-message {
  max-width: 80%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #353d38;
  border-radius: 8px 8px 8px 2px;
  background: #252b27;
  color: #edf2ee;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.boreal-chat-message-user {
  border-color: #276a4c;
  border-radius: 8px 8px 2px 8px;
  background: #276a4c;
  color: #fff;
}
.boreal-chat-suggestions {
  flex: none;
  padding: 10px 16px 12px;
  border-top: 1px solid #303734;
  background: #191e1b;
}
.boreal-chat-suggestions-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2px 0 8px;
  border: 0;
  background: transparent;
  color: #c1cec5;
  font: 700 11px/1.2 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
}
.boreal-chat-chevron {
  display: inline-block;
  color: #9aaca0;
  font-size: 18px;
  line-height: 10px;
  transform: rotate(180deg);
}
.boreal-chat-suggestions.is-collapsed .boreal-chat-chevron { transform: none; }
.boreal-chat-suggestions.is-collapsed .boreal-chat-suggestions-body { display: none; }
.boreal-chat-topic-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-color: #4a5b50 transparent;
}
.boreal-chat-topic {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #3a443d;
  border-radius: 7px;
  background: #222923;
  color: #e4ede6;
  font: 600 11px/1.3 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
}
.boreal-chat-topic:hover { background: #2b3c30; border-color: #63866a; }
.boreal-chat-more {
  margin: 9px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #81d7a4;
  font: 650 11px/1.3 'Inter', sans-serif;
  cursor: pointer;
}
.boreal-chat-footer {
  display: grid;
  flex: none;
  gap: 9px;
  padding: 12px 16px 16px;
  border-top: 1px solid #303734;
  background: #191e1b;
}
.boreal-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 13px;
  border: 1px solid #3b463e;
  border-radius: 7px;
  background: #262e28;
}
.boreal-chat-form:focus-within { border-color: #58a875; }
.boreal-chat-input {
  flex: 1;
  min-width: 0;
  height: 31px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 400 12px 'Inter', sans-serif;
}
.boreal-chat-input::placeholder { color: #9aaa9e; }
.boreal-chat-send {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #37684b;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.boreal-chat-send:hover { background: #49875f; }
.boreal-chat-agent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #25d366;
  color: #102b1b;
  font: 750 12px/1.3 'Inter', sans-serif;
  text-align: center;
  text-decoration: none;
}
.boreal-chat-agent svg { width: 19px; height: 19px; flex: none; }
.boreal-chat-agent svg path { fill: currentColor; }
.boreal-chat-agent:hover { background: #34e079; }
@keyframes boreal-chat-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
  #fabGroup .fab-chat { min-width: 168px; min-height: 44px; font-size: 12px; }
  .boreal-chat {
    right: 8px;
    bottom: 8px;
    width: calc(100% - 16px);
    height: min(630px, calc(100dvh - 16px));
  }
}
@media (max-height: 590px) {
  .boreal-chat-suggestions { padding-top: 6px; padding-bottom: 8px; }
  .boreal-chat-topic-list { max-height: 86px; }
  .boreal-chat-messages { min-height: 84px; padding-top: 12px; padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .boreal-chat-row { animation: none; }
}
