﻿/* =========================================
   AI ASSISTANT
========================================= */

#aiAssistant {
    position: relative;
    z-index: 99999;
}


/* =========================================
   FLOATING AI BUTTON
========================================= */

.ai-assistant-button {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    background: #384bff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(56, 75, 255, 0.35);
    z-index: 99999;
    transition: all 0.3s ease;
}


    .ai-assistant-button:hover {
        transform: scale(1.08);
        box-shadow: 0 10px 35px rgba(56, 75, 255, 0.45);
    }


/* =========================================
   CHAT BOX
========================================= */

.ai-assistant-box {
    position: fixed;
    right: 25px;
    bottom: 100px;
    width: 380px;
    height: 520px;
    max-width: calc(100vw - 30px);
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18);
    border: 1px solid #e7e9f2;
    z-index: 99999;
    animation: aiChatOpen 0.25s ease;
}


@keyframes aiChatOpen {

    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================
   CHAT HEADER
========================================= */

.ai-chat-header {
    background: #384bff;
    padding: 16px 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.ai-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}


.ai-chat-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    color: #384bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}


.ai-chat-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}


.ai-chat-header span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}


/* =========================================
   CLOSE BUTTON
========================================= */

.ai-chat-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}


    .ai-chat-close:hover {
        background: rgba(255, 255, 255, 0.15);
    }


/* =========================================
   CHAT BODY
========================================= */

.ai-chat-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: #f7f8fc;
}


/* =========================================
   AI MESSAGE
========================================= */

.ai-message-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 15px;
}


.ai-small-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: #e9ecff;
    color: #384bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}


.ai-message {
    max-width: 80%;
    padding: 12px 14px;
    background: #ffffff;
    color: #202124;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 5px 15px 15px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}


/* =========================================
   USER MESSAGE
========================================= */

.user-message-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}


.user-message {
    max-width: 80%;
    padding: 11px 14px;
    background: #384bff;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 15px 5px 15px 15px;
}


/* =========================================
   INPUT AREA
========================================= */

.ai-chat-input-area {
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e8e9ee;
    display: flex;
    align-items: center;
    gap: 8px;
}


    .ai-chat-input-area input {
        flex: 1;
        height: 44px;
        border: 1px solid #e0e2eb;
        border-radius: 25px;
        padding: 0 16px;
        outline: none;
        font-size: 14px;
        color: #202124;
        background: #ffffff;
    }


        .ai-chat-input-area input:focus {
            border-color: #384bff;
        }


    .ai-chat-input-area button {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border: none;
        border-radius: 50%;
        background: #384bff;
        color: #ffffff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        transition: all 0.2s ease;
    }


        .ai-chat-input-area button:hover {
            transform: scale(1.05);
        }


/* =========================================
   MOBILE
========================================= */

@media (max-width: 576px) {

    .ai-assistant-button {
        right: 15px;
        bottom: 15px;
        width: 56px;
        height: 56px;
        font-size: 22px;
    }


    .ai-assistant-box {
        right: 15px;
        bottom: 85px;
        width: calc(100vw - 30px);
        height: 70vh;
        border-radius: 18px;
    }
}
