#advmoto-assistant { --ama-bottom:20px; position:fixed; bottom:calc(var(--ama-bottom) + env(safe-area-inset-bottom, 0px)); right:max(20px, env(safe-area-inset-right, 0px)); left:auto; display:flex; flex-direction:column; align-items:flex-end; z-index:99990; font:15px/1.5 system-ui,sans-serif; color:#252525; }
#advmoto-assistant * { box-sizing:border-box; }
#advmoto-assistant [hidden] { display:none!important; }
#advmoto-assistant button { cursor:pointer; border:0; border-radius:9px; background:#b93617; color:#fff; padding:10px 15px; font:inherit; }
#advmoto-assistant button:disabled { opacity:.55; cursor:wait; }
#advmoto-assistant :focus-visible { outline:3px solid #156cc4; outline-offset:3px; }
#advmoto-assistant .ama-toggle { border-radius:30px; box-shadow:0 4px 18px #0003; }
#ama-panel { width:390px; max-width:calc(100vw - 40px - env(safe-area-inset-right, 0px) - env(safe-area-inset-left, 0px)); max-height:calc(100dvh - var(--ama-bottom) - 90px - env(safe-area-inset-bottom, 0px)); overflow:auto; background:#fff; border:1px solid #ddd; border-radius:16px; margin-bottom:12px; box-shadow:0 10px 35px #0003; }
#ama-panel header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid #eee; }
#ama-panel header button { background:transparent; color:#333; font-size:26px; padding:0 8px; }
#ama-panel .ama-log { height:220px; overflow:auto; padding:12px; background:#faf8f5; }
#ama-panel .ama-message { white-space:pre-wrap; overflow-wrap:anywhere; margin:0 0 12px; padding:10px 12px; border-radius:10px; background:#fff; }
#ama-panel .ama-user { background:#fbe5dd; margin-left:25px; }
#ama-panel .ama-assistant { margin-right:15px; }
#ama-panel .ama-consent { display:flex; align-items:flex-start; gap:8px; padding:10px 14px; font-size:12px; }
#ama-panel input[type=checkbox] { flex:0 0 auto; width:17px; height:17px; margin:3px 0 0; }
#ama-panel .ama-chat-form { display:flex; align-items:flex-end; gap:8px; padding:10px 14px; }
#ama-panel textarea,#ama-panel input:not([type=checkbox]) { font:inherit; color:#252525; background:#fff; border:1px solid #aaa; border-radius:7px; padding:8px; width:100%; }
#ama-panel textarea { resize:vertical; }
#ama-panel .ama-status,#ama-panel .ama-notice { margin:0; padding:0 14px 8px; font-size:13px; }
#ama-panel .ama-notice { background:#fff2c9; padding:8px 14px; }
#ama-panel details { padding:10px 14px; border-top:1px solid #eee; }
#ama-panel summary { cursor:pointer; font-weight:600; }
#ama-panel a { color:#96300e; text-decoration:underline; }
#ama-panel .ama-sources a { display:block; margin-top:7px; }
#ama-panel .ama-privacy { margin:0 14px; font-size:12px; }
#ama-panel .ama-proposal label { display:block; font-size:13px; margin:10px 0; }
#ama-panel .ama-proposal .ama-consent { display:flex; padding:0; }
#ama-panel footer { display:flex; gap:20px; padding:12px 14px; border-top:1px solid #eee; }
@media(max-width:767px) {
    #advmoto-assistant { --ama-bottom:12px; right:max(12px, env(safe-area-inset-right, 0px)); left:auto; }
    /* Leave the tour/rental action row accessible below the chat launcher. */
    body.hec-tc-paired-actions #advmoto-assistant,
    body:has(.hec-tc-floating:not([hidden]), .hec-rent-trigger:not([hidden])) #advmoto-assistant { --ama-bottom:92px; }
    #ama-panel { max-width:calc(100vw - 24px - env(safe-area-inset-right, 0px) - env(safe-area-inset-left, 0px)); }
}
