/* JP Mascot — AI chat widget */
.jpmascot-chat{--jpm-color:#2fb5d2;position:fixed;bottom:16px;z-index:1040;font-size:15px;line-height:1.4}
.jpmascot-chat-right{right:16px}.jpmascot-chat-left{left:16px}
.jpmascot-chat-launcher{display:flex;align-items:center;gap:8px;padding:4px 14px 4px 4px;border:0;border-radius:40px;background:#fff;color:#222;box-shadow:0 4px 18px rgba(0,0,0,.18);cursor:pointer;font-weight:600}
.jpmascot-chat-launcher img{width:52px;height:auto;border-radius:50%;background:color-mix(in srgb,var(--jpm-color) 18%,#fff)}
.jpmascot-chat-launcher:focus-visible,.jpmascot-chat button:focus-visible,.jpmascot-is-chat:focus-visible{outline:3px solid var(--jpm-color);outline-offset:2px}
.jpmascot-chat.is-open .jpmascot-chat-launcher{display:none}
.jpmascot-chat-has-float .jpmascot-chat-launcher-label{display:none}
.jpmascot-is-chat{cursor:pointer}
.jpmascot-chat-panel{position:absolute;bottom:0;width:min(380px,calc(100vw - 24px));height:min(560px,calc(100vh - 32px));display:flex;flex-direction:column;background:#fff;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.25);overflow:hidden}
.jpmascot-chat-right .jpmascot-chat-panel{right:0}.jpmascot-chat-left .jpmascot-chat-panel{left:0}
.jpmascot-chat-panel[hidden]{display:none}
.jpmascot-chat-head{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jpm-color);color:#fff}
.jpmascot-chat-head img{width:40px;height:auto;border-radius:50%;background:#fff}
.jpmascot-chat-title{flex:1;display:flex;flex-direction:column;line-height:1.2}
.jpmascot-chat-title small{opacity:.9;font-size:12px}
.jpmascot-chat-close,.jpmascot-chat-reset{border:0;background:transparent;color:#fff;font-size:24px;line-height:1;cursor:pointer;padding:4px 6px}
.jpmascot-chat-reset{font-size:20px}
.jpmascot-chat-log{flex:1;overflow-y:auto;padding:12px;background:#f6f7f9;display:flex;flex-direction:column;gap:8px}
.jpmascot-chat-msg{max-width:88%;padding:8px 12px;border-radius:14px;word-wrap:break-word}
.jpmascot-chat-msg p{margin:0 0 6px}.jpmascot-chat-msg p:last-child{margin-bottom:0}
.jpmascot-chat-msg ul{margin:4px 0 6px;padding-left:18px}
.jpmascot-chat-bot{align-self:flex-start;background:#fff;border:1px solid #e3e6ea;border-bottom-left-radius:4px;color:#222}
.jpmascot-chat-user{align-self:flex-end;background:var(--jpm-color);color:#fff;border-bottom-right-radius:4px}
.jpmascot-chat-bot a{color:#0b5e8a;text-decoration:underline}
.jpmascot-chat-msg.is-error{background:#fff4f4;border-color:#f3c2c2}
.jpmascot-chat-cards{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.jpmascot-chat-card{display:flex;gap:8px;align-items:center;padding:6px;border:1px solid #e3e6ea;border-radius:10px;text-decoration:none!important;color:#222!important;background:#fafbfc}
.jpmascot-chat-card:hover{border-color:var(--jpm-color)}
.jpmascot-chat-card img{width:56px;height:56px;object-fit:contain;background:#fff;border-radius:6px}
.jpmascot-chat-card-body{display:flex;flex-direction:column;min-width:0}
.jpmascot-chat-card-name{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.jpmascot-chat-card-meta{font-size:13px}.jpmascot-chat-card-meta .is-in{color:#1a7f37}.jpmascot-chat-card-meta .is-out{color:#b42318}
.jpmascot-chat-form{display:flex;gap:8px;align-items:flex-end;padding:8px;border-top:1px solid #e3e6ea;background:#fff}
.jpmascot-chat-input{flex:1;resize:none;border:1px solid #cfd4da;border-radius:12px;padding:8px 10px;font:inherit;max-height:110px}
.jpmascot-chat-input:focus{outline:2px solid var(--jpm-color);border-color:transparent}
.jpmascot-chat-send{border:0;border-radius:50%;width:40px;height:40px;flex:0 0 40px;background:var(--jpm-color);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.jpmascot-chat-send[disabled]{opacity:.5;cursor:wait}
.jpmascot-chat-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.jpmascot-chat-note{margin:0;padding:4px 12px 8px;font-size:11px;color:#667;background:#fff}
.jpmascot-chat-typing span{display:inline-block;width:6px;height:6px;margin-right:2px;border-radius:50%;background:#99a;animation:jpmChatDot 1s infinite}
.jpmascot-chat-typing span:nth-child(2){animation-delay:.15s}.jpmascot-chat-typing span:nth-child(3){animation-delay:.3s}
@keyframes jpmChatDot{0%,80%,100%{opacity:.3}40%{opacity:1}}
@media (prefers-reduced-motion:reduce){.jpmascot-chat-typing span{animation:none}}
@media (max-width:575px){.jpmascot-chat{bottom:12px}.jpmascot-chat-right{right:8px}.jpmascot-chat-left{left:8px}.jpmascot-chat-launcher-label{display:none}.jpmascot-chat-launcher{width:44px;height:44px;padding:2px;justify-content:center;box-shadow:0 2px 10px rgba(0,0,0,.25)}.jpmascot-chat-launcher img{width:40px;height:40px;object-fit:contain}
.jpmascot-chat.is-open{left:0;right:0;bottom:0}.jpmascot-chat-panel{position:fixed;left:0;right:0;bottom:0;width:100%;height:85vh;border-radius:16px 16px 0 0}}
/* back office */
.jpmascot-chat-sync-log{max-height:160px;overflow:auto;background:#f6f7f9;padding:8px;font-size:12px;white-space:pre-wrap}
