/* LearnDash YouTube Shield - frontend CSS */
.ldys-wrapper {
    position: relative !important;
    overflow: hidden !important;
    background: #000 !important;
    width: 100%;
}

.ldys-wrapper.ldys-has-aspect {
    aspect-ratio: 16 / 9;
}

.ldys-wrapper.ldys-has-aspect > iframe.ldys-iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.ldys-iframe {
    z-index: 1 !important;
    opacity: 0 !important;
    transition: opacity 0.35s ease !important;
}

.ldys-wrapper.ldys-ready .ldys-iframe {
    opacity: 1 !important;
}

.ldys-loader {
    position: absolute !important;
    inset: 0 !important;
    z-index: 30 !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ldys-loader::after {
    content: "";
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ldys-spin 0.8s linear infinite;
}

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

.ldys-blocker-top,
.ldys-blocker-bottom {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 20 !important;
    background: transparent !important;
    pointer-events: auto !important;
}

.ldys-blocker-top {
    top: 0 !important;
}

.ldys-blocker-bottom {
    bottom: 0 !important;
}

/* Custom fullscreen button. This lives outside the YouTube iframe, so it stays clickable. */
.ldys-fullscreen-btn {
    position: absolute !important;
    right: 14px !important;
    bottom: 14px !important;
    z-index: 60 !important;
    width: 42px !important;
    height: 42px !important;
    border: 0 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.58) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
    line-height: 1 !important;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease !important;
}

.ldys-wrapper.ldys-ready .ldys-fullscreen-btn {
    display: flex !important;
}

.ldys-fullscreen-btn:hover,
.ldys-fullscreen-btn:focus {
    background: rgba(0, 0, 0, 0.82) !important;
    outline: none !important;
    transform: scale(1.04) !important;
}

.ldys-fullscreen-btn svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    fill: currentColor !important;
    pointer-events: none !important;
}

.ldys-wrapper:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    background: #000 !important;
}

.ldys-wrapper:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    background: #000 !important;
}

.ldys-wrapper:fullscreen > iframe.ldys-iframe,
.ldys-wrapper:-webkit-full-screen > iframe.ldys-iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.ldys-wrapper:fullscreen .ldys-fullscreen-btn,
.ldys-wrapper:-webkit-full-screen .ldys-fullscreen-btn {
    right: 24px !important;
    bottom: 24px !important;
}
