/* Плавающая кнопка чата */
.chat-button {
    width: 114px;
    height: 40px;
    background-size: cover;
    position: fixed;
    bottom: 20px;
    right: 120px;
    cursor: pointer;
    z-index: 1000;
}

/* Основные стили окна чата */
.chat-window {
    width: 350px;
    height: 500px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    position: fixed;
    bottom: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

/* Скрытое состояние окна */
.chat-window.hidden {
    display: none;
}

/* Заголовок окна чата */
.chat-header {
    display: flex;                 /* Включаем Flexbox */
    justify-content: space-between; /* Пространство распределяется между элементами */
    align-items: center;           /* Горизонтальное центрирование */
    padding: 10px;
    background-color: #007bff;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-size: 16px;
    font-weight: bold;
}


button,
#closeChatButton {
    all: unset; /* Сбросить все унаследованные стили */
    appearance: none; /* Убрать браузерные эффекты */
    outline: none; /* Убрать выделение */
    box-sizing: border-box; /* Стандартная модель размеров */
}

/* Настройка для кнопки закрытия */
.closeChatButton {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
    padding: 0;
    margin-left: auto; /* Справа вверху */
    user-select: none;
    transition: color 0.2s ease-in-out;
}

#closeChatButton:hover {
    color: black;
}


/* Сообщения */
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Форма отправки сообщений */
#userInput {
    padding: 10px;
    margin: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Кнопка отправки */
button {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

/* Разделитель между сообщениями */
.message-spacer {
    height: 10px;
    margin: 5px 0;
}

.hidden {
    display: none;
}

#chatTextLink {
    color: #054893;
    text-decoration: underline;
    cursor: pointer;
}

#chatTextLink:hover {
    color: #81a1ab;
}