/* Контейнер віджета */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

/* Кнопка-аватарка */
#chat-button {
    width: 65px;
    height: 65px;
    border: 3px solid white;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

#chat-button:hover {
    transform: scale(1.05);
}

/* Підказка (Хмарка тексту) */
#chat-hint {
    cursor: pointer;
    transition: opacity 0.3s ease;
    animation: float 3s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

#chat-window {
    display: none;
    position: absolute;
    /* Міняємо bottom, щоб вікно було трохи вище кнопки */
    bottom: 75px;
    right: 0;
    width: 350px;
    /* Обмежуємо максимальну висоту, щоб він не вилазив за екран */
    max-height: 80vh;
    height: 500px;
    z-index: 1060;
    /* Додаємо плавний перехід */
    transition: all 0.3s ease;
}

/* Зробимо шапку чату фіксованою за висотою */
.card-header {
    flex-shrink: 0;
}

/* Область повідомлень повинна займати весь вільний простір */
#chat-messages {
    flex-grow: 1;
    overflow-y: auto;
}

.bot-msg {
    align-self: flex-start;
    max-width: 85%;
    background: white;
    border-radius: 15px 15px 15px 5px !important;
}

.user-msg {
    align-self: flex-end;
    max-width: 85%;
    background-color: #0d6efd !important;
    color: white;
    border-radius: 15px 15px 5px 15px !important;
}