/* =================================================================
 * SBM CHAT MASCOT (Giao diện Con Mèo Nổi)
 * ================================================================= */

.sbm-floating-chat-wrapper {
    position: fixed; bottom: 20px; right: 20px; z-index: 999998; 
    display: flex; flex-direction: column; align-items: flex-end; pointer-events: none;
}

.sbm-chat-greeting-bubble {
    background: #fff; padding: 12px 16px; border-radius: 20px 20px 4px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); font-size: 0.9rem; color: #374151;
    margin-bottom: 10px; opacity: 0; transform: translateY(10px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: auto;
    position: relative; max-width: 200px; border: 1px solid #e5e7eb; font-family: sans-serif;
}
.sbm-chat-greeting-bubble.is-visible { opacity: 1; transform: translateY(0) scale(1); }

.sbm-chat-greeting-close {
    position: absolute; top: -8px; left: -8px; background: #e5e7eb; color: #666;
    width: 20px; height: 20px; border-radius: 50%; font-size: 12px; line-height: 20px; 
    text-align: center; cursor: pointer; display: none;
}
.sbm-chat-greeting-bubble:hover .sbm-chat-greeting-close { display: block; }

.sbm-floating-chat-btn {
    width: 60px; height: 60px; border-radius: 50%; background: #fff;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4); cursor: grab; pointer-events: auto;
    position: relative; display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease; border: 2px solid #fff;
}
.sbm-floating-chat-btn:active { cursor: grabbing; }

.sbm-floating-chat-btn.sbm-mascot-mode {
    width: 65px; height: 65px; background: #fff; border: 2px solid var(--sbm-primary-color, #22c55e); 
    overflow: hidden;
}
.sbm-floating-chat-btn.sbm-mascot-mode img {
    width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); user-select: none; -webkit-user-drag: none;
}
.sbm-floating-chat-btn.sbm-mascot-mode:hover {
    transform: scale(1.1) rotate(-5deg); box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

.sbm-chat-badge {
    position: absolute; top: 0; right: 0; background: #ef4444; color: #fff;
    font-size: 11px; font-weight: bold; width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
    animation: sbm-bounce 2s infinite;
}

@keyframes sbm-bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);} 60% {transform: translateY(-3px);}
}

body.sbm-footer-expanded .sbm-floating-chat-wrapper { bottom: 330px; }