/*==============================
    Floating AI Button
==============================*/

.ai-button {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 75px;
    height: 75px;
    cursor: pointer;
    z-index: 9999;
}

    .ai-button img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


/*==============================
    AI Window
==============================*/

.ai-window {
    position: fixed;
    right: 30px;
    bottom: 120px;
    width: 380px;
    max-width: calc(100vw - 20px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    /* Hidden by default */
    display: none;
    flex-direction: column;
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

    /* Show when button is clicked */
    .ai-window.show {
        display: flex;
    }

/* Mobile Responsive */
@media (max-width: 576px) {
    .ai-window {
        left: 10px;
        right: 10px;
        bottom: 90px;
        width: auto;
        height: 75vh;
        max-height: 75vh;
        border-radius: 15px;
    }
}

/* Optional animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/*==============================
    Header
==============================*/

.ai-header {
    height: 75px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    color: #fff;
    background: linear-gradient(135deg,#007bff,#00bfff);
}

.header-robot {
    width: 45px;
    height: 45px;
}

.ai-header h5 {
    margin: 0;
    font-size: 18px;
}

.ai-header small {
    font-size: 13px;
}


/*==============================
    Chat Area
==============================*/

.ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f6f8fb;
}

.ai-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-icon {
    width: 34px;
    height: 34px;
}

.bubble {
    background: #fff;
    padding: 12px 15px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    font-size: 14px;
    line-height: 24px;
    max-width: 250px;
}


/*==============================
    Templates
==============================*/

.template-section {
    flex-shrink: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
    border-top: 1px solid #eee;
    background: #fff;
}

.template {
    border: 1px solid #d9d9d9;
    background: #f5f8ff;
    color: #0d6efd;
    border-radius: 25px;
    padding: 10px;
    min-height: 48px;
    font-size: 13px;
    cursor: pointer;
    transition: .3s;
}

    .template:hover {
        background: #0d6efd;
        color: #fff;
    }


/*==============================
    Footer
==============================*/

.ai-footer {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid #eee;
    background: #fff;
}

    .ai-footer input {
        flex: 1;
        border-radius: 25px;
    }

    .ai-footer button {
        border-radius: 25px;
    }


/*==============================
    Scrollbar
==============================*/

.ai-body::-webkit-scrollbar {
    width: 6px;
}

.ai-body::-webkit-scrollbar-thumb {
    background: #c8c8c8;
    border-radius: 10px;
}


/*==============================
    Mobile
==============================*/

@media(max-width:576px) {

    .ai-window {
        right: 10px;
        left: 10px;
        width: auto;
        height: 520px;
        bottom: 100px;
    }

    .ai-button {
        right: 20px;
        bottom: 20px;
    }
}

/*=============================
   WhatsApp Floating Button
=============================*/

.whatsapp-button {
    position: fixed;
    right: 30px;
    bottom: 30px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    z-index: 9999;
    transition: .3s;
}

    .whatsapp-button:hover {
        background: #1EBE5D;
        color: #fff;
        transform: translateY(-3px);
    }

    .whatsapp-button i {
        font-size: 28px;
    }

@media(max-width:768px) {

    .whatsapp-button {
        right: 15px;
        bottom: 15px;
        padding: 12px 18px;
    }

        .whatsapp-button span {
            display: none;
        }
}

/* AI Robot */
.ai-button {
    position: fixed;
    right: 120px; /* Move robot left */
    bottom: 30px;
    width: 70px;
    height: 70px;
    z-index: 9999;
    cursor: pointer;
}

/* WhatsApp */
.whatsapp-button {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    z-index: 9999;
}
