/* Strip Gallery Block Styles */
.block-strip-gallery {
    width: 100%;
    overflow: hidden;
}

/* Swiper Container */
.strip-gallery-swiper {
    width: 100%;
    padding-left: 1rem; /* Initial left margin offset */
    padding-right: 2rem; /* Ending margin for overscroll */
}

/* Swiper Wrapper */
.strip-gallery-wrapper {
    display: flex;
    align-items: flex-start;
}

/* Individual Slides - Image blocks themselves */
.wp-block-image.strip-gallery-slide {
    flex-shrink: 0;
    width: auto;
    height: 100% !important;
    margin: 0;
    display: flex;
    align-items: stretch;
}

/* Figure element styling - ensure it takes full height */
.wp-block-image.strip-gallery-slide figure {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
}

/* Make images cover the container properly */
.wp-block-image.strip-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex: 1;
}

/* Single image centering */
.strip-gallery-container.single-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.strip-gallery-container.single-image .wp-block-image {
    max-width: 400px;
    width: 100%;
}

.strip-gallery-container.single-image .wp-block-image img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Modal Styles */
.strip-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    z-index: 9999;
}

.strip-gallery-modal::backdrop {
    background: rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.strip-gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.strip-gallery-modal-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.strip-gallery-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.strip-gallery-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.strip-gallery-modal-close svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #374151;
}

/* Navigation arrows */
.strip-gallery-modal-prev,
.strip-gallery-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.strip-gallery-modal-prev {
    left: 1rem;
}

.strip-gallery-modal-next {
    right: 1rem;
}

.strip-gallery-modal-prev:hover,
.strip-gallery-modal-next:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.strip-gallery-modal-prev:disabled,
.strip-gallery-modal-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.strip-gallery-modal-prev:disabled:hover,
.strip-gallery-modal-next:disabled:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1);
}

.strip-gallery-modal-prev svg,
.strip-gallery-modal-next svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #374151;
}

/* Image counter */
.strip-gallery-modal-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
    .strip-gallery-modal-content {
        padding: 1rem;
    }
    
    .strip-gallery-modal-image {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .strip-gallery-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .strip-gallery-modal-prev,
    .strip-gallery-modal-next {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .strip-gallery-modal-prev {
        left: 0.5rem;
    }
    
    .strip-gallery-modal-next {
        right: 0.5rem;
    }
    
    .strip-gallery-modal-counter {
        bottom: 0.5rem;
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Responsive slide sizing */
@media (max-width: 767px) {
    .strip-gallery-swiper {
        padding-left: 1rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) {
    .strip-gallery-swiper {
        padding-left: 1.5rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1800px) {
    .strip-gallery-swiper {
        padding-left: 2rem;
        padding-right: 3rem;
    }
}

/* Ensure proper spacing between slides */
.swiper-slide + .swiper-slide {
    margin-left: 0 !important;
}

/* Custom scrollbar styling (optional) */
.strip-gallery-swiper::-webkit-scrollbar {
    display: none;
}

.strip-gallery-swiper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
