.application-chat[hidden] { display: none; }
.application-chat { position: fixed; inset: 0; z-index: 10000; color: #f4f4f5; font-family: inherit; }
.application-chat__backdrop { position: absolute; inset: 0; background: #000c; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.application-chat__panel { position: absolute; inset: min(4vh, 36px) max(20px, calc((100vw - 1160px)/2)); display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid #ffffff20; border-radius: 24px; background: #141414; box-shadow: 0 32px 120px #000b, 0 0 0 1px #0008; }
.application-chat__header { height: 68px; flex: 0 0 auto; display: flex; align-items: center; gap: 18px; padding: 0 26px; border-bottom: 1px solid #ffffff12; }
.application-chat__brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; letter-spacing: -.025em; }
.application-chat__brand svg { width: 23px; height: 23px; }
.application-chat__close { width: 34px; height: 34px; margin-left: auto; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #a8a8aa; cursor: pointer; transition: background .18s, color .18s; }
.application-chat__close svg { width: 20px; height: 20px; display: block; stroke-width: 2.8; }
.application-chat__close:hover, .application-chat__close:focus-visible { background: #ffffff16; color: #fff; }
.application-chat__conversation { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 30px; padding: 52px max(24px, calc((100% - 760px)/2)) 42px; scrollbar-color: #ffffff38 transparent; }
.application-chat__message { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 16px; max-width: 100%; }
.application-chat__message:last-child { animation: application-message-in .28s ease-out both; }
.application-chat__message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.58; }
.application-chat__message--assistant { align-self: flex-start; font-size: 18px; letter-spacing: -.015em; color: #e7e7e8; }
.application-chat__message--initial { color: #aaaab0; }
.application-chat__avatar { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; margin-top: 2px; color: #fff; }
.application-chat__avatar svg { width: 22px; height: 22px; }
.application-chat__message--user { align-self: flex-end; align-items: flex-end; flex-direction: column; gap: 4px; max-width: min(90%, 620px); }
.application-chat__answer { max-width: 100%; padding: 11px 17px; border: 1px solid #ffffff12; border-radius: 20px 20px 6px 20px; background: #222; color: #f2f2f2; font: inherit; font-size: 16px; line-height: 1.58; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.application-chat__answer-actions { align-self: flex-end; display: flex; gap: 2px; margin-top: 1px; opacity: 0; pointer-events: none; transition: opacity .16s ease; }
.application-chat__message--user:hover .application-chat__answer-actions,
.application-chat__message--user:focus-within .application-chat__answer-actions { opacity: 1; pointer-events: auto; }
.application-chat__answer-actions button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #9a9a9e; cursor: pointer; transition: background .16s ease, color .16s ease; }
.application-chat__answer-actions button:hover,
.application-chat__answer-actions button:focus-visible { background: #ffffff16; color: #fff; }
.application-chat__answer-actions button svg { width: 16px; height: 16px; }
.application-chat__inline-answer { box-sizing: border-box; width: 100%; min-height: 48px; max-height: 320px; resize: none; padding: 11px 17px; border: 1px solid #ffffff65; border-radius: 20px 20px 6px 20px; outline: none; background: #222; box-shadow: 0 0 0 3px #ffffff0b; color: #f2f2f2; font: inherit; font-size: 16px; line-height: 1.58; }
.application-chat__inline-answer:focus-visible { border-color: #ffffffa0; }
.application-chat__inline-error { margin: 2px 0 0; color: #ffadad; font-size: 12px; }
.application-chat__inline-error[hidden] { display: none; }
.application-chat__sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.application-chat__composer { width: min(760px, calc(100% - 48px)); flex: 0 0 auto; margin: 0 auto 20px; }
.application-chat__composer[hidden] { display: none; }
.application-chat__composer-box { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border: 1px solid #ffffff20; border-radius: 22px; background: #222; transition: border-color .2s, box-shadow .2s; }
.application-chat__composer-box:focus-within { border-color: #ffffff55; box-shadow: 0 0 0 3px #ffffff0b; }
.application-chat__composer-box textarea { box-sizing: border-box; flex: 1 1 auto; min-width: 0; min-height: 42px; max-height: 160px; overflow-y: hidden; resize: none; padding: 9px 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 16px; line-height: 24px; }
.application-chat__composer-box textarea::placeholder { color: #77777c; }
.application-chat__send { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f4f4f4; color: #111; cursor: pointer; transition: transform .18s, background .18s; }
.application-chat__send:hover, .application-chat__send:focus-visible { background: #fff; transform: scale(1.06); }
.application-chat__send svg { width: 19px; height: 19px; }
.application-chat__error { margin: 8px 4px 0; color: #ffadad; font-size: 13px; }
.application-chat__error[hidden] { display: none; }
body.application-chat-open { overflow: hidden; }
@keyframes application-message-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 680px) {
  .application-chat__panel { inset: 0; border: 0; border-radius: 0; }
  .application-chat__header { height: 60px; padding: 0 18px; }
  .application-chat__conversation { padding: 34px 18px 28px; gap: 24px; }
  .application-chat__message--assistant { font-size: 16px; }
  .application-chat__composer { width: calc(100% - 32px); }
}
@media (hover: none) { .application-chat__answer-actions { opacity: 1; pointer-events: auto; } }
@media (prefers-reduced-motion: reduce) { .application-chat__message { animation: none; } .application-chat * { transition-duration: 0ms !important; } }
