/* ==============================================
   Helper Mascot – стили (v1.2.0)
   ============================================== */

.hm-mascot,
.hm-bubble {
    position: fixed;
    z-index: 99999;
    cursor: pointer;
    box-sizing: border-box;
}

/* --- Маскот --- */
.hm-mascot {
    left: -220px;
    top: 50%;
    width: 320px;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    transition: left 0.5s ease-out, opacity 0.4s ease, transform 0.5s ease;
    border-radius: 50%;
    /*box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);*/
}

.hm-mascot--visible {
    left: -60px;
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Вариант с эмодзи */
.hm-mascot--emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    line-height: 1;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* --- Плашка --- */
.hm-bubble {
    left: 200px;
    top: 50%;
    background: linear-gradient(135deg, #0d6efd 0%, #2575fc 100%);
    color: #fff;
    padding: 16px 24px;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-50%) translateX(-40px);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                background 0.3s ease,
                box-shadow 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hm-bubble--visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

/* Иконка в плашке */
.hm-bubble-icon {
    font-size: 1.2em;
    animation: hm-icon-point 1.5s infinite;
}

/* Стрелочка у плашки */
.hm-bubble::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #2575fc;
}

/* --- Анимации привлечения внимания --- */
@keyframes hm-bounce {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-65%) scale(1.08);
    }
}

.hm-mascot--bounce {
    animation: hm-bounce 0.5s ease 3;
}

@keyframes hm-pulse {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 45px rgba(37, 117, 252, 0.8);
    }
}

.hm-bubble--pulse {
    animation: hm-pulse 1.2s ease 2;
}

@keyframes hm-icon-point {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

/* --- Hover-эффекты --- */
.hm-mascot:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.hm-bubble:hover {
    background: linear-gradient(135deg, #7b2ff7 0%, #3b82f6 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) translateX(5px);
}

/* --- Анимация скрытия --- */
.hm-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hm-mascot.hm-hidden {
    left: -220px;
    transform: translateY(-50%) scale(0.8);
}

.hm-bubble.hm-hidden {
    transform: translateY(-50%) translateX(-40px);
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
    .hm-mascot {
        width: 140px;
        height: 140px;
        left: -150px;
    }
    .hm-mascot--visible {
        left: 10px;
    }
    .hm-bubble {
        left: 160px;
        padding: 12px 18px;
        font-size: 14px;
        border-radius: 20px;
    }
    .hm-mascot--emoji {
        font-size: 80px;
    }
}

@media (max-width: 480px) {
    .hm-mascot {
        width: 110px;
        height: 110px;
        left: -120px;
        top: auto;
        bottom: 10px;
        transform: none;
    }
    .hm-mascot--visible {
        left: 10px;
        bottom: 10px;
        transform: none;
    }
    .hm-bubble {
        left: 130px;
        top: auto;
        bottom: 40px;
        transform: translateX(-30px);
        padding: 10px 14px;
        font-size: 13px;
        white-space: normal;
        max-width: 200px;
    }
    .hm-bubble--visible {
        transform: translateX(0);
    }
    .hm-bubble::after {
        left: auto;
        right: -8px;
        border-right: none;
        border-left: 10px solid #2575fc;
    }
    .hm-mascot--bounce {
        animation: none;
    }
    .hm-bubble--pulse {
        animation: none;
    }
}
