/* Overlay - przyciemnione tło */
.kghm-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.kghm-popup-overlay.active {
    display: flex;
}

/* Kontener popup */
.kghm-popup-container {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: scaleIn 0.3s ease-in-out;
}

/* Przycisk zamykania - X w prawym górnym rogu */
.kghm-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.kghm-popup-close:hover {
    background: white;
    transform: scale(1.1);
    color: #000;
}

/* Zawartość popup */
.kghm-popup-content {
    width: 100%;
    height: 100%;
}

.kghm-popup-content img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsywność */
@media (max-width: 768px) {
    .kghm-popup-container {
        max-width: 95%;
        max-height: 85vh;
    }

    .kghm-popup-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 8px;
        right: 8px;
    }
}

/* Zablokowanie przewijania strony gdy popup jest otwarty */
body.kghm-popup-open {
    overflow: hidden;
}