/* Live Chat Widget Styles */

#chat-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6);
    transition: all 0.3s ease;
    z-index: 9998;
    animation: pulse-glow 2s infinite;
}

#chat-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.8);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6);
    }

    50% {
        box-shadow: 0 4px 30px rgba(236, 72, 153, 0.8);
    }
}

#chat-unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    animation: badge-bounce 0.5s ease;
}

@keyframes badge-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

#chat-widget-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(139, 92, 246, 0.3);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.chat-header p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

#chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #0a0a0f;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 3px;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.admin-message {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 0.875rem 1rem;
    border-radius: 16px;
    position: relative;
    animation: message-appear 0.3s ease;
}

@keyframes message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.admin-message .message-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-bottom-left-radius: 4px;
}

.message-bubble p {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    display: block;
}

.chat-input-area {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    gap: 0.75rem;
}

#chat-message-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

#chat-message-input:focus {
    border-color: #8B5CF6;
    background: rgba(255, 255, 255, 0.12);
}

#chat-message-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#chat-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.6);
}

#chat-send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #chat-widget-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 10px;
        right: 20px;
        left: 20px;
    }
}