/*
 * Slovo Characters v2.41 (задача 4.9)
 * Персонаж-компаньон ученика: эмодзи + имя + приветствие.
 * Подключается вместе с assets/lms/slovo-characters.js.
 *
 * Классы:
 *   .slovo-characters-companion   — корневой контейнер (fixed, правый низ)
 *   .slovo-characters-avatar      — кнопка-эмодзи
 *   .slovo-characters-bubble      — приветствие
 *   .is-visible                   — состояние показа
 */

body.slovo-lms-body .slovo-characters-companion,
.slovo-characters-companion {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;

    display: flex;
    align-items: flex-end;
    gap: 10px;

    font-size: 14px;
    line-height: 1.35;
}

.slovo-characters-avatar {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
    line-height: 1;

    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    padding: 0;

    transition: transform 0.2s ease;
}

.slovo-characters-avatar:hover {
    transform: scale(1.06);
}

.slovo-characters-bubble {
    max-width: 240px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    color: #1f2933;

    opacity: 0;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.slovo-characters-bubble.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.slovo-characters-bubble strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.slovo-characters-bubble span {
    display: block;
    font-size: 13px;
    color: #52606d;
}

@media (max-width: 480px) {
    .slovo-characters-companion {
        right: 12px;
        bottom: 12px;
    }

    .slovo-characters-avatar {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .slovo-characters-bubble {
        max-width: 180px;
    }
}
