/* Minimal gallery modal styles */
.gallery-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.gallery-modal.open {
    display: flex;
}

.gallery-modal .gm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(7.550000190734863px);
}

.gallery-modal .gm-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 2;
    flex-direction: column;
}

.gallery-modal .gm-image-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
    position: relative;
}

.gallery-modal .gm-description {
    width: 100%;
    text-align: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-style: italic;
    font-size: 16px;
    line-height: normal;
    color: #ffffff;
    padding: 12px 16px;
    margin: 0;
}

.gallery-modal .gm-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.gallery-modal .gm-prev,
.gallery-modal .gm-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 3;
}

.gallery-modal .gm-prev {
    left: 12px;
}

.gallery-modal .gm-next {
    right: 12px;
}

.gallery-modal .gm-prev,
.gallery-modal .gm-next,
.gallery-modal .gm-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.gallery-modal .gm-prev,
.gallery-modal .gm-next {
    position: relative;
    top: auto;
}

.gallery-modal .gm-close {
    position: absolute;
    top: 25px;
    right: 0;
    z-index: 10;
}

.gallery-modal .gm-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding: 8px 0;
    justify-content: flex-start;
    width: 100%;
    -ms-overflow-style: none;
    /* IE and Edge - hide scrollbar on desktop */
    scrollbar-width: none;
    /* Firefox - hide scrollbar on desktop */
}

/* Hide WebKit scrollbar while keeping scrolling functional */
.gallery-modal .gm-thumbs::-webkit-scrollbar {
    display: none;
    height: 0;
}

.gallery-modal .gm-thumb {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.6;
    cursor: pointer;
    border: 2px solid transparent;
}

.gallery-modal .gm-thumb.active {
    opacity: 1;
    border-color: #fff;
}

@media (max-width: 820px) {
    .gallery-modal .gm-content {
        padding: 0 16px;
        gap: 24px;
        max-height: 100vh;
        justify-content: center;
    }

    .gallery-modal .gm-image-wrap {
        flex: 0 1 auto;
        width: 100%;
        gap: 12px;
    }

    .gallery-modal .gm-description {
        font-size: 14px;
        padding: 8px 12px;
    }

    .gallery-modal .gm-image {
        width: 100%;
        max-height: 60vh;
        object-fit: contain;
    }

    .gallery-modal .gm-prev,
    .gallery-modal .gm-next {
        display: none;
    }

    .gallery-modal .gm-thumbs {
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 8px 0;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .gallery-modal .gm-thumb {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .gallery-modal .gm-close {
        top: 16px;
        right: 16px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        border-radius: 50%;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
    }

    .gallery-modal .gm-close img {
        width: 20px;
        height: 20px;
        filter: brightness(0) invert(1);
    }
}
