/*
==================================================
popup_viewer.css
Pełnoekranowy popup galerii
==================================================
*/

.sg-popup{
    position:fixed;
    inset:0;
    z-index:999999999;
    background:rgba(0,0,0,0.9);
    display:none;
    overflow:hidden;
}

.sg-popup.sg-aktywny{
    display:block;
}

.sg-popup-scena{
    position:absolute;
    inset:0;
    perspective:1600px;
    overflow:hidden;
}

.sg-popup-karta{
    position:absolute;
    inset:0;
    transform-style:preserve-3d;
    transition:transform 0.9s cubic-bezier(0.45,0,0.15,1);
}

.sg-popup-karta.sg-next{
    transform:rotateY(-180deg);
}

.sg-popup-karta.sg-prev{
    transform:rotateY(180deg);
}

.sg-popup-strona{
    position:absolute;
    inset:0;
    backface-visibility:hidden;
    background:rgb(40,40,40);
    display:flex;
    align-items:center;
    justify-content:center;
}

.sg-popup-strona.sg-tyl{
    transform:rotateY(180deg);
}

.sg-popup-img{
    max-width:100%;
    max-height:100%;
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
    user-select:none;
}

.sg-popup-close{
    position:absolute;
    top:18px;
    right:22px;
    z-index:40;
    width:48px;
    height:48px;
    border:2px solid white;
    border-radius:50%;
    background:rgba(0,0,0,0.5);
    color:white;
    font-size:34px;
    line-height:42px;
    cursor:pointer;
}

.sg-popup-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    z-index:35;
    width:68px;
    height:100px;
    border:0;
    background:rgba(0,0,0,0.45);
    color:white;
    font-size:64px;
    cursor:pointer;
}

.sg-popup-arrow:hover,
.sg-popup-close:hover,
.sg-popup-counter:hover{
    background:rgba(255,255,255,0.18);
}

.sg-popup-prev{
    left:18px;
}

.sg-popup-next{
    right:18px;
}

.sg-popup-arrow.sg-disabled,
.sg-popup-counter.sg-disabled{
    opacity:0.35;
    pointer-events:none;
}

.sg-popup-counter{
    position:absolute;
    left:50%;
    bottom:22px;
    transform:translateX(-50%);
    z-index:45;
    border:2px solid white;
    border-radius:999px;
    background:rgba(0,0,0,0.55);
    color:white;
    font-size:18px;
    font-weight:bold;
    padding:10px 22px;
    cursor:pointer;
}

.sg-popup-numbers{
    position:absolute;
    inset:0;
    z-index:60;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,0.72);
    padding:30px;
}

.sg-popup-numbers.sg-aktywny{
    display:flex;
}

.sg-popup-numbers-box{
    max-width:720px;
    max-height:80vh;
    overflow:auto;
    background:rgba(25,25,25,0.96);
    border:1px solid rgba(255,255,255,0.35);
    border-radius:24px;
    padding:28px;
    text-align:center;
}

.sg-popup-numbers-title{
    color:white;
    font-size:22px;
    font-weight:bold;
    margin-bottom:20px;
}

.sg-popup-numbers-grid{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:center;
}

.sg-popup-number-btn{
    width:42px;
    height:42px;
    border-radius:50%;
    border:2px solid white;
    background:black;
    color:white;
    font-weight:bold;
    cursor:pointer;
}

.sg-popup-number-btn.sg-aktywny{
    background:white;
    color:black;
}

.sg-popup-lupa{
    position:fixed;
    width:250px;
    height:250px;
    border:2px solid white;
    border-radius:30px;
    background-repeat:no-repeat;
    background-color:rgb(40,40,40);
    box-shadow:0 0 18px rgba(0,0,0,0.75);
    pointer-events:none;
    z-index:80;
    display:none;
}

.sg-popup-zoom-info{
    position:fixed;
    z-index:90;
    color:white;
    font-size:22px;
    font-weight:bold;
    text-shadow:0 2px 5px black,0 0 8px black;
    pointer-events:none;
    opacity:0;
    transition:opacity 0.4s ease;
    white-space:nowrap;
}

.sg-popup-zoom-info.sg-aktywny{
    opacity:1;
}

@media(max-width:700px){

    .sg-popup-arrow{
        width:48px;
        height:78px;
        font-size:44px;
    }

    .sg-popup-prev{
        left:6px;
    }

    .sg-popup-next{
        right:6px;
    }

    .sg-popup-close{
        top:12px;
        right:12px;
        width:44px;
        height:44px;
        font-size:30px;
    }

    .sg-popup-counter{
        bottom:16px;
        font-size:16px;
        padding:9px 18px;
    }

    .sg-popup-lupa,
    .sg-popup-zoom-info{
        display:none !important;
    }
}