/* --------------------------------------------- */
/* GLOBAL SETTINGS                               */
/* --------------------------------------------- */

* {
    font-family: "Oswald", sans-serif;
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: #1d1d1d !important;
    color: #fff !important;
    margin: 0;
    padding: 0;

}

#navbar_head,
.open-btn {
    color: #fff;
}

.open-btn:hover {
    color: #fff;
}

/* --------------------------------------------- */
/* CHAT LAYOUT                                   */
/* --------------------------------------------- */

.chat_section {
    display: flex;
    justify-content: center;
    align-items: center;
    background-position: center;
}

.main_div {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Chat scroll container */
#centered_div {
    width: 60vw;
    margin: 0 auto 20vh auto;
    /* center the block */
    display: flex;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 10px;
}

#history_spinner {
    margin-top: 50%;
    margin-left: 50%;
}

/* --------------------------------------------- */
/* CHAT BUBBLES                                  */
/* --------------------------------------------- */

#mytext_div {
    width: 60vw;
    display: flex;
}

#mychat {
    background-color: #444;
    margin-left: auto;
    margin-right: 5px;
    padding: 15px;
    border-radius: 20px;
    width: 30vw;
    color: #fff;
}

#botreply_div {
    padding: 1px;
}

.botreply {
    padding: 15px;
    font-family: "Oswald";
    margin-left: 0;
    margin-right: auto;
    /* Push bubble fully to the left */
    color: #fff;
    width: auto;
    /* Avoid fixed vw layout */
    max-width: 51vw;
    /* Use max-width instead */
    white-space: unset;
    word-wrap: break-word;
}

.centered_div .message {
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 70%;
    margin: 6px 0;
}

.centered_div .user {
    align-self: flex-end;
    background-color: #0078d4;
}

.centered_div .bot {
    align-self: flex-start;
    background-color: #e0e0e0;
    color: #000;
}

#chat_response {
    padding-bottom: 80px;
    padding-top: 70px;
}

#mychat {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* --------------------------------------------- */
/* INPUT BAR (ChatGPT Style)                     */
/* --------------------------------------------- */

.bottom_div {
    background-color: #1d1d1d;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Input container (ChatGPT-like) */
#input_div {
    width: 60vw;
    background-color: #2b2b2b;
    border-radius: 14px;
    padding: 6px 8px;

    display: flex;
    gap: 10px;
    align-items: flex-end;

    border: 1px solid #3d3d3d;
    box-shadow: 0 0 0 1px #3d3d3d;
}

/* Remove Bootstrap forced height */
.input-group textarea {
    height: auto;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Textarea – Perfect 1-line default & auto-expand */
#chat-message-input {
    flex: 1;

    min-height: 26px;
    max-height: 160px;
    height: auto;

    overflow-y: hidden;
    resize: none;

    background-color: transparent;
    color: #fff;
    font-size: 16px;

    padding: 6px 8px 4px 8px;   /* top slightly larger → centers text */
    line-height: 14px;          /* smaller = better centering */

    border: none;
    outline: none;
}

#chat-message-input::placeholder {
    color: #9a9a9a;
}

/* Send button */
#chat-message-submit {
    width: 36px;
    height: 36px;
    border-radius: 8px;

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

    background-color: #3a3a3a;
    color: #fff;
    border: none;
}

#chat-message-submit i {
    font-size: 18px;
}

/* --------------------------------------------- */
/* LOADER BUBBLES                                */
/* --------------------------------------------- */

#loader {
    display: flex;
    justify-content: space-between;
    width: 80px;
}

.bubble {
    width: 12px;
    height: 12px;
    background-color: #3498db;
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

.bubble:nth-child(2) {
    animation-delay: 0.2s;
}

.bubble:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-20px);
    }
}

#foottext {
    font-size: smaller;
}

/* --------------------------------------------- */
/* RESPONSIVE                                    */
/* --------------------------------------------- */

@media (max-width: 1200px) {

    #centered_div,
    #input_div,
    #mytext_div {
        width: 65vw;
    }
}

@media (max-width: 940px) {

    #centered_div,
    #input_div,
    #mytext_div {
        width: 80vw;
    }
}

@media (max-width: 600px) {

    #centered_div,
    #input_div,
    #mytext_div {
        width: 95vw !important;
    }

    #mychat {
        max-width: 90vw;
    }

    .botreply {
        max-width: 90vw !important;
    }
}