#videoModal.modal {
    align-items: center;
    display: flex;
    font-family: var(--font-family);
    inset: 0;
    justify-content: center;
    margin: 0;
    overflow: hidden;
    padding: 20px;
    position: fixed;
    /* Cover the header (9999) and its drawer and search overlays (10000). */
    z-index: 10001;
}

#videoModal .modal-backdrop {
    background: rgba(15, 23, 42, 0.6);
    height: 100%;
    inset: 0;
    opacity: 1;
    pointer-events: auto;
    position: absolute;
    width: 100%;
    z-index: 0;
}

#videoModal .modal-dialog {
    background: var(--bg-white);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    margin: 0;
    max-height: calc(100dvh - 40px);
    max-width: 720px;
    overflow-x: hidden;
    overflow-y: auto;
    pointer-events: auto;
    position: relative;
    width: 100%;
    z-index: 1;
}

#videoModal .modal-header,
#videoModal .modal-body,
#videoModal .modal-close-btn,
#videoModal iframe {
    pointer-events: auto;
}

#videoModal .modal-header {
    align-items: center;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-shrink: 0;
    justify-content: space-between;
    padding: 28px 32px 20px;
}

#videoModal .modal-title {
    color: var(--text-heading);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

#videoModal .modal-close-btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--text-muted);
    display: inline-flex;
    flex: 0 0 36px;
    font-size: 28px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    margin: -4px -4px -4px 16px;
    padding: 0;
    width: 36px;
}

#videoModal .modal-close-btn:hover,
#videoModal .modal-close-btn:focus-visible {
    background: var(--primary-light);
    color: var(--text-heading);
    outline: none;
}

#videoModal .modal-body {
    background: var(--bg-white);
    padding: 28px 32px;
    position: relative;
}

#videoModal .explainer-video-frame-wrap {
    margin-bottom: 24px;
}

#videoModal .point-item {
    line-height: 1.5;
}

@media (max-width: 640px) {
    #videoModal.modal {
        align-items: center;
        padding: 12px;
    }

    #videoModal .modal-dialog {
        border-radius: 18px;
        max-height: calc(100dvh - 24px);
    }

    #videoModal .modal-header {
        padding: 18px 20px 14px;
    }

    #videoModal .modal-title {
        font-size: 17px;
    }

    #videoModal .modal-body {
        padding: 18px 20px 22px;
    }

    #videoModal .explainer-video-frame-wrap {
        border-radius: 12px;
        margin-bottom: 18px;
    }

    #videoModal .explainer-bullet-points {
        gap: 12px;
    }

    #videoModal .point-item {
        align-items: flex-start;
        font-size: 13px;
        gap: 10px;
    }

    #videoModal .point-num {
        height: 26px;
        width: 26px;
    }
}
