.lyonis-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99990;
  font-family: "DM Sans", Arial, sans-serif;
  color: #eef7f3;
}
.lyonis-chat * { box-sizing: border-box; }
.lyonis-chat [hidden] { display: none !important; }
.lyonis-chat__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #45d9a3;
  background: #31d397;
  color: #06130f;
  border-radius: 999px;
  padding: 9px 15px 9px 9px;
  box-shadow: 0 15px 42px rgba(0,0,0,.4);
  font: 800 13px/1 inherit;
  cursor: pointer;
}
.lyonis-chat__launcher > span:first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #45d9a3;
  background: #08120f;
  font-weight: 900;
}
.lyonis-chat__launcher:hover { transform: translateY(-1px); }
.lyonis-chat__panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(390px, calc(100vw - 28px));
  height: min(610px, calc(100vh - 105px));
  min-height: 430px;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  overflow: hidden;
  border: 1px solid #273b44;
  border-radius: 18px;
  background: #101a22;
  box-shadow: 0 22px 65px rgba(0,0,0,.58);
}
.lyonis-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid #273b44;
  background: #0c151c;
}
.lyonis-chat__header > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 9px;
}
.lyonis-chat__header strong { font-size: 15px; }
.lyonis-chat__header small {
  grid-column: 2;
  margin-top: 3px;
  color: #8ea9ba;
  font-size: 11px;
}
.lyonis-chat__online {
  grid-row: 1 / span 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #31d397;
  box-shadow: 0 0 12px rgba(49,211,151,.8);
}
.lyonis-chat__close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9db2c0;
  font-size: 25px;
  cursor: pointer;
}
.lyonis-chat__close:hover { background: #1b2932; color: #fff; }
.lyonis-chat__messages {
  min-height: 0;
  overflow-y: auto;
  padding: 17px;
  scrollbar-color: #3b545f transparent;
}
.lyonis-chat__message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 14px;
}
.lyonis-chat__message--user { align-items: flex-end; }
.lyonis-chat__bubble {
  max-width: 88%;
  padding: 11px 13px;
  border: 1px solid #2a3c45;
  border-radius: 13px 13px 13px 4px;
  background: #17232c;
  color: #d9e8e3;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lyonis-chat__message--user .lyonis-chat__bubble {
  border-color: #2b9f78;
  border-radius: 13px 13px 4px 13px;
  background: #123327;
  color: #effff9;
}
.lyonis-chat__message.is-waiting .lyonis-chat__bubble { color: #8eb3a6; }
.lyonis-chat__sources {
  width: 88%;
  margin: 7px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lyonis-chat__sources a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #2a6954;
  border-radius: 8px;
  background: #10281f;
  color: #58e4b1;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.lyonis-chat__sources a:hover {
  border-color: #45d9a3;
  background: #143428;
  text-decoration: none;
}
.lyonis-chat__handoff {
  margin: 0 14px 12px;
  padding: 13px;
  border: 1px solid #2a6954;
  border-radius: 12px;
  background: #10281f;
}
.lyonis-chat__handoff strong { font-size: 13px; }
.lyonis-chat__handoff p { margin: 6px 0 10px; color: #a7bdb5; font-size: 11px; line-height: 1.4; }
.lyonis-chat__handoff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lyonis-chat__channel {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid #3b5360;
  border-radius: 9px;
  color: #e7f2ee;
  background: #17242c;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}
.lyonis-chat__channel--recommended {
  border-color: #31d397;
  color: #07120e;
  background: #31d397;
}
.lyonis-chat__form {
  padding: 0 14px 12px;
  border-top: 1px solid #22333c;
  background: #101a22;
}
.lyonis-chat__form textarea {
  width: 100%;
  min-height: 62px;
  max-height: 130px;
  margin-top: 12px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid #324650;
  border-radius: 10px;
  outline: none;
  background: #0b141a;
  color: #edf8f4;
  font: 13px/1.45 inherit;
}
.lyonis-chat__form textarea:focus { border-color: #31d397; box-shadow: 0 0 0 2px rgba(49,211,151,.12); }
.lyonis-chat__website { position: fixed !important; left: -10000px !important; opacity: 0 !important; }
.lyonis-chat__form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; }
.lyonis-chat__form-actions button {
  min-height: 35px;
  padding: 8px 12px;
  border: 1px solid #344954;
  border-radius: 9px;
  background: #1a2831;
  color: #eef7f3;
  font: 800 11px/1 inherit;
  cursor: pointer;
}
.lyonis-chat__form-actions .lyonis-chat__send { border-color: #31d397; background: #31d397; color: #06130f; }
.lyonis-chat__form-actions button:disabled { opacity: .55; cursor: wait; }
.lyonis-chat__privacy { margin: 0; padding: 0 14px 12px; color: #708a99; font-size: 9px; line-height: 1.35; }
.lyonis-chat .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 560px) {
  .lyonis-chat { right: 12px; bottom: 12px; }
  .lyonis-chat__launcher-label { display: none; }
  .lyonis-chat__launcher { padding: 8px; }
  .lyonis-chat__panel {
    position: fixed;
    inset: 10px;
    width: auto;
    height: auto;
    min-height: 0;
    border-radius: 14px;
  }
}
