/* Global StuConnect Floating Button - Side Peeking Style */
.stuconnect-floating-btn {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(0);
    width: auto;
    height: auto;
    background: white;
    cursor: pointer;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
    padding: 0;
}

.stuconnect-btn-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.stuconnect-btn-text {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.stuconnect-floating-btn:hover {
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.25);
}

.stuconnect-floating-btn:hover .stuconnect-btn-text {
    max-width: 200px;
    padding: 0 20px 0 12px;
}

.stuconnect-floating-btn:active {
    transform: translateY(-50%) translateX(-2px);
}

.stuconnect-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
    animation: badgePulse 2s infinite;
    z-index: 1;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .stuconnect-btn-image {
        width: 50px;
        height: 50px;
    }

    .stuconnect-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .stuconnect-floating-btn:hover .stuconnect-btn-text {
        max-width: 150px;
        padding: 0 15px 0 10px;
        font-size: 14px;
    }
}

/* Chat Popup - Phone-style like Roblox/Customer Support */
.stuconnect-chat-popup {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpFade 0.3s ease;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stuconnect-popup-header {
    background: #000000;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.stuconnect-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.stuconnect-popup-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.stuconnect-popup-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.stuconnect-popup-body {
    flex: 1;
    overflow: hidden;
    background: #f5f5f5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .stuconnect-chat-popup {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 80px;
    }
}
