.bi-support {
  --bi-chat-ink: #071725;
  --bi-chat-navy: #0b2235;
  --bi-chat-blue: #315f88;
  --bi-chat-steel: #7e9bb4;
  --bi-chat-silver: #e7edf2;
  --bi-chat-paper: #f7f9fb;
  --bi-chat-line: rgba(104, 132, 155, .26);
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 9999;
  color: var(--bi-chat-ink);
  font: 400 1rem/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bi-support [hidden] { display: none !important; }

.bi-support__launcher {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  margin-left: auto;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: linear-gradient(145deg, #173a57, #06131f 72%);
  color: #fff;
  box-shadow: 0 1rem 2.7rem rgba(0, 12, 23, .35), inset 0 0 0 1px rgba(126, 155, 180, .25);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.bi-support__launcher:hover { transform: translateY(-2px); box-shadow: 0 1.2rem 3rem rgba(0, 12, 23, .43); }
.bi-support__launcher:focus-visible,
.bi-support button:focus-visible,
.bi-support input:focus-visible,
.bi-support a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #005a9c; }
.bi-support__launcher svg { width: 2rem; height: 2rem; }
.bi-support__launcher::after {
  content: "";
  position: absolute;
  top: .2rem;
  right: .25rem;
  width: .7rem;
  height: .7rem;
  border: 2px solid #102c43;
  border-radius: 50%;
  background: #63d3a0;
}

.bi-support__panel {
  position: absolute;
  right: 0;
  bottom: 5.25rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(24.5rem, calc(100vw - 2rem));
  height: min(38rem, calc(100svh - 8rem - env(safe-area-inset-bottom, 0px)));
  overflow: hidden;
  border: 1px solid rgba(126, 155, 180, .35);
  border-radius: 1.25rem;
  background: var(--bi-chat-paper);
  box-shadow: 0 1.8rem 5rem rgba(0, 12, 23, .35);
  transform-origin: 100% 100%;
  animation: bi-chat-open .2s ease-out both;
}

@keyframes bi-chat-open {
  from { opacity: 0; transform: translateY(.75rem) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.bi-support__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: start;
  padding: 1.1rem 1.1rem 1rem;
  background: linear-gradient(135deg, #071725, #133650);
  color: #fff;
}
.bi-support__identity { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .7rem; align-items: center; }
.bi-support__mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.bi-support__mark img { width: 2rem; height: 2rem; object-fit: contain; }
.bi-support__title { margin: 0; color: #fff; font-size: 1rem; font-weight: 750; letter-spacing: .01em; }
.bi-support__status { margin: .1rem 0 0; color: #c9d7e2; font-size: .78rem; }
.bi-support__status::before { content: ""; display: inline-block; width: .48rem; height: .48rem; margin-right: .4rem; border-radius: 50%; background: #63d3a0; vertical-align: .06rem; }
.bi-support__close {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}
.bi-support__close:hover { background: rgba(255,255,255,.16); }

.bi-support__transcript {
  overflow-y: auto;
  padding: 1rem;
  background:
    radial-gradient(circle at 100% 0, rgba(126,155,180,.1), transparent 35%),
    var(--bi-chat-paper);
  scroll-behavior: smooth;
}
.bi-support__message { display: flex; margin: 0 0 .8rem; }
.bi-support__message--user { justify-content: flex-end; }
.bi-support__bubble {
  max-width: 86%;
  padding: .72rem .85rem;
  border: 1px solid var(--bi-chat-line);
  border-radius: .95rem .95rem .95rem .25rem;
  background: #fff;
  box-shadow: 0 .25rem .8rem rgba(5, 24, 39, .055);
  color: #20394d;
  font-size: .9rem;
  white-space: pre-wrap;
}
.bi-support__message--user .bi-support__bubble {
  border-color: #214a6c;
  border-radius: .95rem .95rem .25rem .95rem;
  background: #123550;
  color: #fff;
}
.bi-support__actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.bi-support__action {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .3rem .65rem;
  border: 1px solid #9bb1c3;
  border-radius: 999px;
  color: #174466;
  font-size: .78rem;
  font-weight: 720;
  text-decoration: none;
}
.bi-support__action:hover { border-color: #315f88; background: #eef4f8; }
.bi-support__notice { margin: .45rem 0 0; color: #5d7385; font-size: .72rem; line-height: 1.4; }

.bi-support__typing { display: flex; gap: .25rem; align-items: center; min-height: 1.35rem; }
.bi-support__typing span { width: .38rem; height: .38rem; border-radius: 50%; background: #66849e; animation: bi-chat-dot .9s infinite ease-in-out; }
.bi-support__typing span:nth-child(2) { animation-delay: .12s; }
.bi-support__typing span:nth-child(3) { animation-delay: .24s; }
@keyframes bi-chat-dot { 0%, 65%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-.22rem); opacity: 1; } }

.bi-support__quick {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding: .65rem 1rem .55rem;
  border-top: 1px solid var(--bi-chat-line);
  background: #fff;
  scrollbar-width: thin;
}
.bi-support__chip {
  flex: 0 0 auto;
  min-height: 2.1rem;
  padding: .4rem .68rem;
  border: 1px solid #aabcc9;
  border-radius: 999px;
  background: #fff;
  color: #1b4a6c;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.bi-support__chip:hover { border-color: #315f88; background: #edf3f7; }

.bi-support__composer { padding: .7rem .8rem .55rem; border-top: 1px solid var(--bi-chat-line); background: #fff; }
.bi-support__form { display: grid; grid-template-columns: minmax(0,1fr) 2.65rem; gap: .5rem; }
.bi-support__input {
  width: 100%;
  min-height: 2.65rem;
  padding: .68rem .78rem;
  border: 1px solid #aabcc9;
  border-radius: .75rem;
  background: #f9fbfc;
  color: #102b40;
  font: inherit;
  font-size: .88rem;
}
.bi-support__input::placeholder { color: #4e6577; }
.bi-support__send {
  display: grid;
  place-items: center;
  min-width: 2.65rem;
  min-height: 2.65rem;
  border: 0;
  border-radius: .75rem;
  background: #123550;
  color: #fff;
  cursor: pointer;
}
.bi-support__send:hover { background: #214f73; }
.bi-support__send:disabled { opacity: .55; cursor: wait; }
.bi-support__send svg { width: 1.1rem; height: 1.1rem; }
.bi-support__legal { margin: .48rem 0 0; color: #536b7d; font-size: .68rem; text-align: center; }
.bi-support__legal a { color: #315f88; }
.bi-support__hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@media (max-width: 520px) {
  .bi-support { right: .75rem; bottom: .75rem; }
  .bi-support__panel { right: max(-.1rem, env(safe-area-inset-right, 0px)); bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 1.3rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); height: min(40rem, calc(100svh - 6.5rem - env(safe-area-inset-bottom, 0px))); border-radius: 1rem; }
  .bi-support__launcher { width: 3.8rem; height: 3.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bi-support__panel, .bi-support__typing span, .bi-support__launcher { animation: none; transition: none; }
  .bi-support__transcript { scroll-behavior: auto; }
}

@media print { .bi-support { display: none !important; } }

