/* =========================
   CHATBOT BUTTON
========================= */

#chatbot-toggle {
    position: fixed;

    right: 30px;
    bottom: 30px;

    width: 64px;
    height: 64px;

    border-radius: 50%;

    background: #0f172a;
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 1.5rem;

    cursor: pointer;

    box-shadow:
        0 8px 24px rgba(0,0,0,.15);

    z-index: 9999;

    transition: .25s;
}

#chatbot-toggle:hover {
    transform: translateY(-3px);
}

/* =========================
   CHAT WINDOW
========================= */

#chatbot-window {
    position: fixed;

    right: 30px;
    bottom: 110px;

    width: 400px;
    height: 500px;

    background: white;

    border-radius: 20px;

    border: 1px solid #e2e8f0;

    box-shadow:
        0 20px 50px rgba(0,0,0,.15);

    display: none;

    flex-direction: column;

    overflow: hidden;

    z-index: 9998;
}

#chatbot-window.active {
    display: flex;
}

/* =========================
   HEADER
========================= */

.chat-header {
    height: 60px;

    background: #0f172a;
    color: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    font-weight: 600;
}

#chat-close {
    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5e7eb;
    border-radius: 50%;

    background: #fff;
    color: #111;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

#chat-close:hover {
    background: #f3f4f6;
}

/* =========================
   MESSAGES
========================= */

#chat-messages {
    flex: 1;

    overflow-y: auto;

    padding: 20px;

    background: #f8fafc;
}

.bot-message,
.user-message {
    max-width: 80%;

    padding: 12px 16px;

    border-radius: 16px;

    margin-bottom: 12px;

    line-height: 1.6;
}

.bot-message {
    background: white;

    border: 1px solid #e2e8f0;
}

.user-message {
    background: #0f172a;
    color: white;

    margin-left: auto;
}

/* =========================
   INPUT
========================= */

.chat-input {
    display: flex;

    border-top: 1px solid #e2e8f0;

    background: white;
}

.chat-input input {
    flex: 1;

    border: none;
    outline: none;

    padding: 16px;
}

.chat-input button {

    width: 90px;

    background: #0f172a;

    color: white;

    border: none;

    cursor: pointer;

    transition: .2s;
}

.chat-input button:hover {
    opacity: .9;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    #chatbot-window {
        width: calc(100vw - 30px);

        height: 70vh;

        right: 15px;
        bottom: 90px;
    }

}