.gallery-helper-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000; /* wp's core mobile nav container is 100000 */
    display: flex;
    justify-content: center;
    align-items: center;
}
.gallery-helper-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center
}

.gallery-helper-image {
    max-width: 100%;
    max-height: 100%;
    transition: opacity 0.3s ease;
    cursor: grab;
}
.gallery-helper-lightbox .wp-block-image figure:hover {
    cursor: pointer;
}

.gallery-helper-caption {
    color: white;
  line-height:40px;
position:absolute;
width:100%;
}

.gallery-helper-close,
.gallery-helper-prev,
.gallery-helper-next {
    position: absolute;
    border: none;
    font-size: 20px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.gallery-helper-close:focus,
.gallery-helper-prev:focus,
.gallery-helper-next:focus {
    outline: 2px solid #007cba;
    outline-offset: 0px;
    background: rgba(0, 0, 0, 0.9);
}

.gallery-helper-close:hover,
.gallery-helper-prev:hover,
.gallery-helper-next:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-helper-close {
    top: -10px;
    right: -10px;
}

.gallery-helper-prev {
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-helper-next {
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .gallery-helper-prev,
    .gallery-helper-next {
        display: none; /* Hide navigation buttons on mobile - use swipe instead */
    }

    .gallery-helper-content {
        max-width: 95%;
        max-height: 95%;
    }

    .gallery-helper-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        color: white;
    }

    .gallery-helper-modal {
        padding: 20px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .gallery-helper-content {
        max-width: 100%;
        max-height: 100%;
    }

    .gallery-helper-modal {
        padding: 10px;
    }
}
