/* MS Lightbox - Powiększanie obrazków po kliknięciu */

/* Kursor pointer na obrazkach w treści lekcji */
.masterstudy-course-player-lesson img,
.masterstudy-single-lesson img,
.stm-lms-course-content img {
    cursor: zoom-in;
}

/* Overlay lightbox */
.ms-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    transition: background 0.3s ease, visibility 0.3s ease, opacity 0.3s ease;
    visibility: hidden;
    opacity: 0;
}

.ms-lightbox-overlay.ms-lightbox-active {
    visibility: visible;
    opacity: 1;
    background: rgba(0, 0, 0, 0.9);
}

/* Obrazek w lightbox */
.ms-lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    cursor: zoom-out;
}

.ms-lightbox-overlay.ms-lightbox-active img {
    transform: scale(1);
}

/* Przycisk zamknięcia */
.ms-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-lightbox-close svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.ms-lightbox-close:hover svg {
    fill: #ccc;
}

/* Wyłącz scroll na body kiedy lightbox jest otwarty */
body.ms-lightbox-open {
    overflow: hidden;
}
