.video-play-page {
    #video-loader {
        z-index: 999;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-left: -24px;
        margin-top: -24px;
    }

    @media screen and (max-width: 767px) {
        #performerListAfterVideo,
        #recommendedAfterVideo,
        #similarAfterVideo,
        #performerClips,
        #videoComments {
            scroll-margin-top: var(--mobile-header-default-height);
        }
    }
    
    .video-info {
        .tags {
            margin: 0 0 var(--space-sm);

            a,
            span {
                width: auto;
                height: 26px;
                border-radius: var(--space-xs);
                border-width: 1px;
                border-style: solid;
                font-size: var(--font-size-small);
                line-height: 18px;
                display: flex;
                align-items: center;
                white-space: nowrap;
                transition: border-color 0.2s;

                &:not(.tags-toggle) {
                    padding: 0 7px;
                }

                &.tags-toggle {
                    aspect-ratio: 1/1;
                    justify-content: center;
                }
            }

            span {
                @media (hover: hover) {
                    cursor: pointer;
                }
            }
        }
    }

    .video-share-dropdown {
        padding: 0;
        border-radius: 6px;
        border: 1px solid var(--color-grey-semi-dark);

        @media only screen and (min-width: 768px) {
            transform: translate3d(-50%, -26px, 0px) !important;
            inset: auto auto 0 50% !important;
        }

        @media only screen and (max-width: 576px) {
            width: calc(100vw - 30px);
            inset: 0 auto auto 0 !important;
            transform: translate3d(var(--left-position), 26px, 0px) !important;
        }
    }

    .video-share {
        position: relative;
        width: 344px;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;

        @media only screen and (max-width: 576px) {
            width: 100%;
        }

        .video-share-wrap {
            width: 100%;
            height: 32px;
            display: grid;
            grid-template-columns: 1fr auto 32px;
            gap: 8px;

            .btn {
                height: 100%;
            }

            .video-share-link {
                width: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                border-radius: 4px;
                background-color: var(--color-grey-light);
                overflow: hidden;

                input {
                    width: 100%;
                    height: 100%;
                    padding: 4px 8px;
                    border: none;
                    background-color: transparent;
                    text-overflow: ellipsis;
                    outline: none;
                    color: var(--color-grey-medium);
                    font-size: 14px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: 16px;
                    border-radius: inherit;
                }
            }

            .video-share-tg {
                display: flex;
                align-items: center;
                justify-content: center;
                background-color: transparent;
                border: 1px solid var(--main-color);
                border-radius: 4px;
                transition: background-color 0.15s ease-in-out;

                @media (hover: hover) {
                    &:hover {
                        background-color: var(--main-color);

                        path {
                            fill: var(--color-grey-semi-dark);
                        }
                    }
                }

                &:visited {
                    border: 1px solid var(--main-color);
                }

                svg {
                    width: 17px;
                    height: 14px;

                    path {
                        transition: fill 0.15s ease-in-out;
                    }
                }
            }
        }

        .video-share-timecode {
            position: relative;
            width: 100%;

            input {
                position: absolute;
                top: 50%;
                left: 0;
                transform: translateY(-50%);
                opacity: 0;
                visibility: hidden;
                pointer-events: none;

                &:checked + label .video-share-timecode-checkbox {
                    background-color: var(--main-color);
                    border-color: var(--main-color);

                    svg {
                        opacity: 1;
                    }
                }
            }

            label {
                position: relative;
                display: inline-flex;
                align-items: center;
                color: var(--color-grey-semi-light);
                font-size: 12px;
                font-style: normal;
                font-weight: 400;
                line-height: 16px;
                padding: 0;
                user-select: none;

                @media (hover: hover) {
                    cursor: pointer;
                }

                .video-share-timecode-checkbox {
                    width: 16px;
                    height: 16px;
                    border-radius: 4px;
                    overflow: hidden;
                    border: 1px var(--color-grey-semi-dark) solid;
                    background-color: transparent;
                    padding: 0;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-right: 8px;
                    transition:
                        background-color 0.15s ease-in-out,
                        border-color 0.15s ease-in-out;

                    svg {
                        width: 9px;
                        height: 7px;
                        opacity: 0;
                        transition: opacity 0.15s ease-in-out;
                    }
                }
            }
        }
    }

    .video-markup {
        display: flex;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 12px;
        font-size: var(--font-size-small);

        a {
            color: var(--main-color);
        }

        b {
            padding: 0 var(--space-sm);
            color: var(--color-grey-medium);
        }

        .video-markup-toggle {
            &:hover {
                text-decoration: none;
            }
        }

        .video-markup-toggle-open {
            display: none;
        }

        .video-markup-content {
            width: 100%;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            gap: 6px;
            align-items: flex-start;
            color: var(--color-grey-semi-light);

            a {
                color: var(--main-color);

                &.timecode {
                    display: inline-block;
                    position: relative;
                }
            }

            span.timecode-dash {
                display: inline-block;
                transform: translateY(-1px);
            }

            span.timecode-icon {
                color: var(--color-grey-medium);
                font-size: 10px;
                margin-left: 3px;
            }

            .video-markup-el:nth-child(n+6) {
                display: none;
            }
        }

        .video-markup-el {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            width: 100%;

            nobr {
                text-overflow: ellipsis;
                overflow: hidden;
            }
        }

        &.video-markup-open {
            .video-markup-content .video-markup-el:nth-child(n+6) {
                display: flex;
            }

            .video-markup-toggle-open {
                display: inline;
            }

            .video-markup-toggle-closed {
                display: none;
            }
        }
    }

    .video-markup-preview {
        display: block;
        position: absolute;
        bottom: 24px;
        width: 157px;
        height: 88px;
        border-radius: 5px;
        background-size: contain;
        z-index: 1000;
    }

    .kinks-hint-holder {
        display: none;
        position: absolute;
        max-height: 252px;
        padding: 0;
        overflow: hidden;
        background-color: var(--color-grey-dark);
        z-index: 1000;

        &.mirror {
            position: absolute;
            display: block !important;
            z-index: -1000;
            opacity: 0;

            span {
                display: inline;
            }
        }

        .kinks-hint-holder__wrapper {
            max-height: 252px;
            padding: var(--space-sm) 0;
            overflow-y: scroll;
            overflow-x: hidden;
            scrollbar-color: var(--color-grey-medium) var(--color-grey-dark);
            background-color: var(--color-grey-dark);

            &::-webkit-scrollbar-track {
                background: var(--color-grey-dark);
            }

            &::-webkit-scrollbar-thumb {
                background: var(--color-grey-medium);
            }

            &::-webkit-scrollbar-thumb:hover {
                background: var(--color-grey-medium);
            }
        }

        .kinks-hint__list {
            .dropdown-item {
                padding: var(--space-sm) 20px;
                cursor: pointer;

                &.active {
                    background-color: var(--color-grey-medium-dark) !important;
                }
            }
        }

        &.keynav-active .kinks-hint__list .dropdown-item:hover:not(.active) {
            background-color: transparent !important;
        }
    }

    .perf {
        width: 100%;
        display: grid;
        grid-template-columns: 56px 1fr;
        gap: var(--space-sm);

        .perf-avatar {
            position: relative;
            width: 100%;
            height: auto;
            aspect-ratio: 1/1;
            border-radius: 50%;
            overflow: hidden;
            background-color: var(--color-black);
            background-repeat: no-repeat;
            background-size: cover;
            background-position: center;

            &.perf-avatar--sprite {
                background-size: auto 400%;
                background-position: 0 0;
            }
        }

        .perf-info {
            width: 100%;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            gap: var(--space-xs);
        }
        
        .perf-name-wrapper {
            display: flex;
            align-items: center;
            gap: var(--space-xs);
        }

        .perf-name {
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: var(--font-size-regular);
            font-weight: 700;
            line-height: var(--line-height-regular);
        }

        .perf-subscribe {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .perf-followers {
            display: flex;
            align-items: center;
            gap: var(--space-xxs);
            font-size: var(--font-size-small);
            line-height: var(--line-height-small);

            & svg {
                min-width: 14px;
                width: 14px;
                height: 14px;
            }
        }

        @media only screen and (min-width: 576px) {
            .perf-followers {
                color: var(--color-grey-semi-light);
            }
        }

        @media only screen and (max-width: 767px) {
            padding-right: 113px;
        }

        @media only screen and (max-width: 575px) {
            .perf-followers {
                color: var(--color-grey-medium);
            }
        }
    }

    .video-summary {
        position: relative;
        width: 100%;
        display: grid;
        align-items: flex-start;

        @media only screen and (min-width: 768px) {
            grid-template-columns: 1fr auto;
            gap: var(--space-lg) var(--space-4xl);
            margin: 0 0 var(--space-lg);
        }

        @media only screen and (max-width: 767px) {
            grid-template-columns: 1fr;
            gap: var(--space-xl) var(--space-4xl);
            margin: 0 0 var(--space-xl);
        }
    }

    .video-details {
        position: relative;
        width: 100%;
        border-radius: var(--space-xs);
        border: 1px solid var(--color-grey-semi-dark);
        background-color: var(--color-grey-dark);
        padding: var(--space-lg);
        margin: 0 0 var(--space-3xl);

        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    .video-tools {
        width: 100%;
        display: flex;
        gap: var(--space-sm);
        flex-wrap: wrap;

        .base-dropdown {
            display: inline-flex;

            &.download-button {
                .download-menu {
                    margin-top: calc(-1 * var(--bs-dropdown-padding-y) - 1px) !important;
                }

                .quality-select {
                    display: flex;

                    span {
                        flex-grow: 1;

                        &:last-of-type {
                            justify-content: right;
                            padding-left: 30px;
                            color: var(--color-grey-medium);
                            display: flex;
                        }
                    }
                }
            }

        }

        .video-tools-reactions {
            display: flex;
        }

        .btn {
            white-space: nowrap !important;
            display: flex;
            align-items: center;
            gap: var(--space-xs);

            &.like {
                border-top-right-radius: 0;
                border-bottom-right-radius: 0;
            }

            &.dislike {
                border-top-left-radius: 0;
                border-bottom-left-radius: 0;
                margin-left: -1px;
            }
        }

        .base-dropdown {
            display: inline-flex !important;
        }

        @media only screen and (min-width: 768px) {
            align-items: flex-start;
            justify-content: flex-end;
        }

        @media only screen and (max-width: 767px) {
            .video-tools-reactions {
                position: absolute;
                top: 0;
                right: 0;
            }
        }
    }

    .video-descr {
        color: var(--color-grey-semi-light);
        font-size: var(--font-size-small);
        font-weight: 400;
        line-height: var(--line-height-small);
        margin: 0;
    }

    .video-anchors {
        position: relative;
        width: 100%;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--space-xs);
        margin: 0 0 var(--space-3xl);

        &:not(:has(.btn:not(.d-none))) {
            display: none;
        }

        .btn {
            max-width: 270px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }

    .plyr__controls *:focus-visible {
        outline: none !important;
    }

    .plyr__controls input[type=range]:focus-visible::-webkit-slider-runnable-track {
        outline: none !important;
    }

    .plyr__controls input[type=range]:focus-visible::-moz-range-track {
        outline: none !important;
    }

    .plyr__controls input[type=range]:focus-visible::-ms-track {
        outline: none !important;
    }
}

.question-prompt-container.over-playlist .question-prompt {
    bottom: var(--playlist-prompt-bottom, 100px);
    z-index: 998;
}

@media only screen and (max-width: 575px) {
    .question-prompt-container.over-playlist .question-prompt {
        left: 0;
        right: 0;
        border-radius: var(--space-sm) var(--space-sm) 0 0;
        margin-bottom: -14px;
        font-size: var(--font-size-secondary);
        text-align: left;
        padding-left: 16px;
        padding-right: 16px;

        br {
            display: none !important;
        }

        .question-prompt__answer:first-of-type {
            margin-left: 0;
        }
    }

    .video-play-page:has(.question-prompt:not(.hidden)) .playlist:not(.is-open) {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}

.playlist {
    position: fixed;
    z-index: 999;
    min-height: var(--space-4xl);
    background-color: var(--color-grey-dark);

    .playlist-header {
        position: relative;
        z-index: 2;
        width: 100%;
        min-height: var(--space-4xl);
        background-color: inherit;
        border-radius: inherit;
        border: 1px solid var(--color-grey-semi-dark);

        display: flex;
        flex-direction: column;

        .playlist-header-noti {
            width: 100%;
            min-height: inherit;
            padding: var(--space-sm) var(--space-lg);
            border-bottom: 1px solid #333;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0 var(--space-xs);

            font-size: var(--font-size-secondary);
            font-weight: 400;
            line-height: var(--line-height-secondary);

            &.hidden {
                display: none;
            }

            a {
                font-weight: 700;
            }
        }

        .playlist-header-content {
            width: 100%;
            min-height: inherit;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: var(--space-sm) var(--space-lg);
        }

        .playlist-header-title {
            font-size: var(--font-size-secondary);
            font-weight: 700;
            line-height: var(--line-height-secondary);
            color: var(--main-color);
            cursor: pointer;
            user-select: none;

            display: flex;
            align-items: center;
            gap: var(--space-sm);
            width: 180px;

            svg {
                width: 16px;
                height: 16px;
                flex: 0 0 16px;
            }

            span {
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }

        .playlist-header-controls {
            display: flex;
            align-items: center;

            .playlist-nav {
                position: relative;
                height: 28px;
                width: 28px;
                padding: 0;
                background: transparent;
                border: none;
                color: var(--color-white);
                transition: color 0.1s ease 0s;

                i {
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    font-size: var(--font-size-small);
                }

                &:first-of-type {
                    transform: rotate(180deg);
                }

                &[data-disabled="true"] {
                    opacity: 0.3;
                    pointer-events: none;
                    cursor: default;
                }

                @media (hover: hover) {
                    cursor: pointer;
                    transition-duration: 0.3s;

                    &:hover {
                        color: var(--main-color);
                    }
                }

                &:active {
                    color: var(--main-color);
                }
            }
        }
    }

    .playlist-body {
        display: none;
        position: absolute;
        z-index: 1;
        left: 0;
        bottom: 0;
        width: 100%;
        background-color: inherit;
        border-radius: inherit;
        border: 1px solid #333;

        .playlist-body-close {
            @media only screen and (min-width: 576px) {
                display: none;
            }

            @media only screen and (max-width: 575px) {
                position: absolute;
                z-index: 2;
                top: 0;
                left: 50%;
                transform: translate(-50%, calc(-100% - 4px));
                width: 28px;
                height: 28px;
                display: block;
                border: none;
                background: transparent;
                padding: 0;

                & svg {
                    width: 100%;
                    height: 100%;
                }
            }
        }

        .playlist-body-scroll {
            position: relative;
            width: 100%;
            overflow-y: auto;
            overflow-x: hidden;
            overscroll-behavior: contain;
            min-height: 100px;
            padding: var(--space-lg) var(--space-lg) var(--space-5xl);
            scrollbar-color: var(--color-grey-semi-dark) var(--color-grey-dark);
            scrollbar-width: thin;
        }

        .playlist-skeleton-item {
            .playlist-skeleton-thumb {
                width: 100%;
                aspect-ratio: 16 / 9;
                border-radius: var(--space-xs);
            }

            .playlist-skeleton-title {
                margin-top: var(--space-lg);
                width: 50%;
                height: 24px;
                border-radius: var(--space-xs);
            }

            .playlist-skeleton-sub {
                margin-top: var(--space-xs);
                width: 75%;
                height: var(--line-height-small);
                border-radius: var(--space-xs);
            }

            .playlist-skeleton-shimer {
                animation: shimmer 2s infinite linear;
                background: linear-gradient(90deg, var(--color-grey-semi-dark) 44%, var(--color-grey-medium-dark) 50%, var(--color-grey-medium-dark) 51%, var(--color-grey-semi-dark) 57%);
                background-size: 300%;
                background-position-x: 100%;
            }
        }

        .playlist-retry {
            display: block;
            margin: 0 0 0 auto;
        }

        .video-thumb {
            margin: 0 0 var(--space-2xl);

            &:last-of-type {
                margin: 0;
            }

            .video-info-sub {
                flex-wrap: wrap;
            }

            .video-splash {
                background-size: 400% 400%;
                background-position: 0 -200%;

                &.one-shot {
                    background-size: 100%;
                    background-position: 0 0;
                }
            }

            .video-splash .message {
                display: none;
            }

            &.playlist-currently-playing .video-splash .message {
                display: flex;
                align-items: center;
                justify-content: center;
                position: absolute;
                z-index: 3;
                inset: 0;
                background-color: rgba(0, 0, 0, 0.8);
                text-align: center;
                color: var(--color-white);
                font-weight: 700;
                font-size: var(--font-size-title);
            }
        }
    }

    &.is-open .playlist-body {
        display: block;
    }

    .playlist-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 0;
    }

    @media only screen and (min-width: 576px) {
        width: 300px;
        right: var(--space-3xl);
        bottom: var(--space-3xl);
        border-radius: var(--space-xs);

        .playlist-body {
            .playlist-body-scroll {
                max-height: 540px;
            }
        }
    }

    @media only screen and (max-width: 575px) {
        width: 100%;
        left: 0;
        bottom: 0;
        border-radius: var(--space-sm) var(--space-sm) 0 0;

        &.is-open .playlist-overlay {
            display: block;
            background: rgba(0, 0, 0, 0.50);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        .playlist-body {
            .playlist-body-scroll {
                max-height: calc(100vh - var(--mobile-header-default-height) - var(--topscreen-info-height, 0px) - 180px);
            }
        }
    }

    @media only screen and (max-width: 992px) and (max-height: 450px) {
        .playlist-body {
            .playlist-body-scroll {
                max-height: 200px;
            }
        }
    }
}
