/**
 * Interactive Gallery Component Styles
 */

.interactive-gallery {
    position: relative;
}

.gallery-main-image {
    position: relative;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.gallery-main-image a {
    display: block;
    position: relative;
}

/* Static mode class for potential styling */
.gallery-main-image a.static-mode {
    /* No filter - removed debug red tint */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.gallery-main-image .main-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

/* Desktop Thumbnail Navigation */
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-thumbnails .thumbnail-item {
    width: 60px;
    height: 60px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.gallery-thumbnails .thumbnail-item:hover {
    border-color: #888;
}

.gallery-thumbnails .thumbnail-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 1px #007bff;
}

.gallery-thumbnails .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile Dot Navigation */
.gallery-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.gallery-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Active dot */
.gallery-dots .dot.active {
    background: #333;
}

/* Edge dots (first and last) are smaller by default */
.gallery-dots .dot.edge-small {
    width: 6px;
    height: 6px;
}

/* Responsive */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: flex;
    }

    /* Mobile carousel container */
    .gallery-main-image {
        overflow: hidden;
        touch-action: pan-y;
        position: relative;
    }

    /* Carousel track that holds all images - NO GAP */
    .gallery-carousel-track {
        display: flex;
        gap: 0;
        transition: transform 0.2s ease-out;
        will-change: transform;
        /* Ensure no extra spacing */
        margin: 0;
        padding: 0;
    }

    .gallery-carousel-track.swiping {
        transition: none;
    }

    /* Each image slide - width set by JavaScript */
    .gallery-carousel-slide {
        flex-shrink: 0;
        position: relative;
        /* Width is set explicitly by JavaScript - no percentage */
        /* Ensure no extra spacing */
        margin: 0;
        padding: 0;
    }

    .gallery-carousel-slide a {
        display: block;
        /* Ensure no extra spacing */
        margin: 0;
        padding: 0;
        line-height: 0;
        /* Remove any line-height spacing */
    }

    .gallery-carousel-slide img {
        width: 100%;
        height: auto;
        display: block;
        /* Ensure no extra spacing */
        margin: 0;
        padding: 0;
    }
}

/* Loading state */
.gallery-main-image.loading {
    opacity: 0.6;
}