/**
 * GradePixel Lightbox Gallery Styles
 */

/* Overlay */
.gp-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gp-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Content Wrapper */
.gp-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Image */
.gp-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: opacity 0.2s ease;
    user-select: none;
}

/* Controls */
.gp-lightbox-close,
.gp-lightbox-prev,
.gp-lightbox-next {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    position: absolute;
    z-index: 10000;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gp-lightbox-close:hover,
.gp-lightbox-prev:hover,
.gp-lightbox-next:hover {
    color: #ddd;
    transform: scale(1.1);
}

/* Close Button */
.gp-lightbox-close {
    top: 20px;
    right: 30px;
    font-size: 40px;
    line-height: 1;
    padding: 10px;
}

/* Nav Buttons */
.gp-lightbox-prev,
.gp-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.gp-lightbox-prev:hover,
.gp-lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.gp-lightbox-prev {
    left: 20px;
    padding-right: 4px; /* Optic balance for arrow */
}

.gp-lightbox-next {
    right: 20px;
    padding-left: 4px;
}

/* Loader */
.gp-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: gp-spin 1s linear infinite;
    display: none;
    z-index: -1;
}

@keyframes gp-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .gp-lightbox-prev,
    .gp-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
        background-color: rgba(0, 0, 0, 0.5);
    }
    
    .gp-lightbox-prev { left: 10px; }
    .gp-lightbox-next { right: 10px; }
    
    .gp-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
}
