/* main video */
.youtube-block {
    padding: 1rem 0 3rem;
    position: relative;
}

.youtube-block .video-default {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    z-index: 1;
}

.youtube-block .video-default>.video-thumbnail,
.youtube-block .video-default>.video-frame,
.youtube-block .video-default iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.youtube-block .video-default>.video-thumbnail {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
}

@-webkit-keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes lds-dual-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.youtube-block .video-default .video-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7rem;
    height: auto;
    aspect-ratio: 1;
    font-size: 0;
    border: 0;
    border-radius: 50%;
    outline: 0;
    box-shadow: none;
    opacity: 0;
    padding: 0;
    -webkit-transition: opacity .3s ease, transform .3s ease;
    transition: opacity .3s ease, transform .3s ease;
    -webkit-transform: translate(-50%, -50%) scale(0);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    cursor: pointer;
    z-index: 1;
}

.youtube-block .video-default .video-button:before,
.youtube-block .video-default .video-button:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 53%;
    transform: translateY(-50%) translateX(-50%);
    width: 24px;
    height: 28px;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    -webkit-transition: opacity .3s ease;
    transition: opacity .3s ease;
}

.youtube-block .video-default .video-button:before {
    background-image: url(../../images/yt-play.svg);
}

.youtube-block .video-default .video-button:after {
    opacity: 0;
    background-image: url(../../images/yt-play_hvr.svg);
}

.youtube-block .video-default.is-init .video-button {
    opacity: 1;
    -webkit-transform: translate(-50%, -50%) scale(1);
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.youtube-block .video-default.is-init .video-button:hover:after {
    opacity: 1;
}

.youtube-block .video-default .video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.youtube-block .video-default .video-loader>.loader-spinner {
    display: block;
    width: 8rem;
    height: 8rem;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-block .video-default .video-loader>.loader-spinner:after {
    content: '';
    display: block;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    border: 0.5rem solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: lds-dual-ring 1.2s linear infinite;
}

.youtube-block .video-default>.video-frame {
    z-index: 1;
    border-radius: 1rem;
}

@media (max-width:1199px) {
    .youtube-block .video-default .video-loader>.loader-spinner {
        width: 5rem;
        height: 5rem;
    }

    .youtube-block .video-default .video-loader>.loader-spinner:after {
        content: '';
        display: block;
        width: 1.875rem;
        height: 1.875rem;
        border-radius: 50%;
        border: 0.3125rem solid #fff;
        border-color: #fff transparent #fff transparent;
        animation: lds-dual-ring 1.2s linear infinite;
    }

    .youtube-block .video-default .video-button {
        width: 5rem;
    }

    .youtube-block .video-default .video-button:before,
    .youtube-block .video-default .video-button:after {
        width: 2.0625rem;
        height: 2.375rem;
    }
}

/* main video */

/* clips */



.youtube-block .videos-wrapper {
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
    padding: 0;
    border-radius: 0.625rem;
}

.youtube-block .videos-wrapper .videos-title {
    margin: 1rem 2rem 0 2rem;
    width: 100%;
    flex-basis: 100%;
    flex-shrink: 0;
}

.youtube-block .videos-wrapper .videos-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    padding: 0 1.5rem 1.5rem 1.5rem;
    -webkit-scrollbar: always;
    scrollbar-gutter: stable;
    position: relative;
}

.youtube-block .videos-wrapper .videos-row::-webkit-scrollbar {
    height: 8px;
}

.youtube-block .videos-wrapper .videos-row::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.youtube-block .videos-wrapper .videos-row::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.youtube-block .videos-wrapper .videos-row::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.youtube-block .videos-wrapper .videos-title * {
    margin: 0;
    font-weight: 600;
}

.youtube-block .videos-wrapper .video-single {
    width: 240px;
    flex-shrink: 0;
    cursor: pointer;
}
@media only screen and (max-width: 599px) {
    .youtube-block .videos-wrapper .video-single {
        width: 180px;
    }
}

.youtube-block .videos-wrapper h4 {
    font-weight: 500;
    margin: 0.5rem 0;
}

.youtube-block .videos-wrapper .video-image {
    border-radius: 0.625rem;
    overflow: hidden;
    line-height: 0.8;
    position: relative;
}

.youtube-block .videos-wrapper .video-timestamp {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    background-color: #333;
    border-radius: 1rem;
    padding: 0.5rem 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background .15s ease;
}

.youtube-block .videos-wrapper .video-timestamp svg {
    max-width: 0.5rem;
    height: auto;
}

/* Add error styling for video loading issues */
.youtube-block .video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    z-index: 10;
}

/* Placeholder styling for missing clip images */
.youtube-block .video-placeholder {
    border-radius: 0.625rem;
    font-size: 0.875rem;
}

.youtube-block .videos-wrapper .video-timestamp svg path {
    transition: fill .15s ease;
}

.youtube-block .videos-wrapper .video-single:hover .video-timestamp {
    background-color: #fff;
    color: #333;
}

.youtube-block .videos-wrapper .video-single:hover .video-timestamp svg path {
    fill: #333;
}

.youtube-block .videos-wrapper img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .15s ease;
}

.youtube-block .videos-wrapper .video-image:hover img {
    transform: scale(1.05);
}

@media (max-width:1199px) {
    .youtube-block .videos-wrapper .video-timestamp {
        font-size: 0.75rem;
    }
}


/* clips */