/* YouTube playlist player extensions for componentVideoImageFullwidth */

[x-cloak] {
    display: none !important;
}

.video--playlist .video-embed {
    position: relative;
}

.video-playlist-iframe,
.video-playlist-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-playlist-controls {
    position: absolute;
    bottom: 1rem;
    left: 6rem;
    display: flex;
    gap: 0.5rem;
    z-index: 5;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-playlist-controls > * {
    pointer-events: auto;
}

.video-playlist-controls.is-idle {
    opacity: 0;
    pointer-events: none;
}

.video-playlist-controls.is-idle > * {
    pointer-events: none;
}

@media (max-width: 640px) {
    .video--playlist {
        margin-bottom: 3.5rem;
    }

    .video--playlist .video-embed,
    .content .video--playlist .video-embed {
        overflow: visible;
    }

    .video-playlist-controls {
        position: absolute;
        top: 100%;
        right: 1rem;
        left: auto;
        bottom: auto;
        transform: none;
        margin-top: 0.75rem;
        justify-content: flex-end;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .video-playlist-controls > * {
        pointer-events: auto !important;
    }

    .video-nav,
    .video-playlist-toggle {
        background-color: rgba(0, 0, 0, 0.6);
    }
}

.video-nav,
.video-playlist-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: rgba(0,0,0,0.3);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.video-nav:hover,
.video-nav:focus-visible,
.video-playlist-toggle:hover,
.video-playlist-toggle:focus-visible {
    background-color: #267D67;
    border-color: #267D67;
    outline: none;
    transform: scale(1.05);
}

.video-nav svg,
.video-playlist-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.video-playlist-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 22rem;
    background-color: rgba(15, 15, 15, 0.92);
    color: #ffffff;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

@media (max-width: 640px) {
    .video-playlist-panel {
        max-width: 100%;
    }
}

.video-playlist-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 600;
    font-size: 0.95rem;
    background-color: transparent;
    color: #ffffff;
}

.video-playlist-panel__close {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.video-playlist-panel__close:hover,
.video-playlist-panel__close:focus-visible {
    background-color: rgba(255, 255, 255, 0.12);
    outline: none;
}

.video-playlist-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.video-playlist-panel__item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.video-playlist-panel__item:hover,
.video-playlist-panel__item:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
}

.video-playlist-panel__item.is-active {
    background-color: rgba(38, 125, 103, 0.25);
    border-left-color: #267D67;
}

.video-playlist-panel__thumb {
    width: 6rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.video-playlist-panel__title {
    font-size: 0.85rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
