/* chatStyles.css */
@import url('variables.css');

body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

#chat-container {
    position: fixed;
    bottom: 10vh;
    right: 0;
    max-width: 100vw;
    max-height: 90vh;
    border: 1px solid #ccc;
    background-color: var(--background-orange);
    z-index: 1000; /* Ensure the chat window is above other content */
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Adds a shadow for better visibility */;
}

#chat-window {
    flex-grow: 1;
    margin: 1.5rem 1rem 1rem 1rem;
    overflow-y: auto;
    display: flex;
    max-height: 80%;
    flex-direction: column;
    background-color: var(--background-med3);
    border-radius: 5px;
}

#messages {
    list-style: none;
}

.message {
    margin: 10px 0 0 10px;
    padding: 5px;
    border-radius: 5px;
    width: fit-content;
    max-width: 70%;
    color: var(--text-med-contrast)
}

.user-message {
    align-content: flex-end;
    background-color: #dcf8c6;

}

.system-message {
    align-self: flex-start;
    background-color: #f0f0f0;
}

#user-input-container {
    display: flex;
    width: auto;
    padding: 0 .75rem .5rem .5rem;

}

#user-input {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 15px;
    margin-right: 10px;
}

#submit-btn {
    border: none;
    background-color: var(--background-med2);
    color: white;
    padding: 1rem 0 1rem .5rem;
    cursor: pointer;
    width: 3.5vw;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: .25;
}

#submit-chat p {
    font-size: 1rem;
}

#submit-chat:hover {
    background-color: #0056b3;
}

#close-chat {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: .5rem;
    color: white;
}

@media screen and (min-width: 1024px) {
    body, html {
        margin: 0;
        padding: 0;
        font-family: Arial, sans-serif;
    }

    #chat-container {
        position: fixed;
        bottom: 20vh; /* Adjust based on chat button size */
        right: 10px;
        width: 35vw; /* Adjust size as needed */
        height: 55vh; /* Adjust size as needed */
        border: 1px solid #ccc;
        background-color: var(--background-dark);
        z-index: 1000; /* Ensure the chat window is above other content */
        display: flex;
        flex-direction: column;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Adds a shadow for better visibility */;
    }

    #chat-window {
        flex-grow: 1;
        margin: 1.5rem 1rem 1rem 1rem;
        overflow-y: auto;
        display: flex;
        max-height: 80%;
        flex-direction: column;
        background-color: var(--background-light2);
        border-radius: 5px;
    }

    #messages {
        list-style: none;
    }

    .message {
        margin: 10px 0 0 10px;
        padding: 5px;
        border-radius: 5px;
        width: fit-content;
        max-width: 70%;
        color: var(--text-med-contrast)
    }

    .user-message {
        align-content: flex-end;
        background-color: #dcf8c6;

    }

    .system-message {
        align-self: flex-start;
        background-color: #f0f0f0;
    }

    #user-input-container {
        display: flex;
        width: auto;
        padding: 0 .75rem .5rem .5rem;

    }

    #user-input {
        flex: 1;
        border: none;
        padding: 10px;
        border-radius: 15px;
        margin-right: 10px;
    }

    #submit-btn {
        border: none;
        background-color: #007bff;
        color: white;
        padding: 1rem 2rem 1rem .5rem;
        cursor: pointer;
        width: 5vw;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: .25;
    }

    #submit-chat p {
        font-size: 1rem;
    }

    #submit-chat:hover {
        background-color: #0056b3;
    }

    #close-chat {
        position: absolute;
        top: 0;
        right: 0;
        padding: 10px;
        cursor: pointer;
        font-weight: bold;
        font-size: .5rem;
    }
}