/* Stylowanie popupu */
#my-popup {
    display: none;
    background: none; /* Usunięcie tła */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: auto; /* Dopasowanie szerokości */
    height: auto; /* Dopasowanie wysokości */
}

#my-popup img {
    display: block;
    max-width: 100%; /* Domyślnie ograniczenie szerokości */
    width: auto; /* Dopasowanie do obrazka */
    height: auto; /* Dopasowanie do obrazka */
    margin: 0;
}

#my-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7); /* Przyciemnione tło */
    z-index: 9998; /* Tło musi być poniżej popupu */
}

#my-popup-close {
    position: absolute;
    top: -10px;
    right: -10px;
    cursor: pointer;
    font-size: 18px;
    background: #fff; /* Tło krzyżyka */
    border: 1px solid #000; /* Obwódka krzyżyka */
    border-radius: 50%; /* Kółko */
    width: 30px; /* Szerokość */
    height: 30px; /* Wysokość */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000; /* Kolor krzyżyka */
    z-index: 10000;
}

#my-popup-close:hover {
    background: #000; /* Zmiana koloru na hover */
    color: #fff; /* Kolor krzyżyka na hover */
    border-color: #fff;
}

/* Dostosowanie mobilne */
@media screen and (max-width: 768px) {
    #my-popup img {
        max-width: 95vw; /* Dopasowanie szerokości do ekranu */
        height: auto; /* Zachowanie proporcji */
    }
}

/* Dostosowanie dla bardzo małych ekranów */
@media screen and (max-width: 480px) {
    #my-popup img {
        max-width: 90vw; /* Jeszcze mniejsze zdjęcie na bardzo małych ekranach */
    }
}

/* Dostosowanie dla dużych ekranów */
@media screen and (min-width: 1024px) {
    #my-popup img {
        max-height: 90vh; /* Ograniczenie wysokości dla dużych ekranów */
    }
}

/* Dostosowanie dla urządzeń dotykowych */
@media screen and (max-width: 768px) and (pointer: coarse) {
    #my-popup-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Efekty animacji */
.popup-content.fade {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.popup-content.zoom {
    transform: scale(0.5);
    animation: zoomIn 0.5s forwards;
}

.popup-content.slide-down {
    transform: translateY(-100%);
    animation: slideDown 0.5s forwards;
}

.popup-content.slide-left {
    transform: translateX(-100%);
    animation: slideLeft 0.5s forwards;
}

.popup-content.slide-right {
    transform: translateX(100%);
    animation: slideRight 0.5s forwards;
}

/* Klucze animacji */
@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes zoomIn {
    to { transform: scale(1); }
}

@keyframes slideDown {
    to { transform: translateY(0); }
}

@keyframes slideLeft {
    to { transform: translateX(0); }
}

@keyframes slideRight {
    to { transform: translateX(0); }
}
