/* * Styles for the Image Lightbox plugin.
 */

/*
 * Add relative positioning to the theme's gallery container.
 * This ensures our absolutely positioned zoom button is placed
 * correctly within this container.
 */
.tb-woo-product-gallery {
    position: relative;
}

/* The main zoom button that appears over the product image */
.il-zoom-button {
    position: absolute;
    bottom: 15px; /* Changed from top */
    left: 15px;   /* Changed from right */
    z-index: 20; /* Ensure it's above the slider images but below popups */
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.il-zoom-button:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.il-zoom-button svg {
    width: 20px;
    height: 20px;
    color: #333;
}

/* Lightbox overlay */
.il-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.il-lightbox.il-show {
    opacity: 1;
    visibility: visible;
}

/* Lightbox content wrapper */
.il-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Close button */
.il-close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff; /* Keeping the color white for visibility against the new background */
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease; /* Added background-color transition */
    z-index: 10;
    
    /* Added styles for consistency with zoom buttons */
    background-color: rgba(30, 30, 30, 0.7); /* Same background as zoom controls container */
    border-radius: 50%; /* Make it rounded */
    width: 40px; /* Adjust size */
    height: 40px; /* Adjust size */
    display: flex; /* For centering the 'x' */
    align-items: center;
    justify-content: center;
    line-height: 1; /* Adjust line height for better centering of 'x' */
    font-size: 30px; /* Slightly smaller 'x' to fit better */
}

.il-close-lightbox:hover {
    color: #bbb;
    background-color: rgba(50, 50, 50, 0.9); /* Slightly darker on hover */
}

/* Zoom controls container */
.il-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(30, 30, 30, 0.7);
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.il-controls button {
    background: #fff;
    border: none;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s;
}

.il-controls button:hover {
    background-color: #333;
    color: #fff;
}

/* Image container */
.il-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* This is crucial for panning */
}


/* The image inside the lightbox */
.il-lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}

.il-lightbox-image.is-zoomed {
    cursor: grab;
}

.il-lightbox-image.is-panning {
    cursor: grabbing;
}