/**
 * Image Slider Lightbox Styles
 * Clean gallery modal with navigation
 */

.isl-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.isl-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.isl-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

/* Container */
.isl-lightbox__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    box-sizing: border-box;
}

/* Close button */
.isl-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;
    display: flex;
    align-items: center;
    justify-content: center;
}

.isl-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.isl-lightbox__close:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Navigation buttons */
.isl-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;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.isl-lightbox__nav svg {
    width: 24px;
    height: 24px;
}

.isl-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.isl-lightbox__nav:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.isl-lightbox__nav--prev {
    left: 20px;
}

.isl-lightbox__nav--next {
    right: 20px;
}

/* Content area */
.isl-lightbox__content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image */
.isl-lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
    /* Disable any zoom/drag on image */
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Counter */
.isl-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
}

/* Mobile styles */
@media (max-width: 768px) {
    .isl-lightbox__container {
        padding: 50px 15px;
    }

    .isl-lightbox__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .isl-lightbox__nav {
        width: 44px;
        height: 44px;
    }

    .isl-lightbox__nav svg {
        width: 20px;
        height: 20px;
    }

    .isl-lightbox__nav--prev {
        left: 10px;
    }

    .isl-lightbox__nav--next {
        right: 10px;
    }

    .isl-lightbox__image {
        max-height: calc(100vh - 100px);
    }

    .isl-lightbox__counter {
        bottom: 15px;
        font-size: 13px;
    }
}

/* Animation for image transitions */
.isl-lightbox__image {
    animation: islFadeIn 0.2s ease;
}

@keyframes islFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
