/* Кнопка открытия чата */
.chat-opener {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #007bff;
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: sans-serif;
     z-index: 999;
    
}

/* Окно чата */
.chat-window {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    bottom: 90px;
   
    left: 20px;
    width: 350px;
    max-width: 90%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    flex-direction: column;
    overflow: hidden;
    font-family: sans-serif;
    z-index: 999;
}

.chat-header {
    background: #007bff;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chat-body {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.client {
    background: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-message.admin {
    background: #e9e9eb;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}


.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.chat-footer input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px;
    outline: none;
}

.chat-footer button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}
.chat-pre-chat {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    flex-grow: 1; /* Растягиваем блок на всю доступную высоту */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-pre-chat p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.chat-pre-chat input {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box; /* Чтобы padding не влиял на ширину */
}

.chat-pre-chat .chat-start-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.chat-pre-chat .chat-start-btn:hover {
    background-color: #0056b3;
}