/**
 * AntigymClub Lightbox Styles
 * Lightweight CSS for image gallery lightbox
 */

/* Lightbox Container */
.agc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.agc-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

/* Dark Overlay */
.agc-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

/* Main Container */
.agc-lightbox-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
    box-sizing: border-box;
}

/* Close Button */
.agc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.agc-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Navigation Buttons */
.agc-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.agc-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.agc-lightbox-prev {
    left: 20px;
}

.agc-lightbox-next {
    right: 20px;
}

/* Content Area */
.agc-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Image */
.agc-lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.agc-lightbox-image.is-loading {
    opacity: 0.5;
}

/* Info Area (Caption + Counter) */
.agc-lightbox-info {
    margin-top: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.agc-lightbox-caption {
    margin: 0 0 8px 0;
    font-size: 14px;
    max-width: 600px;
}

.agc-lightbox-counter {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .agc-lightbox-container {
        padding: 50px 15px;
    }

    .agc-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .agc-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .agc-lightbox-prev {
        left: 10px;
    }

    .agc-lightbox-next {
        right: 10px;
    }

    .agc-lightbox-image {
        max-height: calc(100vh - 120px);
    }

    .agc-lightbox-info {
        margin-top: 12px;
    }

    .agc-lightbox-caption {
        font-size: 13px;
    }
}

/* Hide nav buttons on very small screens (use swipe) */
@media (max-width: 480px) {
    .agc-lightbox-nav {
        display: none;
    }

    .agc-lightbox-container {
        padding: 50px 10px;
    }
}

/* Animation for image transitions */
@keyframes lightbox-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.agc-lightbox.is-open .agc-lightbox-content {
    animation: lightbox-fade-in 0.3s ease forwards;
}
