/* VST V1.38 Internal Chat + File Sharing Foundation */
.chat-shell .card { border-radius: 14px; }
.chat-sidebar { position: sticky; top: 92px; }
.chat-conversation-list { max-height: 68vh; overflow-y: auto; }
.chat-window { min-height: 70vh; }
.chat-messages { height: 52vh; overflow-y: auto; background: #f8fafc; }
.chat-message { display: flex; margin-bottom: .75rem; }
.chat-message-mine { justify-content: flex-end; }
.chat-message-bubble { max-width: min(760px, 92%); background: #ffffff; border: 1px solid #e5e7eb; border-radius: 14px; padding: .75rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .05); }
.chat-message-mine .chat-message-bubble { background: #eef6ff; border-color: #cfe6ff; }
.chat-message-meta { display: flex; gap: .75rem; justify-content: space-between; font-size: .78rem; color: #64748b; margin-bottom: .35rem; }
.chat-message-text { white-space: normal; word-break: break-word; }
.chat-attachment { display: flex; gap: .75rem; align-items: center; margin-top: .6rem; padding: .55rem; background: rgba(255,255,255,.8); border: 1px solid #e5e7eb; border-radius: 12px; }
.chat-attachment img { max-width: 150px; max-height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid #e5e7eb; }
.chat-send-form textarea { resize: vertical; }
@media (max-width: 991.98px) {
    .chat-sidebar { position: static; }
    .chat-conversation-list { max-height: 36vh; }
    .chat-messages { height: 50vh; }
    .chat-message-bubble { max-width: 96%; }
}

/* VST V1.38.1 Chat Messenger Launcher */
.vst-chat-navbar-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 38px;
    white-space: nowrap;
}
.vst-chat-navbar-button .vst-chat-unread-badge {
    font-size: .68rem;
    min-width: 1.35rem;
}
.vst-chat-floating-button {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1040;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    border: 0;
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.vst-chat-floating-button:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, .34);
}
.vst-chat-floating-button .vst-chat-unread-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    border: 2px solid #fff;
    min-width: 1.55rem;
    font-size: .72rem;
}
.vst-chat-floating-button.vst-chat-has-unread {
    animation: vstChatPulse 1.8s ease-in-out infinite;
}
@keyframes vstChatPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-1px) scale(1.04); }
}
.vst-chat-toast {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 1040;
    max-width: 320px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
    padding: .75rem .85rem;
    display: none;
}
.vst-chat-toast.show { display: block; }
.vst-chat-toast-title { font-weight: 700; margin-bottom: .15rem; }
.vst-chat-popout-body {
    background: #eef2f7;
}
.vst-chat-popout-container {
    padding: 12px;
}
.vst-chat-popout-container .chat-window {
    min-height: calc(100vh - 140px);
}
.vst-chat-popout-container .chat-messages {
    height: calc(100vh - 310px);
    min-height: 300px;
}
.vst-chat-open-new-window {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
@media (max-width: 767.98px) {
    .vst-chat-floating-button {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
        font-size: 1.45rem;
    }
    .vst-chat-toast {
        right: 16px;
        bottom: 84px;
        left: 16px;
        max-width: none;
    }
}
