/* ==========================================================================
   Elementor Addons by Ryzels - Grid to Carousel (Mobile / Tablet)
   Classes are only added by the script while the carousel is active.
   Sizes and colors come from the element's settings as CSS variables.
   ========================================================================== */

/* The grid becomes a horizontal scroll-snap row */
.rgc-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: var(--rgc-gap, 16px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rgc-track::-webkit-scrollbar {
    display: none;
}

/* Each grid item becomes a slide */
.rgc-track > .rgc-slide {
    flex: 0 0 var(--rgc-slide, 85%) !important;
    width: var(--rgc-slide, 85%) !important;
    max-width: var(--rgc-slide, 85%) !important;
    min-width: 0 !important;
    box-sizing: border-box;
    scroll-snap-align: start;
}

/* Boxed container: inner box and pagination stacked */
.rgc-host-column {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
}

/* ---------------------------- Pagination bars ---------------------------- */

.rgc-controls {
    display: flex;
    flex: 0 0 100%;
    justify-content: var(--rgc-dots-align, center);
    width: 100%;
    padding: var(--rgc-dots-space, 14px) 0 4px;
    box-sizing: border-box;
}

.rgc-dots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--rgc-dot-gap, 6px);
}

/* Strong selectors so theme and Elementor button styles (including hover) don't change the bars */
.rgc-controls .rgc-dots .rgc-dot,
.rgc-controls .rgc-dots .rgc-dot:hover,
.rgc-controls .rgc-dots .rgc-dot:focus {
    display: inline-block;
    width: var(--rgc-dot-w, 22px);
    min-width: 0;
    height: var(--rgc-dot-h, 3px);
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--rgc-dot-radius, 2px);
    background: var(--rgc-dot-color, #cccccc);
    box-shadow: none;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    transition: background-color 0.3s ease, width 0.3s ease;
}

.rgc-controls .rgc-dots .rgc-dot:hover {
    background: var(--rgc-dot-hover-color, var(--rgc-dot-color, #cccccc));
}

.rgc-controls .rgc-dots .rgc-dot.is-active,
.rgc-controls .rgc-dots .rgc-dot.is-active:hover,
.rgc-controls .rgc-dots .rgc-dot.is-active:focus {
    width: var(--rgc-dot-active-w, 34px);
    background: var(--rgc-dot-active-color, #222222);
}

.rgc-controls .rgc-dots .rgc-dot:focus-visible {
    outline: 2px solid var(--rgc-dot-active-color, #222222);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .rgc-track {
        scroll-behavior: auto;
    }

    .rgc-controls .rgc-dots .rgc-dot {
        transition: none;
    }
}
