
:root{--mc-width:340px;--mc-height:520px;--mc-border-radius:24px;--mc-bg:#fff;--mc-header-bg:#f1f1f3;--mc-header-color:#000;--mc-user-bubble:#007aff;--mc-user-color:#fff;--mc-bot-bubble:#e5e5ea;--mc-bot-color:#000;--mc-input-bg:#f1f1f3;--mc-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.mc-chat{position:fixed;bottom:20px;right:20px;width:var(--mc-width);height:var(--mc-height);background:var(--mc-bg);border-radius:var(--mc-border-radius);box-shadow:0 8px 32px rgba(0,0,0,.18);display:flex;flex-direction:column;font-family:var(--mc-font);font-size:15px;z-index:9999}
.mc-header{padding:14px 18px;background:var(--mc-header-bg);color:var(--mc-header-color);border-radius:var(--mc-border-radius) var(--mc-border-radius) 0 0;display:flex;align-items:center;gap:10px;font-weight:600}
.mc-header img{width:34px;height:34px;border-radius:50%}
.mc-close{margin-left:auto;background:none;border:none;font-size:20px;cursor:pointer;opacity:.6}
.mc-body{flex:1 1 auto;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:10px}
.mc-msg{display:flex;align-items:flex-end;gap:8px;max-width:75%}
.mc-msg.user{align-self:flex-end;flex-direction:row-reverse}
.mc-avatar{width:28px;height:28px;border-radius:50%;flex-shrink:0}
.mc-bubble{padding:10px 14px;border-radius:18px;line-height:1.35;word-break:break-word}
.mc-msg.user .mc-bubble{background:var(--mc-user-bubble);color:var(--mc-user-color);border-bottom-right-radius:4px}
.mc-msg.bot .mc-bubble{background:var(--mc-bot-bubble);color:var(--mc-bot-color);border-bottom-left-radius:4px}
.mc-input-box{display:flex;align-items:center;gap:8px;padding:10px 14px;background:var(--mc-input-bg);border-radius:0 0 var(--mc-border-radius) var(--mc-border-radius)}
.mc-input{flex:1 1 auto;border:none;outline:none;padding:10px 14px;border-radius:20px;font-size:15px;font-family:inherit;background:#fff}
.mc-send{background:var(--mc-user-bubble);color:#fff;border:none;border-radius:50%;width:36px;height:36px;display:grid;place-items:center;cursor:pointer;font-size:18px}
.mc-typing{font-size:13px;color:#888;padding:0 16px 6px}
#ai-launcher{position:fixed;bottom:20px;right:20px;width:60px;height:60px;border-radius:50%;background:var(--mc-user-bubble);display:grid;place-items:center;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.22);z-index:9999}
#ai-launcher svg{fill:#fff;width:28px;height:28px}
/* ---- badge ---- */
.ai-launcher-badge{
    position:fixed;
    bottom:20px;
    right:20px;                      /* RIGHT corner */
    height:48px;
    padding:0 18px 0 44px;           /* room for icon */
    background:#007aff;
    color:#fff;
    border-radius:24px;
    box-shadow:0 4px 16px rgba(0,0,0,.22);
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    z-index:9999;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    font-size:14px;
    white-space:nowrap;
}
.ai-launcher-icon{
    position:absolute;
    left:12px;
    width:24px;
    height:24px;
    fill:#fff;
}
/* hide text on very small screens (optional) */
@media (max-width:400px){
    .ai-launcher-text{display:none}
    .ai-launcher-badge{padding:0 12px}
}


/* Mobile optimization */
@media (max-width:768px){
    .mc-chat{
        bottom:0;
        right:0;
        left:0;
        top:0;
        width:100%;
        height:100%;
        max-height:100vh;
        border-radius:0;
    }
    .mc-header{
        border-radius:0;
        padding:16px 18px;
    }
    .mc-body{
        padding:16px;
    }
    .mc-input-box{
        border-radius:0;
        padding:12px 16px;
    }
    .mc-msg{
        max-width:85%;
    }
    .ai-launcher-badge{
        bottom:16px;
        right:16px;
    }
}
