/* public/css/main.css */
body, input, textarea, button {
    font-family: 'Arial', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-color: #f0f0f0;
    overflow: hidden;
}

#chat-window {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 500px;
    overflow-y: auto;
    padding: 24px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin-bottom: 16px;

    @media screen and (min-width: 640px) {
        max-width: 600px;
        height: 700px;
    }

    @media screen and (min-height: 800px) {
        height: 700px;
    }
}

.row {
    flex-direction: row;
}

.row-reverse {
    flex-direction: row-reverse;
}

.message, .my-message {
    padding: 10px 14px;
    border-radius: 10px;
    word-break: break-word;
    max-width: 75%;
    font-size: 12px;

    @media screen and (min-width: 640px) {
        font-size: 16px;
    }

}

.message {
    background-color: #f3f0f9;
    align-self: flex-start;
}

.my-message {
    background-color: #e6f4ea;
    align-self: flex-end;
}

.sender {
    font-weight: bold;
    color: #28a745;
    margin-bottom: 4px;
}

.my-message .sender {
    color: #007bff;
}

.input-area {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    font-size: 12px;

    @media screen and (min-width: 640px) {
        max-width: 600px;
        font-size: 16px;
        height: auto;
    }


}

.timestamp {
    font-size: 0.75em;
    color: #888;
    margin: 0 8px;
    white-space: nowrap;
}

textarea {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    resize: none;
}

#answerButton, #questionButton {
    padding: 2px 6px;
    background-color: #63c5aa;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;

    height: 40px;

    font-size: 12px;

    @media screen and (min-width: 640px) {
        font-size: 16px;
        padding: 10px 16px;
        height: auto;
    }


    flex-shrink: 0;
}

button:hover {
    background-color: #4cb89a;
}

.error-message {
    color: red;
    margin-bottom: 10px;
    text-align: center;
}

.feedback-link {
    margin-top: 12px;
    font-size: 0.9em;
    color: #555;
    text-align: center;
}

.feedback-link a {
    color: #5e7999;
    text-decoration: none;
    font-weight: 500;
}

.feedback-link a:hover {
    text-decoration: underline;
}

.home-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: transform .1s ease, box-shadow .2s ease;

    @media screen and (min-width: 640px) {
        font-size: 20px;
    }
}

.header {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 16px;
    text-align: center;
}

#chat-header {
    font-size: 1.2em;

    margin-block-start: 0;
    margin-block-end: 0;

    @media screen and (min-width: 640px) {
        font-size: 1.5em;
        margin-block-start: 0.83em;
        margin-block-end: 0.83em;
    }
}

#contentInput {
    height: 42px;
    font-size: 12px;

    @media screen and (min-width: 640px) {
        height: auto;
        font-size: 14px;
    }
}
