/**
 * Gallery Carousel Styles
 * Styles for WordPress gallery blocks converted to carousels
 *
 * @package Twickenham_YC
 * @since 1.0.0
 */

/* Carousel wrapper */
.carousel-wrapper {
    position: relative;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Gallery modifications when in carousel mode */
.carousel-wrapper .wp-block-gallery {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    display: block !important;
    line-height: 0;
    border-radius: 0.5rem;
}

.carousel-wrapper .wp-block-image {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
    max-width: 100%;
}

.carousel-wrapper .wp-block-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
    vertical-align: bottom;
}

/* Navigation buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    color: hsl(var(--navy));
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.carousel-nav:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-nav svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.75);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .carousel-prev {
        left: 0.5rem;
    }

    .carousel-next {
        right: 0.5rem;
    }

    .carousel-wrapper .wp-block-image img {
        max-height: 400px;
    }
}

/* Smooth transitions */
.carousel-wrapper .wp-block-image {
    transition: opacity 0.3s ease-in-out;
}

/* Focus styles for accessibility */
.carousel-nav:focus,
.carousel-indicator:focus {
    outline: 2px solid hsl(var(--ocean));
    outline-offset: 2px;
}
