/* Floating Video Widget PRO – Frontend Styles */

.fvw-floating-widget {
    position: fixed;
    z-index: 999999;
    cursor: pointer;
    overflow: hidden;
    background: #000;
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1), height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.fvw-floating-widget.fvw-left  { bottom: 25px; left: 25px; }
.fvw-floating-widget.fvw-right { bottom: 25px; right: 25px; }

/* Small state */
.fvw-small-state { position: relative; }
.fvw-small-state video {
    width: 100%; height: auto;
    display: block; object-fit: cover;
    pointer-events: none;
}

/* Close button – защита от градиента Elementor */
#fvw-widget .fvw-close-btn {
    position: absolute; top: 8px; right: 8px;
    width: 26px; height: 26px;
    border: none !important;
    border-radius: 50% !important;
    font-size: 16px !important;
    line-height: 26px !important;
    text-align: center;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    background-color: rgba(0,0,0,0.6) !important;
    background-image: none !important;
    color: #ffffff !important;
    transition: background-color 0.2s, color 0.2s;
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    text-decoration: none !important;
}

#fvw-widget .fvw-close-btn:hover {
    background-color: rgba(0,0,0,0.8) !important;
    background-image: none !important;
    color: #ffffff !important;
}

#fvw-widget .fvw-close-btn:focus,
#fvw-widget .fvw-close-btn:active,
#fvw-widget .fvw-close-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background-color: rgba(0,0,0,0.6) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: transparent !important;
    text-decoration: none !important;
    transform: none !important;
}

/* Expanded state */
.fvw-expanded-state {
    display: none; flex-direction: column;
    width: 100%;
}
.fvw-video-wrapper { position: relative; width: 100%; height: 100%; }
.fvw-expanded-state video {
    width: 100%; height: 100%;
    display: block; object-fit: cover;
}

/* Overlay controls – защита от градиента Elementor */
.fvw-overlay-controls {
    position: absolute; top: 12px; right: 12px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 20;
}

#fvw-widget .fvw-collapse-btn,
#fvw-widget .fvw-mute-btn,
#fvw-widget .fvw-restart-btn {
    background: rgba(0,0,0,0.6) !important;
    background-image: none !important;
    border: none !important;
    border-radius: 40px !important;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    overflow: visible;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    font-size: 15px !important;
    line-height: 1;
    color: #ffffff !important;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    text-decoration: none !important;
}

#fvw-widget .fvw-collapse-btn:hover,
#fvw-widget .fvw-mute-btn:hover,
#fvw-widget .fvw-restart-btn:hover {
    background: rgba(0,0,0,0.8) !important;
    background-image: none !important;
    color: #ffffff !important;
}

#fvw-widget .fvw-collapse-btn:focus,
#fvw-widget .fvw-mute-btn:focus,
#fvw-widget .fvw-restart-btn:focus,
#fvw-widget .fvw-collapse-btn:active,
#fvw-widget .fvw-mute-btn:active,
#fvw-widget .fvw-restart-btn:active,
#fvw-widget .fvw-collapse-btn:focus-visible,
#fvw-widget .fvw-mute-btn:focus-visible,
#fvw-widget .fvw-restart-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: rgba(0,0,0,0.6) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: transparent !important;
    text-decoration: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Description overlay */
.fvw-description-overlay {
    position: absolute;
    bottom: 90px;
    left: 15px; right: 15px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    z-index: 10;
}

/* CTA overlay */
.fvw-cta-overlay {
    position: absolute;
    bottom: 20px;
    left: 15px; right: 15px;
    text-align: center;
    z-index: 10;
}

/* CTA button – защита от градиента Elementor */
#fvw-widget .fvw-cta-button {
    display: inline-block;
    padding: 14px 36px;
    font-size: 16.5px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    background: #ff5722 !important;
    background-image: none !important;
    color: #fff;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

#fvw-widget .fvw-cta-button:hover {
    background: #e64a19 !important;
    background-image: none !important;
}

/* Expanded class */
.fvw-floating-widget.expanded {
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.fvw-floating-widget.expanded .fvw-small-state { display: none; }
.fvw-floating-widget.expanded .fvw-expanded-state {
    display: flex;
    height: 100%;
}

/* Mobile */
@media (max-width: 768px) {
    .fvw-floating-widget { bottom: 15px; right: 15px; left: auto; }
    .fvw-overlay-controls { top: 8px; right: 8px; gap: 6px; }

    #fvw-widget .fvw-collapse-btn,
    #fvw-widget .fvw-mute-btn,
    #fvw-widget .fvw-restart-btn {
        width: 26px;
        height: 26px;
        font-size: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .fvw-description-overlay { bottom: 80px; left: 10px; right: 10px; }
    .fvw-cta-overlay { bottom: 15px; left: 10px; right: 10px; }
    .fvw-cta-button { padding: 12px 24px; font-size: 14px; max-width: 100%; }
}