/* Продающее Живое Облако — Стили виджета */

/* Сброс и базовые стили */
.live-cloud {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    opacity: 0;
    font-family: 'PT Sans', 'Roboto Condensed', 'Fira Sans', Arial, sans-serif;
}

.live-cloud__inner {
    position: relative;
    pointer-events: auto;
}

/* Форма облака — аморфная, живая */
.live-cloud__cloud {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
                0 0 40px rgba(100, 150, 200, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: liveCloudBreathe 8s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.live-cloud__cloud:hover {
    transform: scale(1.02);
}

/* Анимация «дыхания» — пульсация и деформация */
@keyframes liveCloudBreathe {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: scale(1);
    }
    25% {
        border-radius: 50% 50% 60% 40% / 50% 60% 50% 50%;
        transform: scale(1.005);
    }
    50% {
        border-radius: 60% 40% 50% 50% / 60% 40% 50% 60%;
        transform: scale(1);
    }
    75% {
        border-radius: 45% 55% 65% 35% / 55% 45% 55% 45%;
        transform: scale(1.005);
    }
}

/* Текст фразы */
.live-cloud__text {
    color: #3d4f5f;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    font-style: italic;
    max-width: 280px;
    letter-spacing: 0.2px;
    font-weight: 400;
}

/* Кнопка закрытия */
.live-cloud__close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: #8a9bae;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 1;
}

.live-cloud__close:hover {
    background: rgba(255, 255, 255, 1);
    color: #3d4f5f;
    transform: scale(1.1);
}

/* === Десктопная версия === */
.live-cloud--desktop {
    bottom: 30px;
    left: 30px;
    max-width: 320px;
}

.live-cloud--desktop .live-cloud__cloud {
    max-width: 320px;
}

/* === Мобильная версия === */
.live-cloud--mobile {
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 340px;
}

.live-cloud--mobile .live-cloud__cloud {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px;
}

.live-cloud--mobile .live-cloud__text {
    font-size: 13px;
    max-width: 100%;
}

.live-cloud--mobile .live-cloud__close {
    top: -10px;
    right: -5px;
    width: 28px;
    height: 28px;
    font-size: 18px;
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 380px) {
    .live-cloud--mobile {
        width: 92%;
    }
    
    .live-cloud--mobile .live-cloud__text {
        font-size: 12px;
    }
}

/* Предпочтение Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .live-cloud__cloud {
        animation: none;
    }
    
    .live-cloud__close {
        transition: none;
    }
}
