﻿/* Lightbox / full-screen popup styles */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 1);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 0;
}

    .lightbox-overlay.open {
        display: flex;
    }

.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.lightbox-main {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
}

    .lightbox-main img {
        max-width: 100%;
        max-height: 80vh;
        object-fit: contain;
        transition: transform 0.2s ease-out;
        transform-origin: center;
        user-select: none;
        -webkit-user-drag: none;
    }

        .lightbox-main img.zoomed {
            cursor: zoom-out;
        }

.lightbox-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 4px;
    width: 100%;
    justify-content: center;
}

.lightbox-thumb {
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #fff;
}

    .lightbox-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .lightbox-thumb.active {
        border-color: #fff;
        box-shadow: 0 0 8px var(--cylinda-primary);
    }

.lightbox-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.control-btn {
    pointer-events: auto;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    color: #000000;
    border: 2px solid #000000;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1;
}

@media (max-width: 700px) {
    .lightbox-thumb {
        width: 64px;
        height: 64px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}


#cboxClose {
    top: 0;
    left: auto;
    right: 0;
    z-index: 1;
}