/* --- PREMIUM AI CHAT STYLING --- */

/* Chat Bubble - Luxury Design */
#ai-chat-bubble {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5), 0 0 0 0 rgba(139, 92, 246, 0.4);
    cursor: pointer;
    z-index: 9999 !important;
    visibility: visible !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

#ai-chat-bubble:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 16px 50px rgba(139, 92, 246, 0.6), 0 0 0 8px rgba(139, 92, 246, 0.1);
}

#ai-chat-bubble i {
    transition: transform 0.3s ease;
}

#ai-chat-bubble:hover i {
    transform: scale(1.1);
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5), 0 0 0 0 rgba(139, 92, 246, 0.4);
    }

    50% {
        box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5), 0 0 0 12px rgba(139, 92, 246, 0);
    }

    100% {
        box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5), 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

/* Chat Window - Premium Design */
#ai-window {
    position: fixed !important;
    bottom: 120px !important;
    right: 30px !important;
    width: 420px;
    height: 600px;
    background: white;
    border-radius: 28px;
    z-index: 10000 !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(139, 92, 246, 0.1);
    contain: content;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header - Premium Gradient */
.ai-header {
    background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);
    padding: 24px;
    border-radius: 28px 28px 0 0;
}

.ai-header-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.ai-header-info {
    flex: 1;
}

.ai-agent-name {
    font-size: 18px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

.ai-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Messages Area */
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #F8FAFC;
    scroll-behavior: smooth;
}

.ai-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8B5CF6, #D946EF);
    border-radius: 10px;
}

.ai-msg-bot {
    background: white;
    padding: 16px 18px;
    border-radius: 20px 20px 20px 6px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 15px;
    line-height: 1.6;
    color: #1E293B;
    border: 1px solid rgba(139, 92, 246, 0.1);
    animation: fadeInLeft 0.3s ease;
}

.ai-msg-user {
    background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);
    color: white;
    padding: 16px 18px;
    border-radius: 20px 20px 6px 20px;
    margin-bottom: 16px;
    margin-left: auto;
    max-width: 80%;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    animation: fadeInRight 0.3s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Input Area */
.ai-input-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: white;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.ai-input-area input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1E293B;
    outline: none;
    transition: all 0.3s ease;
    background: #F8FAFC;
}

.ai-input-area input:focus {
    border-color: #8B5CF6;
    background: white;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.ai-input-area input::placeholder {
    color: #94A3B8;
    font-weight: 500;
}

.ai-send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.ai-send-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.ai-send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    #ai-chat-bubble {
        bottom: 20px !important;
        right: 20px !important;
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    #ai-window {
        width: 90%;
        left: 5%;
        right: 5%;
        bottom: 100px;
        height: 65vh;
        border-radius: 24px;
    }

    .ai-header {
        padding: 20px;
        border-radius: 24px 24px 0 0;
    }

    .ai-avatar {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .ai-agent-name {
        font-size: 16px;
    }

    .ai-messages {
        padding: 18px;
    }

    .ai-input-area {
        padding: 16px 18px;
    }
}