/* ===== VIDEO PLAYER ===== */

dialog.media-player{
    width:96vw;
    max-width:96vw;
    height:94vh;
    height:94dvh;
    max-height:94dvh;
    overflow:hidden;
}

dialog.media-player[open]{
    display:flex;
    flex-direction:column;
}

.media-player .modal-head{
    flex:0 0 auto;
    padding:12px 18px;
}

.media-player .modal-body{
    position:relative;
    flex:1;
    min-height:0;
    padding:0;
    overflow:hidden;
    background:#000;
}

.ytp-stage{
    position:relative;
    width:100%;
    height:100%;
    overflow:hidden;
    background:#000;
    user-select:none;
}

.ytp-stage video{
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    background:#000;
}

/* ---------- OVLÁDÁNÍ ---------- */

.ytp-controls{
    position:absolute;
    z-index:30;
    left:0;
    right:0;
    bottom:0;
    height:76px;

    opacity:0;
    visibility:hidden;

    transition:
        opacity .18s ease,
        visibility .18s ease;
}

.ytp-controls.ytp-visible,
.ytp-stage:hover .ytp-controls{
    opacity:1;
    visibility:visible;
}

.ytp-gradient{
    position:absolute;
    z-index:0;
    left:0;
    right:0;
    bottom:0;
    height:130px;

    background:linear-gradient(
        to bottom,
        transparent,
        rgba(0,0,0,.08) 25%,
        rgba(0,0,0,.72) 100%
    );

    pointer-events:none;
}

/* ---------- TIMELINE ---------- */

.ytp-progress-container{
    position:absolute;
    z-index:3;

    left:16px;
    right:16px;
    top:3px;

    height:14px;

    display:flex;
    align-items:center;
}

.ytp-progress{
    --buffered:0%;
    --value:0;

    appearance:none;
    -webkit-appearance:none;

    width:100%;
    height:4px;

    margin:0;
    padding:0;

    border:0;
    outline:0;

    cursor:pointer;

    background:
        linear-gradient(
            to right,
            #ff0033 0%,
            #ff0033 calc(var(--value) * 1%),
            rgba(255,255,255,.65) calc(var(--value) * 1%),
            rgba(255,255,255,.65) var(--buffered),
            rgba(255,255,255,.30) var(--buffered),
            rgba(255,255,255,.30) 100%
        );
}

.ytp-progress::-webkit-slider-runnable-track{
    height:4px;
    background:transparent;
}

.ytp-progress::-webkit-slider-thumb{
    appearance:none;
    -webkit-appearance:none;

    width:14px;
    height:14px;

    margin-top:-5px;

    border:0;
    border-radius:50%;

    background:#ff0033;

    opacity:0;
}

.ytp-progress-container:hover .ytp-progress{
    height:5px;
}

.ytp-progress-container:hover
.ytp-progress::-webkit-slider-thumb{
    opacity:1;
}

.ytp-progress::-moz-range-track{
    height:4px;
    background:transparent;
}

.ytp-progress::-moz-range-thumb{
    width:14px;
    height:14px;

    border:0;
    border-radius:50%;

    background:#ff0033;
}

/* ---------- SPODNÍ ŘÁDEK ---------- */

.ytp-bottom{
    position:absolute;
    z-index:4;

    left:16px;
    right:16px;
    bottom:7px;

    height:48px;

    display:flex;
    align-items:center;
    justify-content:space-between;
}

.ytp-left,
.ytp-right{
    position:static;

    display:flex;
    align-items:center;

    height:48px;

    gap:5px;
}

.ytp-button{
    position:relative;

    display:flex;
    align-items:center;
    justify-content:center;

    width:42px;
    min-width:42px;
    height:42px;

    margin:0;
    padding:0;

    border:0 !important;
    border-radius:50% !important;

    background:rgba(18,18,18,.82) !important;
    color:#fff !important;

    box-shadow:none !important;

    text-decoration:none !important;

    cursor:pointer;

    transition:
        background .12s ease,
        transform .08s ease;
}

.ytp-button:hover{
    background:rgba(50,50,50,.94) !important;
}

.ytp-button:active{
    transform:scale(.92);
}

.ytp-button svg,
.ytp-svg svg{
    display:block;

    width:22px;
    height:22px;

    fill:#fff;

    pointer-events:none;
}

.ytp-svg{
    display:flex;
    align-items:center;
    justify-content:center;
}

/* ---------- ±10 ---------- */

.ytp-skip{
    position:relative;
}

.ytp-skip-arrow{
    font-size:27px;
}

.ytp-skip-number,
.ytp-ten{
    position:absolute;

    left:50%;
    top:50%;

    transform:translate(-50%,-44%);

    color:#fff;

    font-size:7px;
    font-weight:700;

    pointer-events:none;
}

/* ---------- HLASITOST ---------- */

.ytp-volume-box{
    display:flex;
    align-items:center;

    height:42px;
}

.ytp-volume-slider-wrap{
    display:flex;
    align-items:center;

    width:0;

    overflow:hidden;
    opacity:0;

    transition:
        width .18s ease,
        opacity .18s ease;
}

.ytp-volume-box:hover .ytp-volume-slider-wrap{
    width:90px;
    opacity:1;
}

.ytp-volume-slider{
    appearance:none;
    -webkit-appearance:none;

    width:78px;
    height:4px;

    margin:0 8px 0 0;
    padding:0;

    border:0;

    background:rgba(255,255,255,.55);

    cursor:pointer;
}

.ytp-volume-slider::-webkit-slider-thumb{
    appearance:none;
    -webkit-appearance:none;

    width:12px;
    height:12px;

    border:0;
    border-radius:50%;

    background:#fff;
}

.ytp-volume-slider::-moz-range-thumb{
    width:12px;
    height:12px;

    border:0;
    border-radius:50%;

    background:#fff;
}

/* ---------- ČAS ---------- */

.ytp-time,
.ytp-time-pill{
    display:flex;
    align-items:center;

    height:38px;

    margin-left:3px;
    padding:0 13px;

    gap:4px;

    border-radius:20px;

    background:rgba(18,18,18,.82);

    color:#fff;

    font-family:Arial,sans-serif;
    font-size:13px;
    font-weight:500;
    font-variant-numeric:tabular-nums;

    white-space:nowrap;
}

.ytp-time-divider{
    opacity:.8;
}

/* ---------- SETTINGS ---------- */

.ytp-settings-button.ytp-active{
    transform:rotate(30deg);
}

.ytp-menu{
    position:absolute;
    z-index:60;

    right:16px;
    bottom:68px;

    width:350px;
    max-height:70vh;

    overflow:hidden;

    border:1px solid rgba(255,255,255,.10);
    border-radius:12px;

    background:rgba(28,28,28,.96);

    color:#fff;

    box-shadow:
        0 4px 12px rgba(0,0,0,.30),
        0 8px 30px rgba(0,0,0,.35);

    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);

    font-family:Arial,sans-serif;
}

.ytp-menu[hidden],
.ytp-menu-page[hidden]{
    display:none !important;
}

.ytp-menu-page{
    padding:8px 0;
}

.ytp-menu-row,
.ytp-menu-choice,
.ytp-menu-header{
    width:100%;
    min-height:52px;

    margin:0;
    padding:0 16px;

    display:flex;
    align-items:center;

    border:0 !important;
    border-radius:0 !important;

    background:transparent !important;

    color:#fff !important;

    box-shadow:none !important;

    font-family:inherit;
    font-size:14px;

    text-align:left;

    cursor:pointer;
}

.ytp-menu-row{
    justify-content:space-between;
}

.ytp-menu-row:hover,
.ytp-menu-choice:hover,
.ytp-menu-header:hover{
    background:rgba(255,255,255,.10) !important;
}

.ytp-menu-row-left,
.ytp-menu-row-right{
    display:flex;
    align-items:center;
}

.ytp-menu-row-left{
    gap:16px;
}

.ytp-menu-row-right{
    gap:9px;
    color:#d8d8d8;
}

.ytp-menu-icon{
    width:25px;

    display:flex;
    justify-content:center;

    font-size:20px;
}

.ytp-chevron{
    font-size:25px;
    line-height:1;
}

.ytp-menu-header{
    gap:15px;

    border-bottom:
        1px solid rgba(255,255,255,.10) !important;
}

.ytp-menu-header > span{
    font-size:27px;
}

.ytp-menu-header strong{
    font-size:15px;
    font-weight:500;
}

.ytp-menu-choice{
    gap:14px;
}

.ytp-choice-check{
    width:20px;
    flex:0 0 20px;

    text-align:center;

    font-size:17px;
}

.ytp-menu-choice small{
    margin-left:5px;

    color:#aaa;

    font-size:12px;
}

/* ---------- LOADING ---------- */

.ytp-spinner{
    position:absolute;
    z-index:20;

    left:50%;
    top:50%;

    transform:translate(-50%,-50%);

    pointer-events:none;
}

.ytp-spinner[hidden]{
    display:none;
}

.ytp-spinner span{
    display:block;

    width:44px;
    height:44px;

    border:
        4px solid rgba(255,255,255,.30);

    border-top-color:#fff;
    border-radius:50%;

    animation:ytp-spin .7s linear infinite;
}

@keyframes ytp-spin{
    to{
        transform:rotate(360deg);
    }
}

.ytp-status{
    position:absolute;
    z-index:40;

    left:50%;
    bottom:95px;

    transform:translateX(-50%);

    padding:7px 11px;

    border-radius:5px;

    background:rgba(0,0,0,.72);

    color:#fff;

    font-size:12px;

    pointer-events:none;
}

.ytp-status:empty{
    display:none;
}

/* ---------- FULLSCREEN ---------- */

.ytp-stage:fullscreen{
    width:100vw;
    height:100vh;

    background:#000;
}

.ytp-stage:fullscreen video{
    width:100vw;
    height:100vh;
}

/* ---------- MOBIL ---------- */

@media(max-width:700px){

    dialog.media-player{
        width:100vw;
        max-width:100vw;

        height:100vh;
        height:100dvh;

        max-height:100dvh;

        margin:0;

        border-radius:0;
    }

    .ytp-skip{
        display:none;
    }

    .ytp-menu{
        right:8px;

        width:min(
            350px,
            calc(100vw - 16px)
        );
    }

    .ytp-time,
    .ytp-time-pill{
        padding:0 9px;

        font-size:11px;
    }
}
