/**
 * VivaCity — Vídeo Flutuante
 * O player original não é clonado nem movido no DOM.
 */
:root {
    --vfv-width: 360px;
    --vfv-gap: 20px;
    --vfv-info-height: 68px;
    --vfv-bottom-offset: 0px;
}

.vfv-space {
    display: block;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}

.vfv-sentinel {
    display: block;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.vfv-floating-media {
    position: fixed !important;
    z-index: 2147482500 !important;
    width: var(--vfv-width) !important;
    height: calc(var(--vfv-width) * .5625) !important;
    max-width: calc(100vw - (var(--vfv-gap) * 2)) !important;
    max-height: calc(100vh - 130px) !important;
    margin: 0 !important;
    padding: 0 !important;
    bottom: calc(var(--vfv-bottom-offset) + var(--vfv-gap) + var(--vfv-info-height)) !important;
    background: #050505 !important;
    border: 0 !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: 0 14px 42px rgba(0,0,0,.35) !important;
    overflow: hidden !important;
    transform: translateZ(0);
    animation: vfv-enter .24s ease-out both;
}

body.vfv-position-right .vfv-floating-media { right: var(--vfv-gap) !important; left: auto !important; }
body.vfv-position-left .vfv-floating-media  { left: var(--vfv-gap) !important; right: auto !important; }

.vfv-floating-media:is(iframe, video, object, embed) {
    display: block !important;
    object-fit: contain !important;
}

.vfv-floating-media iframe,
.vfv-floating-media video,
.vfv-floating-media object,
.vfv-floating-media embed,
.vfv-floating-media > iframe,
.vfv-floating-media > video {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    background: #050505 !important;
}

.vfv-floating-ui {
    position: fixed;
    z-index: 2147482501;
    display: none;
    width: var(--vfv-width);
    min-height: var(--vfv-info-height);
    bottom: calc(var(--vfv-bottom-offset) + var(--vfv-gap));
    background: #090909;
    color: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 14px 42px rgba(0,0,0,.35);
    overflow: visible;
    font-family: inherit;
}

body.vfv-position-right .vfv-floating-ui { right: var(--vfv-gap); left: auto; }
body.vfv-position-left .vfv-floating-ui  { left: var(--vfv-gap); right: auto; }
body.vfv-active .vfv-floating-ui { display: flex; }

.vfv-return {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    min-width: 0;
    width: 100%;
    padding: 9px 48px 10px 13px;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.vfv-return:focus-visible,
.vfv-close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

.vfv-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: .01em;
}

.vfv-subtitle {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: rgba(255,255,255,.72);
    font-size: 10px;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.vfv-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 2;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
    font-family: Arial, sans-serif;
    transition: background .18s ease, transform .18s ease;
}

.vfv-close:hover { background: rgba(255,255,255,.26); }
.vfv-close:active { transform: translateY(-50%) scale(.94); }

@keyframes vfv-enter {
    from { opacity: 0; transform: translateY(18px) translateZ(0); }
    to   { opacity: 1; transform: translateY(0) translateZ(0); }
}

@media (max-width: 1024px) {
    :root {
        --vfv-mobile-media-width: 148px;
        --vfv-mobile-height: 84px;
        --vfv-gap: 0px;
        --vfv-info-height: 0px;
    }

    body.vfv-active {
        padding-bottom: calc(var(--vfv-mobile-height) + var(--vfv-bottom-offset) + env(safe-area-inset-bottom)) !important;
    }

    .vfv-floating-media,
    body.vfv-position-right .vfv-floating-media,
    body.vfv-position-left .vfv-floating-media {
        left: 0 !important;
        right: auto !important;
        bottom: calc(var(--vfv-bottom-offset) + env(safe-area-inset-bottom)) !important;
        width: var(--vfv-mobile-media-width) !important;
        height: var(--vfv-mobile-height) !important;
        max-width: var(--vfv-mobile-media-width) !important;
        max-height: var(--vfv-mobile-height) !important;
        border-radius: 0 !important;
        box-shadow: 0 -8px 24px rgba(0,0,0,.24) !important;
        animation-name: vfv-enter-mobile;
    }

    .vfv-floating-ui,
    body.vfv-position-right .vfv-floating-ui,
    body.vfv-position-left .vfv-floating-ui {
        left: var(--vfv-mobile-media-width);
        right: 0;
        bottom: calc(var(--vfv-bottom-offset) + env(safe-area-inset-bottom));
        width: auto;
        min-height: var(--vfv-mobile-height);
        height: var(--vfv-mobile-height);
        border-radius: 0;
        box-shadow: 0 -8px 24px rgba(0,0,0,.24);
        background: #090909;
        align-items: stretch;
    }

    .vfv-return {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 9px 46px 9px 12px;
    }

    .vfv-title {
        -webkit-line-clamp: 2;
        font-size: 13px;
        line-height: 1.2;
    }

    .vfv-subtitle {
        margin-top: 4px;
        font-size: 9px;
    }

    .vfv-close {
        top: -12px;
        right: 8px;
        transform: none;
        width: 27px;
        height: 27px;
        border: 2px solid #fff;
        background: #5b5b5b;
        box-shadow: 0 2px 7px rgba(0,0,0,.28);
        font-size: 18px;
    }

    .vfv-close:active { transform: scale(.94); }

    @keyframes vfv-enter-mobile {
        from { opacity: 0; transform: translateY(100%) translateZ(0); }
        to   { opacity: 1; transform: translateY(0) translateZ(0); }
    }
}

@media (max-width: 390px) {
    :root { --vfv-mobile-media-width: 132px; }
    .vfv-title { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .vfv-floating-media { animation: none !important; }
    .vfv-close { transition: none !important; }
}
