﻿
:root {
    --bg-white: #ffffff;
    --bg-light-gray: #f4f4f5;
    --text-black: #111111;
    --text-gray: #666666;
    --border-color: #eaeaea;
    --ict-btn-gradient-primary: linear-gradient(135deg, #070F52,#6389b3);
/*    --ict-btn-gradient-primary: #070F52;*/
}



.chat-bot {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1999;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 15px; 
    align-items: center;
}

.chat-bot-image {
    position: relative;

}
    .chat-bot-image img, .contact-image img, .contact-image svg {
        display: block;
        border-radius: 50%;
        animation: bounce2 2s ease infinite;
    }
    .chat-bot-image img {
        
        width: clamp(60px, 5vw, 50px);
        height: clamp(60px, 5vw, 50px);
       
    }
.contact-image img,.contact-image svg {
    width: clamp( 40px, 4.5vw, 45px);
    height: clamp(40px, 4.5vw, 45px);
}

@keyframes bounce2 {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

.chat-bot .tooltip-chatbot {
    visibility: hidden;
    position: absolute;
    z-index: 1999;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    width: max-content;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--text-black);
    color: var(--bg-white);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transition: all 0.3s ease;
}

.chat-bot:hover .tooltip-chatbot {
    visibility: visible;
    opacity: 1;
    right: 70px;
}

/* CHATBOT */
.chatbot {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1999;

    opacity: 0;
    pointer-events: none;
    transform-origin: bottom right; 
    transform: translateX(0px) translateY(-10px) scale(0.3);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

body.show-chatbot .chatbot {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) translateY(0) scale(1);
}


.chatbot header {
    padding: 16px 20px;
    background: var(--ict-btn-gradient-primary);
    color: var(--bg-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .chatbot header h2 {
        font-size: 1.2rem;
        font-weight: 600;
        margin: 0;
    }

    .chatbot header span.close-btn {
        cursor: pointer;
        font-size: 1.5rem;
        transition: opacity 0.2s;
        opacity: 0.8;
    }

        .chatbot header span.close-btn:hover {
            opacity: 1;
        }


.chatbot .chatbox {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-white);
    margin: 0;
}


.chatbot :where(.chatbox, textarea)::-webkit-scrollbar {
    width: 6px;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot :where(.chatbox, textarea)::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.chatbox .chat {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    list-style: none;
}

.chatbox .outgoing {
    justify-content: flex-end;
}

.chatbox .incoming {
    justify-content: flex-start;
}

    .chatbox .incoming span {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        border-radius: 50%;
        background: var(--bg-light-gray);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

        .chatbox .incoming span img {
            width: 20px;
            height: 20px;
        }

.chatbox .chat p {
    white-space: pre-wrap;
    padding: 12px 16px;
    max-width: 80%;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

.chatbox .incoming p {
    background: var(--bg-light-gray);
    color: var(--text-black);
    border-radius: 16px 16px 16px 4px;
}

.chatbox .outgoing p {
    background: var(--ict-btn-gradient-primary);
    color: var(--bg-white);
    border-radius: 16px 16px 4px 16px;
}

.chat-suggestions {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

    .chat-suggestions .suggestion-chip {
        padding: 8px 14px;
        border-radius: 20px;
        border: 1px solid var(--border-color);
        background: var(--bg-white);
        color: var(--text-gray);
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .chat-suggestions .suggestion-chip:hover {
            background: var(--bg-light-gray);
            color: var(--text-black);
            border-color: var(--text-black);
        }


.chatbot .chat-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.chat-input textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    height: 24px;
    max-height: 100px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-black);
    background: transparent;
}

    .chat-input textarea::placeholder {
        color: #999;
    }

.chat-input span {
    cursor: pointer;
    color: var(--text-black);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.chat-input textarea:valid ~ span {
    opacity: 1;
}

@media (max-width: 768px) {


    body.show-chatbot .chatbot {
        width: 90vw;
        height: 85%;
        max-height: 100vh;
        bottom: 5px;
        right: 5vw;

/*        transform: translateY(0) scale(1); */
    }

    .chatbot header {
/*        border-radius: 0;*/
        padding: 15px 20px;
    }
}
