/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    height: 100vh; /* Full height for body */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

/* Container */
.container {
    width: 400px; /* Adjust width for chatbox */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: left; /* Align content to the left */
    border: 2px solid black; /* Border to match layout */
    display: flex;
    flex-direction: column; /* Stack content vertically */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Account info styling */
.account-info {
    margin-bottom: 20px;
}

.welcome h2 {
    margin-bottom: 5px;
    font-size: 16px;
}

/* User list for chat selection */
.user-list ul {
    list-style-type: none;
    padding: 0;
}

.user-list ul li {
    margin-bottom: 5px;
}

.user-list ul li a {
    text-decoration: none;
    color: #0084ff;
    font-weight: bold;
}

/* Chat box */
.chat-box {
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 400px; /* Set height for chat box */
}

.chat-box-header {
    background-color: #f9f9f9;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-box-body {
    flex-grow: 1; /* Take up remaining space */
    padding: 10px;
    background-color: #fff;
    overflow-y: auto; /* Make chat body scrollable */
}

.message {
    margin-bottom: 10px;
    padding: 5px;
    border-bottom: 1px solid #ccc;
}

/* Chat form */
.chat-form {
    display: flex;
    border-top: 1px solid #ccc;
    padding: 10px;
    background-color: #f9f9f9;
}

.chat-form input[type="text"] {
    flex-grow: 1; /* Input should take up full width */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    box-sizing: border-box;
}

.chat-form button {
    background-color: #0084ff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.chat-form button:hover {
    background-color: #0056b3;
}

/* Error messages */
.error {
    color: #ff0000;
    margin-bottom: 10px;
}

/* Стили только для формы авторизации */
.login-form {
    display: flex; /* Делаем форму Flex-контейнером */
    flex-direction: column; /* Элементы выстраиваются вертикально */
    gap: 15px; /* Добавляем вертикальный отступ между строками */
}

/* Стили для каждой группы полей (label + input) */
.login-form .form-group {
    display: flex; /* Делаем каждую строку Flex-контейнером */
    justify-content: space-between; /* Распределяем пространство между label и input */
    align-items: center; /* Выравниваем их по центру по вертикали */
}

/* Растягиваем поля ввода на всю оставшуюся ширину */
.login-form .form-group input {
    flex-grow: 1;
    margin-left: 10px; /* Добавляем отступ слева от input-поля */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Выравниваем кнопку по правому краю */
.login-form button {
    align-self: flex-end;
}

.login-form button {
    padding: 10px 25px; /* Увеличиваем внутренние отступы, чтобы кнопка была шире */
    background-color: #007bff; /* Меняем цвет на более яркий синий */
    color: #fff; /* Цвет текста делаем белым */
    border: none; /* Убираем стандартную рамку */
    border-radius: 5px; /* Закругляем углы кнопки */
    cursor: pointer; /* Показываем, что на кнопку можно нажать */
    font-size: 16px; /* Устанавливаем размер шрифта */
    align-self: center; /* Центрируем кнопку по горизонтали внутри формы */
    width: 100%; /* Делаем кнопку на всю ширину формы */
}

.login-form button:hover {
    background-color: #0056b3; /* Делаем цвет темнее при наведении, для визуальной обратной связи */
}