/* /home/admin/web/apps/mindalai_app/static/css/homepage.css */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh + 10px); /* Висота з урахуванням navbar */
    padding: 0.1rem;
    position: relative;
    overflow: hidden;
}

#chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.5rem;
    max-height: calc(100vh - 150px); /* Висота з урахуванням navbar і поля вводу */
    max-width: 800px; /* Фіксована ширина */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px; /* Відступ для поля вводу */
}

.user-message {
    background-color: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    margin: 0.5rem 0 0.5rem -0.5rem; /* Компенсуємо правий padding контейнера */
    max-width: calc(90% + 0.5rem); /* Додаємо padding до ширини */
    word-wrap: break-word;
    display: block;  /* Замість float */
    margin-left: auto;  /* Вирівнювання вправо */
    margin-right: 0; /* Притискаємо до правого краю робочої зони */
    clear: both;  /* Очищення для уникнення перекриття */
}

.chat-input-area {
    position: fixed; /* Фіксуємо до низу екрану */
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 800px; /* Фіксована ширина */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10; /* Щоб не перекривалось стрічкою */
}

.chat-input-area.centered {
    position: fixed; /* Змінено з absolute */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 2rem);
    max-width: 800px;
}

#chat-input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px; /* Збільшений шрифт */
    outline: none;
}

#chat-input:focus {
    border-color: #007bff;
}

#send-button {
    padding: 0.75rem 1.05rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#send-button:hover {
    background-color: #0056b3;
}

/* Глобальні responsive-стилі */
@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        width: 100%;
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 12px;
    }

    .mobile-hidden {
        display: none;
    }
}