#agent-chat-root { position: fixed; bottom: 20px; right: 20px; z-index: 9999; font: 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
#agent-chat-root.agent-chat-dismissed { display: none; }
.agent-chat-toggle-wrap { position: relative; width: 50px; height: 50px; }
.agent-chat-toggle { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; background: #155eef; color: #fff; border: 0; border-radius: 50%; padding: 0; font-size: 21px; cursor: pointer; box-shadow: 0 8px 24px rgba(16,24,40,.2); }
.agent-chat-dismiss { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; background: #667085; color: #fff; border: 2px solid #fff; font-size: 12px; line-height: 1; padding: 0; cursor: pointer; }
.agent-chat-panel { position: fixed; bottom: 78px; right: 20px; width: 300px; max-height: 66vh; background: #fff; border: 1px solid #e4e7ec; border-radius: 14px; box-shadow: 0 10px 30px rgba(16,24,40,.16); display: none; flex-direction: column; overflow: hidden; }
.agent-chat-panel.agent-chat-open { display: flex; }
.agent-chat-header { background: #155eef; color: #fff; padding: 12px 14px; font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.agent-chat-close { background: rgba(255,255,255,.15); border: none; color: #fff; width: 24px; height: 24px; border-radius: 50%; font-size: 15px; line-height: 1; cursor: pointer; }
.agent-chat-log { flex: 1; overflow-y: auto; padding: 12px; font-size: 13px; background: #f9fafb; }
.agent-chat-message { margin-bottom: 9px; padding: 8px 11px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; line-height: 1.4; }
.agent-chat-user { background: #155eef; color: #fff; margin-left: auto; border-bottom-right-radius: 3px; }
.agent-chat-assistant { background: #fff; color: #172033; border: 1px solid #e4e7ec; border-bottom-left-radius: 3px; }
.agent-chat-status { background: none; color: #667085; font-size: 11.5px; font-style: italic; padding: 2px 4px; }
.agent-chat-error { background: #fee4e2; color: #b42318; border: 1px solid #fda29b; }
.agent-chat-suggestions { display: flex; flex-direction: column; gap: 7px; margin: 4px 0 11px; }
.agent-chat-suggestion-link { display: block; background: #b42318; color: #fff; text-decoration: none; padding: 9px 11px; border-radius: 8px; font-size: 13px; font-weight: 700; text-align: center; }
.agent-chat-form { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px; border-top: 1px solid #e4e7ec; align-items: center; background: #fff; }
.agent-chat-input { flex: 1; min-width: 110px; padding: 9px 11px; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; font-size: 13px; }
.agent-chat-input:focus { outline: 2px solid #155eef33; border-color: #155eef; }
.agent-chat-image-label { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #d0d5dd; border-radius: 8px; cursor: pointer; font-size: 15px; flex: 0 0 auto; }
.agent-chat-image { display: none; }
.agent-chat-image-preview { display: none; width: 100%; padding: 0 0 7px; align-items: center; gap: 7px; font-size: 11.5px; color: #667085; }
.agent-chat-image-preview.agent-chat-has-image { display: flex; }
.agent-chat-image-preview img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; border: 1px solid #e4e7ec; }
.agent-chat-image-remove { background: none; border: none; color: #b42318; cursor: pointer; font-size: 11.5px; text-decoration: underline; padding: 0; }
.agent-chat-form button[type="submit"] { background: #155eef; color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 700; cursor: pointer; flex: 0 0 auto; }
.agent-chat-form button[type="submit"]:disabled { background: #9db8e6; cursor: default; }

@media (max-width: 640px) {
    #agent-chat-root { bottom: 84px; right: 12px; }
    .agent-chat-panel { bottom: 138px; right: 12px; left: 12px; width: auto; max-height: 58vh; }
}

.agent-chat-toggle { overflow: hidden; background: #fff; }
.agent-chat-toggle img { display: block; width: 100%; height: 100%; }
.agent-chat-toggle:focus-visible, .agent-chat-close:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }
.agent-chat-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.agent-chat-identity img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); flex: 0 0 auto; }
.agent-chat-identity strong { display: block; font-size: 14px; line-height: 1.2; }
.agent-chat-identity small { display: block; font-size: 11.5px; font-weight: 400; opacity: .85; line-height: 1.3; }
.agent-chat-assistant { position: relative; margin-left: 30px; }
.agent-chat-assistant::before { content: ""; position: absolute; left: -30px; bottom: 0; width: 24px; height: 24px; border-radius: 50%; background: url("agent-avatar.svg?v=20260930") center / cover no-repeat; }
