/* Row so page title and video help button sit side by side */
.header-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-title-row .video-help-btn {
    flex-shrink: 0;
}

.video-help-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #6D28D9;
    border-radius: 14px;
    padding: 3px 8px 3px 10px;
    cursor: pointer;
    color: #6D28D9;
    font-size: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
    vertical-align: middle;
    margin-left: 0;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 2px rgba(109, 40, 217, 0.2);
}

.video-help-btn .video-help-label {
    font-size: 0.75rem;
}

.video-help-btn i {
    font-size: 0.75rem;
}

.video-help-btn:hover {
    background: #6D28D9;
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35);
    transform: translateY(-1px);
}

.video-popover-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.video-popover-backdrop.is-visible {
    opacity: 1;
}

.video-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    z-index: 100000001;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 12px;
    width: 90vw;
    max-width: 680px;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.video-popover.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-popover-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #6D28D9;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
    z-index: 1;
}

.video-popover-close:hover {
    background: #5B21B6;
}

.video-popover-player {
    display: block;
    width: 100%;
    border-radius: 8px;
    background: #000;
}

@media (max-width: 576px) {
    .video-help-btn .video-help-label {
        display: none;
    }

    .video-help-btn {
        width: 24px;
        height: 24px;
        padding: 0;
        border-radius: 50%;
    }

    .video-help-btn i {
        font-size: 0.7rem;
    }

    .video-popover {
        width: 96vw;
        padding: 8px;
        border-radius: 10px;
    }

    .video-popover-close {
        top: -10px;
        right: -10px;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}
