/**
 * WB Engraving Lightbox Styles
 * Lightbox do wyświetlania podglądów grawerów w pełnym rozmiarze
 */

/* Hover effect na miniaturkach */
.wb-engrave-lightbox-trigger img {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wb-engrave-lightbox-trigger:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Główny kontener lightbox */
.wb-engrave-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ciemne tło */
.wb-engrave-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: wb-fadeIn 0.3s ease-in-out;
}

/* Kontener z obrazem */
.wb-engrave-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10000;
    animation: wb-zoomIn 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Kontener obrazu z możliwością przewijania */
.wb-engrave-lightbox-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Obraz w pełnym rozmiarze */
.wb-engrave-lightbox-image {
    display: block;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    /* Kursor jest ustawiany dynamicznie przez JavaScript */
}

.wb-engrave-lightbox-image.zooming {
    transition: transform 0.2s ease;
}

/* Przycisk zamknięcia */
.wb-engrave-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    transition: transform 0.2s;
}

.wb-engrave-lightbox-close:hover {
    transform: scale(1.2);
}

/* Przyciski zoom */
.wb-engrave-lightbox-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10001;
}

.wb-engrave-lightbox-zoom-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    user-select: none;
}

.wb-engrave-lightbox-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.wb-engrave-lightbox-zoom-btn:active {
    transform: scale(0.95);
}

/* Animacje */
@keyframes wb-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wb-zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsywność */
@media (max-width: 768px) {
    .wb-engrave-lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .wb-engrave-lightbox-image-container {
        max-width: 95vw;
        max-height: 85vh;
    }

    .wb-engrave-lightbox-image {
        max-width: 100%;
        max-height: 80vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .wb-engrave-lightbox-close {
        top: -35px;
        font-size: 35px;
    }

    .wb-engrave-lightbox-zoom-controls {
        bottom: 10px;
        gap: 5px;
    }

    .wb-engrave-lightbox-zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}
