/* Gallery Overlay Styles */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 5; /* Behind UI elements but in front of background */
    overflow: hidden;
    font-family: "neue-haas-grotesk-display", sans-serif;
    display: none;
    pointer-events: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Gallery Title */
.gallery-title {
    position: fixed;
    bottom: 15px; /* Same as floating buttons */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; /* Same as floating buttons */
    text-align: center;
    pointer-events: none;
}

.gallery-title h1 {
    color: #D3D3D3;
    font-size: .8rem; /* Same as floating buttons */
    font-weight: 400;
    letter-spacing: .08rem; /* Same as floating buttons */
    margin: 0;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Counter positioned under title at same baseline */
.gallery-title .counter {
    color: #D3D3D3;
    font-size: .8rem; /* Same as title */
    letter-spacing: .08rem; /* Same as title */
    font-weight: 400;
    margin: 0;
    margin-top: 5px; /* Small gap between title and counter */
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    opacity: 0.8;
}

/* Gallery Container */
.gallery-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 1;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Gallery Images */
.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Image Caption - Hidden */
.image-caption {
    display: none;
}

/* Image Counter Bubble - Now integrated into title */
.image-counter-bubble {
    /* Styles are now handled by .gallery-title .counter */
}

/* No Images Message */
.no-images {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #D3D3D3;
    font-size: 1rem;
    letter-spacing: 0.08rem;
    text-align: center;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .gallery-title {
        bottom: 70px; /* Move title and counter above bottom nav on mobile */
    }

    .gallery-title h1 {
        font-size: .8rem; /* Keep same size as floating buttons */
        letter-spacing: .08rem;
    }

    .image-caption {
        bottom: 60px;
        font-size: 0.7rem;
        padding: 8px 15px;
    }

    /* Counter is now part of title, no separate mobile styles needed */
}

/* Landscape Mobile */
@media (orientation: landscape) and (max-width: 768px) {
    .gallery-title h1 {
        font-size: .8rem; /* Keep same size as floating buttons */
    }

    .image-caption {
        bottom: 50px;
        font-size: 0.6rem;
        padding: 6px 12px;
    }

    /* Counter is now part of title, no separate landscape mobile styles needed */
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-title h1 {
        font-size: .8rem; /* Keep same size as floating buttons */
    }

    /* Counter is now part of title, no separate tablet styles needed */
}

/* Loading State - Hidden */
.gallery-container.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-container.loading::after {
    content: "";
    display: none;
}

/* Fade transitions */
.gallery-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-image[style*="display: block"] {
    opacity: 1;
}

/* Hide counter bubble when no images */
.gallery-container:empty ~ .image-counter-bubble {
    display: none;
} 