/* ==========================================================================
   EV ACF Repeater Widget
   ========================================================================== */

.ev-acf-repeater {
    position: relative;
}

/* -------------------------------------------------------------------------
   Grid
   ------------------------------------------------------------------------- */

.ev-acf-repeater--grid {
    display: flex;
    flex-wrap: wrap;
}

.ev-acf-repeater--grid .ev-acf-repeater__item {
    box-sizing: border-box;
}

.ev-acf-repeater__item img {
    max-width: 100%;
    height: auto;
}

/* -------------------------------------------------------------------------
   Masonry
   ------------------------------------------------------------------------- */

.ev-acf-repeater--masonry .ev-acf-repeater__item {
    box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   Carousel / Swiper
   ------------------------------------------------------------------------- */

.ev-acf-repeater__carousel {
    overflow: hidden;
    position: relative;
}

.ev-acf-repeater__carousel .swiper-wrapper {
    position: relative;
    width: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.ev-acf-repeater__carousel .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
    transition-property: transform;
}

/* Arrows */
.ev-acf-repeater__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    padding: 0;
    outline: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ev-acf-repeater__arrow svg {
    width: 100%;
    height: 100%;
}

.ev-acf-repeater__arrow svg polyline {
    stroke: currentColor;
}

.ev-acf-repeater__arrow--prev {
    left: 10px;
}

.ev-acf-repeater__arrow--next {
    right: 10px;
}

/* Hide Swiper's default ::after pseudo arrows */
.ev-acf-repeater__arrow.swiper-button-prev::after,
.ev-acf-repeater__arrow.swiper-button-next::after {
    display: none;
}

.ev-acf-repeater__arrow.swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
}

.ev-acf-repeater__arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Pagination */
.ev-acf-repeater__pagination {
    text-align: center;
    margin-top: 12px;
    position: relative;
    z-index: 10;
}

.ev-acf-repeater__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    margin: 0 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.ev-acf-repeater__pagination .swiper-pagination-bullet-active {
    background: #000;
}

.ev-acf-repeater__pagination .swiper-pagination-progressbar {
    background: rgba(0, 0, 0, 0.1);
    height: 4px;
    width: 100%;
    position: relative;
}

.ev-acf-repeater__pagination .swiper-pagination-progressbar-fill {
    background: #000;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: scale(0);
    transform-origin: left top;
}

/* -------------------------------------------------------------------------
   Accordion
   ------------------------------------------------------------------------- */

.ev-acf-repeater__accordion {
    width: 100%;
}

.ev-accordion__item {
    overflow: hidden;
}

.ev-accordion__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.ev-accordion__head:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.ev-accordion__title {
    flex: 1;
    margin: 0;
}

.ev-accordion__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    font-size: inherit;
    transition: transform 0.3s ease;
}

/* Show/hide default vs active icon */
.ev-accordion__icon--active {
    display: none;
}

.ev-accordion__item.is-active .ev-accordion__icon--default {
    display: none;
}

.ev-accordion__item.is-active .ev-accordion__icon--active {
    display: inline-flex;
}

.ev-accordion__body {
    display: none;
    overflow: hidden;
}
