#supChatLauncher {
    position: fixed; right: 22px; bottom: 22px;
    width: 56px; height: 56px; border-radius: 50%; border: 0;
    background: linear-gradient(135deg, #7F56D9, #6941C6); color: #fff;
    box-shadow: 0 10px 30px rgba(127, 86, 217, .4);
    cursor: pointer; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s, box-shadow .15s;
    overflow: visible;
}
#supChatLauncher:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(127, 86, 217, .5); }
#supChatLauncher svg { width: 24px; height: 24px; position: relative; z-index: 2; }
/* Soft pulse ring — signals "I'm here" without nagging. */
#supChatLauncher::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: linear-gradient(135deg, #7F56D9, #6941C6);
    opacity: .35;
    animation: supChatPulse 2.4s cubic-bezier(.4, 0, .6, 1) infinite;
    z-index: 1;
}
@keyframes supChatPulse {
    0%   { transform: scale(1);   opacity: .35; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}
/* Tiny green presence dot — "agent online" cue. */
#supChatLauncher::after {
    content: ''; position: absolute; top: 4px; right: 4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: #12B76A;
    border: 2px solid #fff;
    z-index: 3;
}

#supChatPanel {
    position: fixed; right: 22px; bottom: 22px;
    width: 380px; max-width: calc(100vw - 24px);
    height: 560px; max-height: calc(100vh - 24px);
    background: #fff; border-radius: 18px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .25);
    display: flex; flex-direction: column; overflow: hidden;
    z-index: 9999;
    font-family: inherit;
    animation: supChatIn .18s ease-out;
}
/* HTML5 `hidden` attribute is overridden by our explicit `display: flex` —
   force `display: none` so the panel stays closed on first paint. */
#supChatPanel[hidden] { display: none; }
@keyframes supChatIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.sup-chat-head {
    background: linear-gradient(135deg, #0C0518, #1A0A2E); color: #fff;
    padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.sup-chat-title { font-weight: 700; font-size: 15px; }
.sup-chat-sub { font-size: 12px; color: rgba(255, 255, 255, .6); margin-top: 2px; }
.sup-chat-close {
    background: transparent; border: 0; color: #fff;
    font-size: 24px; cursor: pointer; line-height: 1;
    width: 32px; height: 32px;
}
.sup-chat-body {
    flex: 1; overflow-y: auto;
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    background: #F9FAFB;
}
.sup-chat-msg {
    max-width: 88%;
    padding: 10px 14px; border-radius: 14px;
    font-size: 14px; line-height: 1.5;
    word-wrap: break-word;
}
.sup-chat-msg-assistant {
    background: #fff; border: 1px solid #EAECF0; color: #1a1a2e;
    align-self: flex-start; border-bottom-left-radius: 4px;
}
.sup-chat-msg-user {
    background: linear-gradient(135deg, #7F56D9, #6941C6); color: #fff;
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.sup-chat-link {
    display: inline-block; margin-top: 8px;
    font-size: 13px; font-weight: 600;
    color: #7F56D9; text-decoration: none;
}
.sup-chat-msg-user .sup-chat-link { color: #FCD34D; }
.sup-chat-typing {
    align-self: flex-start;
    color: #98a2b3; font-size: 18px;
    padding: 0 4px;
    animation: supBlink 1s infinite;
}
.sup-chat-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 4px;
}
.sup-chat-chip {
    padding: 7px 12px;
    background: #fff; border: 1px solid #E4D8FF; color: #6941C6;
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: background .12s, border-color .12s, color .12s;
}
.sup-chat-chip:hover { background: #F4EBFF; border-color: #B692F6; color: #53389E; }
@keyframes supBlink { 50% { opacity: .35; } }
.sup-chat-form {
    display: flex; gap: 8px;
    padding: 12px; border-top: 1px solid #EAECF0; background: #fff;
}
.sup-chat-form input {
    flex: 1;
    padding: 10px 14px; border: 1px solid #EAECF0; border-radius: 10px;
    font-size: 14px; outline: none; font-family: inherit;
}
.sup-chat-form input:focus { border-color: #7F56D9; }
.sup-chat-form button {
    width: 40px; border: 0; border-radius: 10px;
    background: #7F56D9; color: #fff;
    font-size: 18px; cursor: pointer; font-family: inherit;
}
.sup-chat-form button:hover { background: #6941C6; }
.sup-chat-foot {
    padding: 8px 12px 12px; background: #fff;
    border-top: 1px solid #F2F4F7; text-align: center;
}
.sup-chat-foot button {
    background: transparent; border: 0;
    color: #667085; font-size: 12px; font-weight: 600;
    cursor: pointer; text-decoration: underline;
    font-family: inherit;
}
.sup-chat-foot button:hover { color: #1a1a2e; }
@media (max-width: 560px) {
    /* Full-screen on mobile. Use dvh so the input + close button stay reachable
       behind the iOS/Android browser chrome (100vh would push them off-screen). */
    #supChatPanel { inset: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
    .sup-chat-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
