/* Connexus Modern Chat Widget - Purple & Black Theme */

#connexus-chat-icon {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #6B46C1 0%, #9333EA 100%);
    color: #fff;
    padding: 14px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(147, 51, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#connexus-chat-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 48px rgba(147, 51, 234, 0.6);
    background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
}

#connexus-chat-icon img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

#connexus-chat-box {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-height: 600px;
    background: #0F0F14;
    border-radius: 20px;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(147, 51, 234, 0.3);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#connexus-chat-box .header {
    background: linear-gradient(135deg, #6B46C1 0%, #9333EA 100%);
    color: #fff;
    padding: 18px 20px;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-bottom: 2px solid rgba(147, 51, 234, 0.3);
}

#connexus-chat-box .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

#connexus-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

#connexus-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#connexus-chat-box .messages {
    height: 340px;
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    background: #0F0F14;
    color: #E5E7EB;
}

#connexus-chat-box .messages::-webkit-scrollbar {
    width: 6px;
}

#connexus-chat-box .messages::-webkit-scrollbar-track {
    background: rgba(147, 51, 234, 0.1);
    border-radius: 10px;
}

#connexus-chat-box .messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6B46C1, #9333EA);
    border-radius: 10px;
}

#connexus-chat-box .messages p {
    margin: 0 0 12px 0;
    padding: 12px 16px;
    background: rgba(147, 51, 234, 0.1);
    border-radius: 12px;
    border-left: 3px solid #9333EA;
    animation: fadeIn 0.3s ease;
}

#connexus-chat-box .messages a {
    color: #A855F7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

#connexus-chat-box .messages a:hover {
    color: #C084FC;
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#connexus-chat-box .buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 16px;
    gap: 8px;
    background: #1A1A24;
    border-top: 1px solid rgba(147, 51, 234, 0.2);
    max-height: 180px;
    overflow-y: auto;
}

#connexus-chat-box .buttons::-webkit-scrollbar {
    width: 4px;
}

#connexus-chat-box .buttons::-webkit-scrollbar-thumb {
    background: #9333EA;
    border-radius: 4px;
}

#connexus-chat-box .buttons button {
    padding: 10px 14px;
    cursor: pointer;
    border: 2px solid rgba(147, 51, 234, 0.4);
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.2), rgba(147, 51, 234, 0.2));
    color: #E5E7EB;
    border-radius: 10px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: left;
}

#connexus-chat-box .buttons button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#connexus-chat-box .buttons button:hover::before {
    width: 300px;
    height: 300px;
}

#connexus-chat-box .buttons button:hover {
    border-color: #9333EA;
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.4), rgba(147, 51, 234, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
    color: #fff;
}

#connexus-chat-box .buttons button:active {
    transform: translateY(0);
}

#connexus-chat-box .buttons button span {
    position: relative;
    z-index: 1;
}

/* Sub-menu buttons */
.sub-menu-btn {
    grid-column: span 1;
    font-size: 11px !important;
    padding: 8px 12px !important;
}

/* Responsive Design */
@media (max-width: 480px) {
    #connexus-chat-box {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 90px;
        max-height: 70vh;
    }
    
    #connexus-chat-icon {
        right: 16px;
        bottom: 16px;
    }

    #connexus-chat-box .buttons {
        grid-template-columns: 1fr;
    }
}