/* Lesson Modal Responsive Fixes */

/* Lesson Modal */
#lessonModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    backdrop-filter: blur(12px);
    padding: 1rem;
    overflow-y: auto !important;
    align-items: flex-start !important;
    justify-content: center;
}

#lessonModal .modal-content {
    max-width: 900px;
    width: 100%;
    margin: 2rem auto;
    max-height: none !important;
    overflow: visible !important;
    position: relative;
}

/* Sticky header in modal */
#lessonModal .modal-content>div:first-child {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 10;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #lessonModal {
        padding: 0.5rem;
    }

    #lessonModal .modal-content {
        margin: 1rem auto;
    }

    #lessonModalTitle {
        font-size: 1.375rem !important;
    }
}

@media (max-width: 520px) {
    #lessonModal {
        padding: 0.25rem;
    }

    #lessonModal .modal-content {
        margin: 0.5rem auto;
    }

    #lessonModalTitle {
        font-size: 1.125rem !important;
    }

    #lessonModal .modal-content>div:first-child {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
}

/* Ensure video is responsive */
#lessonModalVideo {
    margin-bottom: 1.5rem;
}

#lessonModalVideo>div {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

#videoFrame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}