/**
 * ACC Feature Scroller widget styles.
 *
 * The script moves the track with a GPU-composited transform and implements
 * touch dragging with momentum for smooth autoplay and mobile interaction.
 *
 * Custom properties (set per-instance via Elementor selectors):
 *   --acc-fs-per-view       items filling the visible width at once
 *   --acc-fs-gap            gap between items
 *   --acc-fs-content-gap    gap between title and subheading
 *   --acc-fs-align          overlay horizontal alignment
 *   --acc-fs-text-align     text alignment (start/center/end)
 *   --acc-fs-speed          marquee loop duration
 *   --acc-fs-img-height     image box height
 *   --acc-fs-img-fit        object-fit (cover/contain)
 *   --acc-fs-img-radius     image border radius
 *   --acc-fs-item-bg / --acc-fs-item-pad / --acc-fs-item-radius   item box styling
 *   --acc-fs-overlay-*      text-overlay scrim / padding / vertical position
 *   --acc-fs-title-color / --acc-fs-sub-color   text colours
 */

.acc-fscroll {
    --acc-fs-per-view: 4;
    --acc-fs-gap: 24px;
    --acc-fs-content-gap: 2px;
    --acc-fs-align: center;
    --acc-fs-text-align: center;
    --acc-fs-speed: 30s;
    --acc-fs-img-height: 260px;
    --acc-fs-img-fit: cover;
    --acc-fs-img-radius: 16px;
    --acc-fs-item-bg: transparent;
    --acc-fs-item-pad: 0px;
    --acc-fs-item-radius: 0px;
    --acc-fs-overlay-justify: flex-end;
    --acc-fs-overlay-scrim: rgba(0, 0, 0, 0.45);
    --acc-fs-overlay-pad: 12px;
    --acc-fs-title-color: #ffffff;
    --acc-fs-sub-color: rgba(255, 255, 255, 0.85);
    --acc-fs-item-w: 240px;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    border: 0;
    outline: 0;
    box-shadow: none;
    cursor: grab;
    user-select: none;
}

.acc-fscroll.is-dragging {
    cursor: grabbing;
}

.acc-fscroll__track {
    display: flex;
    width: max-content;
    flex-wrap: nowrap;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Each group is one full copy of the items; the trailing margin keeps spacing
   even when the transform wraps from one copy to the next. */
.acc-fscroll__group {
    display: flex;
    flex: 0 0 auto;
    gap: var(--acc-fs-gap);
    margin-right: var(--acc-fs-gap);
}

.acc-fscroll__item {
    flex: 0 0 var(--acc-fs-item-w);
    width: var(--acc-fs-item-w);
    box-sizing: border-box;
    padding: var(--acc-fs-item-pad);
    background: var(--acc-fs-item-bg);
    border-radius: var(--acc-fs-item-radius);
}

/* Fixed-height image box with the text overlaid inside it */
.acc-fscroll__media {
    position: relative;
    width: 100%;
    height: var(--acc-fs-img-height);
    overflow: hidden;
    border-radius: var(--acc-fs-img-radius);
    background: #e9ebee;
}

.acc-fscroll__img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: var(--acc-fs-img-fit);
    object-position: center;
    -webkit-user-drag: none;
    backface-visibility: hidden;
}

.acc-fscroll__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: var(--acc-fs-overlay-justify);
    align-items: var(--acc-fs-align);
    gap: var(--acc-fs-content-gap);
    padding: var(--acc-fs-overlay-pad);
    text-align: var(--acc-fs-text-align);
    background: linear-gradient(to top, var(--acc-fs-overlay-scrim) 0%, transparent 70%);
}

.acc-fscroll__title {
    color: var(--acc-fs-title-color);
    font-weight: 600;
    line-height: 1.3;
}

.acc-fscroll__sub {
    color: var(--acc-fs-sub-color);
    line-height: 1.4;
}

/* Editor placeholder */
.acc-fscroll__placeholder {
    padding: 40px 20px;
    text-align: center;
    color: #777;
    background: #f3f4f5;
    border: 1px dashed #c4c4c4;
    border-radius: 6px;
}
