/* Контейнер виджета */
#video-widget-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2999;
    font-family: Arial, sans-serif;
}

/* Видео-пузырь */
.video-bubble {
    width: 120px;
    height: 213.33px; /* или просто 213px */
    aspect-ratio: 9/16; /* современный способ */
    border-radius: 2%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    background: #000;
}

/* Состояние при клике (развернутое) */
.video-bubble.expanded {
    width: 280px;
    height: 450px;
    border-radius: 15px;
    cursor: default;
}

.video-bubble video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Кнопки управления */
.widget-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    gap: 8px;
    flex-direction: column;
    display: flex;
}

/* Стили для маленького видео */
.video-bubble:not(.expanded) .widget-controls {
    top: 4px;
    right: 4px;
}

.video-bubble:not(.expanded) .widget-controls .close-widget {
    background: rgb(245 245 245);
    font-size: 18px;
}

.video-bubble:not(.expanded) .ctrl-btn {
    color: #000000;
    width: 18px;
    height: 18px;
}

/* В маленьком видео скрываем ВСЕ кнопки, КРОМЕ закрытия */
.widget-controls .toggle-mute {
    display: none; /* Скрываем кнопку звука в маленьком видео */
}

/* В развернутом видео показываем все кнопки */
.video-bubble.expanded .widget-controls .toggle-mute {
    display: flex; /* Показываем кнопку звука в развернутом видео */
}

.ctrl-btn {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Кнопка действия внизу */
.action-btn {
    display: none;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff0019; /* Темно-синий как на скрине */
    color: white;
    border: none;
    padding: 10px 10px;
    border-radius: 10px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: bold;
    width: 90%;
}

.video-bubble.expanded .action-btn {
    display: block;
}

/* Анимация пульсации */
@keyframes pulse-animation {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: translateX(-50%) scale(1.05); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.action-btn.pulse {
    animation: pulse-animation 2s infinite;
    background: #e30613 !important; /* Можно сменить цвет на красный при пульсации */
}

.widget-controls .close-widget {
    background: rgba(255, 0, 0, 0.7);
    font-size: 24px;
}
