:root{
    --dd-public-header-height:var(--dd-watch-topbar,52px);
}

[data-dd-watch-player-home][hidden]{
    display:none !important;
}

@media (max-width:780px){
    .dd-watch-layout > .dd-watch-main{
        display:contents;
    }

    [data-dd-watch-sticky-mobile]{
        position:sticky;
        top:var(--dd-public-header-height);
        z-index:295;
        width:100%;
        background:#000;
        isolation:isolate;
    }

    html:has(:fullscreen) [data-dd-watch-sticky-mobile]{
        position:static;
        top:auto;
        z-index:auto;
    }

    [data-dd-persistent-player-shell]{
        display:none !important;
    }
}

@media (min-width:781px){
    [data-dd-watch-sticky-mobile]{
        position:relative;
    }

    [data-dd-persistent-player-shell]{
        position:fixed;
        right:16px;
        bottom:16px;
        width:min(360px,calc(100vw - 32px));
        min-width:320px;
        max-width:min(520px,calc(100vw - 16px));
        z-index:1250;
        display:flex;
        flex-direction:column;
        background:#0f0f0f;
        border-radius:12px;
        overflow:hidden;
        box-shadow:0 10px 32px rgba(0,0,0,.48);
        isolation:isolate;
        will-change:left,top,width;
    }

    [data-dd-persistent-player-shell][hidden]{
        display:none !important;
    }

    [data-dd-persistent-player-slot]{
        order:1;
        position:relative;
        width:100%;
        aspect-ratio:16/9;
        overflow:hidden;
        background:#000;
    }

    [data-dd-persistent-player-slot] > [data-dd-watch-player-shell]{
        width:100% !important;
        height:100% !important;
        min-height:0 !important;
        max-height:none !important;
        margin:0 !important;
        aspect-ratio:16/9 !important;
        border-radius:0 !important;
        overflow:hidden !important;
        background:#000 !important;
    }

    [data-dd-persistent-player-slot] > [data-dd-watch-player-shell]::before{
        display:none !important;
    }

    [data-dd-persistent-player-slot] [data-dd-watch-player-stage]{
        width:100% !important;
        height:100% !important;
        min-height:0 !important;
        max-height:none !important;
        aspect-ratio:auto !important;
        border-radius:0 !important;
        box-shadow:none !important;
        background:#000 !important;
    }

    [data-dd-persistent-player-slot] [data-dd-watch-player-stage]:fullscreen,
    [data-dd-persistent-player-slot] [data-dd-watch-player-stage]:-webkit-full-screen{
        width:100vw !important;
        height:100vh !important;
        aspect-ratio:auto !important;
    }

    [data-dd-persistent-player-slot] .dd-watch-ambient{
        display:none !important;
    }

    [data-dd-persistent-player-slot] [data-dd-watch-video]{
        width:100% !important;
        height:100% !important;
        object-fit:contain !important;
        background:#000 !important;
    }

    .dd-persistent-mini-bar{
        order:2;
        min-height:52px;
        display:flex;
        align-items:center;
        gap:8px;
        padding:8px 42px 9px 10px;
        background:#0f0f0f;
        color:#fff;
        font:500 12px/1.25 Arial,sans-serif;
        cursor:grab;
        user-select:none;
        touch-action:none;
    }

    .dd-persistent-mini-bar:active{
        cursor:grabbing;
    }

    .dd-persistent-mini-copy{
        flex:1 1 auto;
        min-width:0;
        display:flex;
        flex-direction:column;
        gap:2px;
    }

    .dd-persistent-mini-copy strong,
    .dd-persistent-mini-copy span{
        display:block;
        overflow:hidden;
        white-space:nowrap;
        text-overflow:ellipsis;
    }

    .dd-persistent-mini-copy strong{
        font-size:13px;
        font-weight:600;
        color:#f1f1f1;
    }

    .dd-persistent-mini-copy span{
        color:#aaa;
        font-size:11px;
    }

    .dd-persistent-mini-button{
        position:absolute;
        top:8px;
        width:28px;
        height:28px;
        z-index:30;
        border:0;
        border-radius:50%;
        display:grid;
        place-items:center;
        background:rgba(0,0,0,.68);
        color:#fff;
        cursor:pointer;
        font:600 18px/1 Arial,sans-serif;
        backdrop-filter:blur(4px);
    }

    [data-dd-mini-expand]{
        right:42px;
    }

    [data-dd-mini-close]{
        right:8px;
    }

    .dd-persistent-mini-button:hover{
        background:rgba(40,40,40,.92);
    }

    .dd-persistent-mini-resize-handle{
        position:absolute;
        left:0;
        top:0;
        width:20px;
        height:20px;
        z-index:35;
        cursor:nesw-resize;
        touch-action:none;
        opacity:0;
    }

    .dd-persistent-mini-resize-handle::before{
        display:none;
    }
}

@media (min-width:781px){
    [data-dd-persistent-player-slot][data-dd-watch-player-stage]{
        --dd-a7d-selector-contract:1;
    }
}
