/* ===========================
   SGenovix AI Chatbot
=========================== */

#chatbot {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    font-family: 'Segoe UI', sans-serif;
}

/* Floating Button */

#chat-toggle {

    width: 65px;
    height: 65px;

    border: none;
    border-radius: 50%;
    cursor: pointer;

    background: linear-gradient(135deg, #10B981, #059669);

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 18px 40px rgba(16, 185, 129, .35);

    transition: .35s;

}

#chat-toggle:hover {

    transform: scale(1.08);

    box-shadow: 0 22px 50px rgba(16, 185, 129, .45);

}

#chat-toggle svg {

    width: 28px;
    height: 28px;

}

/* ================= CHAT WINDOW ================= */

#chat-window {

    width: 380px;
    height: 600px;

    position: absolute;
    bottom: 85px;
    right: 0;

    background: #111111;

    border: 1px solid #2A2A2A;

    border-radius: 20px;

    overflow: hidden;

    display: none;

    flex-direction: column;

    box-shadow: 0 25px 70px rgba(0, 0, 0, .55);

    animation: popup .35s ease;

}

@keyframes popup {

    from {

        opacity: 0;
        transform: translateY(30px);

    }

    to {

        opacity: 1;
        transform: translateY(0);

    }

}

/* ================= HEADER ================= */

.chat-header {

    height: 75px;

    background: linear-gradient(135deg, #111111, #10B981);

    display: flex;

    align-items: center;

    padding: 15px;

    color: #fff;

    border-bottom: 1px solid #2A2A2A;

}

.chat-avatar {

    width: 48px;
    height: 48px;

    background: #1A1A1A;

    color: #10B981;

    border: 2px solid #10B981;

    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 24px;

    margin-right: 12px;

}

.chat-title {

    flex: 1;

}

.chat-title h3 {

    margin: 0;

    font-size: 18px;

    color: #fff;

}

.chat-title span {

    font-size: 12px;

    color: #CFCFCF;

}

#close-chat {

    border: none;

    background: none;

    color: #fff;

    font-size: 20px;

    cursor: pointer;

    transition: .3s;

}

#close-chat:hover {

    color: #10B981;

}

/* ================= MESSAGES ================= */

#chat-messages {

    flex: 1;

    padding: 20px;

    overflow-y: auto;

    background: #050505;

    display: flex;

    flex-direction: column;

    gap: 15px;

}

/* Bot Message */

.bot-message {

    background: #151515;

    color: #F3F4F6;

    padding: 12px 15px;

    border-radius: 15px;

    max-width: 85%;

    border: 1px solid #2A2A2A;

    box-shadow: 0 8px 20px rgba(0, 0, 0, .30);

    font-size: 14px;

    line-height: 1.7;

}

/* User Message */

.user-message {

    background: #10B981;

    color: #fff;

    padding: 12px 15px;

    border-radius: 15px;

    align-self: flex-end;

    max-width: 85%;

    box-shadow: 0 10px 25px rgba(16, 185, 129, .25);

    font-size: 14px;

    line-height: 1.7;

}

/* ================= INPUT ================= */

.chat-input {

    height: 70px;

    display: flex;

    align-items: center;

    padding: 10px;

    border-top: 1px solid #2A2A2A;

    background: #111111;

}

#user-input {

    flex: 1;

    padding: 12px;

    border-radius: 10px;

    border: 1px solid #2A2A2A;

    background: #1A1A1A;

    color: #F3F4F6;

    outline: none;

    font-size: 15px;

    transition: .3s;

}

#user-input::placeholder {

    color: #8B8B8B;

}

#user-input:focus {

    border-color: #10B981;

    box-shadow: 0 0 15px rgba(16, 185, 129, .20);

}

#send-message {

    width: 48px;
    height: 48px;

    margin-left: 10px;

    border: none;

    border-radius: 10px;

    cursor: pointer;

    background: #10B981;

    color: #fff;

    font-size: 18px;

    transition: .3s;

}

#send-message:hover {

    background: #059669;

    transform: scale(1.05);

}

/* ================= QUICK QUESTIONS ================= */

.quick-actions {

    padding: 10px;

    display: flex;

    gap: 8px;

    overflow-x: auto;

    background: #111111;

    border-top: 1px solid #2A2A2A;

}

.quick-actions button {

    padding: 8px 12px;

    border: none;

    border-radius: 30px;

    cursor: pointer;

    background: #1A1A1A;

    color: #10B981;

    border: 1px solid #2A2A2A;

    white-space: nowrap;

    font-size: 13px;

    transition: .3s;

}

.quick-actions button:hover {

    background: #10B981;

    color: #fff;

    border-color: #10B981;

}

/* ================= TYPING INDICATOR ================= */

#typing-indicator {

    display: none;

    padding: 10px 20px;

    background: #050505;

}

#typing-indicator span {

    display: inline-block;

    width: 8px;
    height: 8px;

    margin: 2px;

    border-radius: 50%;

    background: #10B981;

    animation: typing 1.2s infinite;

}

#typing-indicator span:nth-child(2) {

    animation-delay: .2s;

}

#typing-indicator span:nth-child(3) {

    animation-delay: .4s;

}

@keyframes typing {

    0%,
    80%,
    100% {

        transform: scale(0);

    }

    40% {

        transform: scale(1);

    }

}

/* ================= SCROLLBAR ================= */

#chat-messages::-webkit-scrollbar {

    width: 7px;

}

#chat-messages::-webkit-scrollbar-track {

    background: #111111;

}

#chat-messages::-webkit-scrollbar-thumb {

    background: #10B981;

    border-radius: 20px;

}

#chat-messages::-webkit-scrollbar-thumb:hover {

    background: #059669;

}

/* ================= MOBILE ================= */

@media(max-width:600px) {

    #chat-window {

        width: 95vw;

        height: 80vh;

        right: -10px;

        bottom: 90px;

    }

    #chat-toggle {

        width: 60px;

        height: 60px;

    }

}