.vai-wrap { --vai-main: #0b5ed7; --vai-bg: #fff; --vai-text: #1f2937; font-family: inherit; font-size: 15px; line-height: 1.45; }
.vai-wrap * { box-sizing: border-box; }

.vai-fab { position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--vai-main); color: #fff; font-size: 26px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); z-index: 99998; }
.vai-fab:hover { filter: brightness(1.1); }

.vai-panel { display: none; flex-direction: column; background: var(--vai-bg); color: var(--vai-text); border-radius: 12px; overflow: hidden; border: 1px solid #d9dee5; }
.vai-panel.vai-open { display: flex; }
#vai-root .vai-panel { position: fixed; right: 20px; bottom: 90px; width: 380px; max-width: calc(100vw - 24px); height: 540px; max-height: calc(100vh - 110px); box-shadow: 0 8px 30px rgba(0,0,0,.3); z-index: 99999; }
.vai-inline .vai-panel { width: 100%; max-width: 720px; height: 560px; margin: 0 auto; }

.vai-head { background: var(--vai-main); color: #fff; padding: 12px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.vai-close { background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.vai-note { font-size: 12px; background: #f3f6fa; color: #5b6573; padding: 6px 14px; border-bottom: 1px solid #e5e9ef; }

.vai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fafbfc; }
.vai-msg { max-width: 86%; padding: 9px 12px; border-radius: 12px; word-wrap: break-word; overflow-wrap: anywhere; }
.vai-user { align-self: flex-end; background: var(--vai-main); color: #fff; border-bottom-right-radius: 3px; }
.vai-assistant { align-self: flex-start; background: #fff; border: 1px solid #e1e5ea; border-bottom-left-radius: 3px; }
.vai-user a { color: #fff; }
.vai-msg img { display: block; max-width: 100%; border-radius: 8px; margin-top: 8px; }
.vai-typing { opacity: .6; font-style: italic; }

.vai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e5e9ef; background: #fff; }
.vai-input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #c8cfd8; border-radius: 8px; font-size: 15px; }
.vai-input:focus { outline: 2px solid var(--vai-main); outline-offset: -1px; }
.vai-send { padding: 0 16px; border: 0; border-radius: 8px; background: var(--vai-main); color: #fff; cursor: pointer; font-size: 15px; }
.vai-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  #vai-root .vai-panel { right: 8px; left: 8px; bottom: 84px; width: auto; max-width: none; }
}
