/* ── Sidebar Video: play-intro trigger ───────────────────────── */
#scd-course-sidebar .sidebar-video {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #0a3d5c;
    cursor: pointer;
}

#scd-course-sidebar .sidebar-video .play-intro {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

#scd-course-sidebar .sidebar-video .play-intro-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: opacity 0.3s;
}

#scd-course-sidebar .sidebar-video .play-intro:hover .play-intro-thumb {
    opacity: 0.75;
}

/* Overlay sits on top of thumb (or fills whole block if no thumb) */
#scd-course-sidebar .sidebar-video .play-intro-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(10, 61, 92, 0.45);
    transition: background 0.3s;
}

/* When no thumb: make the overlay the visible block */
#scd-course-sidebar .sidebar-video .play-intro:not(:has(.play-intro-thumb)) .play-intro-overlay {
    position: relative;
    padding: 40px 20px;
    background: transparent;
}

#scd-course-sidebar .sidebar-video .play-intro:hover .play-intro-overlay {
    background: rgba(10, 61, 92, 0.65);
}

#scd-course-sidebar .sidebar-video .play-intro-overlay i {
    font-size: 52px;
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s;
}

#scd-course-sidebar .sidebar-video .play-intro:hover .play-intro-overlay i {
    transform: scale(1.12);
}

#scd-course-sidebar .sidebar-video .play-intro-overlay p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-align: center;
}

/* ── Video Modal ─────────────────────────────────────────────── */
.eb-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.eb-video-modal.is-open {
    display: flex;
}

.eb-video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.80);
    cursor: pointer;
    animation: eb-fade-in 0.2s ease;
}

.eb-video-modal-inner {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 860px;
    animation: eb-scale-in 0.25s ease;
}

.eb-video-modal-frame {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.eb-video-modal-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.eb-video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: opacity 0.2s;
}

.eb-video-modal-close:hover {
    opacity: 0.7;
}

@keyframes eb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes eb-scale-in {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
