/* Импорт шрифта Poppins всех начертаний */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* Сброс стандартных стилей браузера */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin; /* Тонкий скроллбар */
    scrollbar-color: #ff4444 #f1f1f1; /* Цвет ползунка и трека */
}

img[src$=".svg"] {
    vertical-align: middle;  /* Выравнивает иконку по центру */
    line-height: 1;  /* Убирает лишнее пространство от line-height */
}

::-webkit-scrollbar {
    width: 8px; /* Ширина скроллбара */
    height: 8px; /* Высота для горизонтальных скроллбаров */
}

::-webkit-scrollbar-track {
    background: #f1f1f1; /* Цвет фона трека */
    border-radius: 10px; /* Скругленные углы трека */
}

::-webkit-scrollbar-thumb {
    background: #ff4444; /* Цвет ползунка, соответствует вашему hover в .chat-box */
    border-radius: 10px; /* Скругленные углы ползунка */
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #e03333; /* Более темный оттенок при наведении */
}

/* Основные стили для body */
body {
    background-color: #f5f5f5;
    color: #333;
    font-family: "Poppins", sans-serif;
}

/* Стили навигационной панели */
.navbar {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 0;
    left: 0;
    margin-top: 7px;
}

.navbar a img {
    width: 24px;
    height: 24px;
}

.navbar-link {
    padding: 10px;
    background-color: white;
    border-radius: 14px;
    margin: 7px 14px;
    transition: 0.3s ease;
}

.navbar-link:hover {
    background-color: #fc2f2f;
    transform: rotate(20deg);
}

.active {
    background-color: #ff4444;
}

/* Основной контент */
.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Стили для приветственного текста */
.greeting-text {
    font-size: 40px;
    font-weight: 200;
    margin-left: 14px;
}

/* Контейнер чата */
.chat-container {
    height: 100vh;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Приветственный блок */
.greeting {
    text-align: center;
    padding: 20px 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 200px;
}

/* Контейнер сообщений */
.messages-container {
  margin-top: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    padding-bottom: 200px; /* Отступ для поля ввода */
}

/* Общие стили для сообщений */
.message {
    max-width: 70%;
    border-radius: 14px;
    margin: 4px 0;
}

/* Стили сообщений пользователя */
.user-message {
    background-color: #ff4444;
    color: white;
    padding: 16px;
    align-self: flex-end;
}

/* Стили сообщений бота */
.bot-message {
    background-color: white;
    color: #333;
    padding: 16px;
    align-self: flex-start;
}

/* Стили для изображений в сообщениях */
.message img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

/* Поле ввода сообщения */
.chat-box {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 700px;
    width: 100%;
    background-color: white;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease;
}

.chat-box:hover {
    box-shadow: 0 4px 20px #ff4444;
}

/* Hover effect for the chat box */
.chat-box:hover {
    box-shadow: 0 4px 20px #ff4444;
}

/* Custom Scrollbar for WebKit browsers (Chrome, Safari, Edge) */
.chat-box::-webkit-scrollbar {
    width: 8px; /* Slim scrollbar width */
}

/* Текстовое поле */
.chat-input {
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    border: none;
    outline: none;
    resize: none;
    width: 100%;
    max-width: 100%;
    height: 65px;
}

/* Контейнер кнопок управления */
.chat-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between; /* Оставляем только кнопку отправки */
}

/* Стили кнопки отправки */
.send-btn {
    background-color: #ff4444;
    border: none;
    padding: 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.3s ease;
}

.send-btn:hover {
    background-color: #f5f5f5;
}

/* Стили для кнопки загрузки (upload) */
.upload-btn, .search-btn {
    background-color: #f5f5f5;
    border: none;
    padding: 8px;
    border-radius: 14px;
    transition: 0.3s ease;
}

.upload-btn:hover, .search-btn:hover {
    background-color: #f5f5f5;
}

/* Адаптивная верстка */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }

    .navbar-link {
        margin: 7px 7px;
    }

    .greeting-text {
        font-size: 24px;
        margin-left: 10px;
    }

    .chat-container {
        padding: 14px;
    }

    .chat-box {
        bottom: 10px;
        width: calc(100% - 20px);
    }

    .message {
        max-width: 85%;
    }
}