/*
 * Carousel and slider controls for every Shoper storefront (owner, 22.11.2026 and 23.11.2026; App\Support\CarouselControls):
 * no left/right arrows on any slider or carousel, and no bullets. Each page of a carousel is a thin line; the active
 * one is filled, and on a slider that advances by itself it fills over the slide's time. The lines stay the real
 * buttons they replace (click, keyboard, the same labels); rails and sliders still move by dragging and swiping.
 *
 * One file for the three carousel families the storefronts use: the presentation sliders and rails (.dots, .cat-dots),
 * the storefront carousels and slideshows (Swiper pagination) and the Torque sliders (Slick). It is loaded after the
 * theme's own styles, and every rule starts with html:not(#_), an id-level weight that outranks any theme rule (some
 * themes mark their bullets !important), so the geometry is forced here. Colours follow the surrounding text
 * (currentColor), which keeps the lines readable on light and dark sections alike.
 */
:root {
    --carousel-line-width: 28px;
    --carousel-line-height: 3px;
    --carousel-line-gap: 6px;
}

/* No arrows. */
html:not(#_) :is(.hero-arrow, .pc-arrow, .eb-arr, .car .arrow, .swiper-arrows, .swiper-button-prev, .swiper-button-next, .slick-arrow, .slick-prev, .slick-next) {
    display: none !important;
}

/* The row of lines keeps the component's own display and visibility (some rows show only on phones, an empty one is
   hidden); the space between lines is each line's own margin, so it holds in block and flex rows alike. */
html:not(#_) :is(.dots, .cat-dots, .fashion-carousel-pagination, .swiper-pagination, .slick-dots) {
    gap: 0;
    align-items: center;
}

html:not(#_) .slick-dots li {
    display: inline-flex !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Each control becomes a line: a 3 px bar with a 10 px invisible margin above and below for the pointer. */
html:not(#_) :is(.dots .dot, .cat-dots .dot, .dots > i, .dots > button, .swiper-pagination-bullet, .slick-dots li button) {
    box-sizing: content-box !important;
    position: relative !important;
    display: inline-block !important;
    flex: none !important;
    width: var(--carousel-line-width) !important;
    min-width: 0 !important;
    height: var(--carousel-line-height) !important;
    min-height: 0 !important;
    margin: 0 calc(var(--carousel-line-gap) / 2) !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    color: inherit;
    cursor: pointer;
}

html:not(#_) :is(.dots .dot, .cat-dots .dot) i {
    display: none !important;
}

html:not(#_) :is(.dots .dot, .cat-dots .dot, .dots > i, .dots > button, .swiper-pagination-bullet, .slick-dots li button)::before,
html:not(#_) :is(.dots .dot, .cat-dots .dot, .dots > i, .dots > button, .swiper-pagination-bullet, .slick-dots li button)::after {
    content: "" !important;
    position: absolute !important;
    inset: auto 0 !important;
    top: calc(50% - var(--carousel-line-height) / 2) !important;
    width: auto !important;
    height: var(--carousel-line-height) !important;
    border-radius: calc(var(--carousel-line-height) / 2);
    opacity: 1 !important;
    font-size: 0 !important;
}

/* The track: the surrounding text colour, faint. */
html:not(#_) :is(.dots .dot, .cat-dots .dot, .dots > i, .dots > button, .swiper-pagination-bullet, .slick-dots li button)::before {
    background: color-mix(in srgb, currentColor 28%, transparent) !important;
}

/* The fill: empty, and complete on the active line. */
html:not(#_) :is(.dots .dot, .cat-dots .dot, .dots > i, .dots > button, .swiper-pagination-bullet, .slick-dots li button)::after {
    background: currentColor !important;
    transform: scaleX(0);
    transform-origin: left center;
}

html:not(#_) :is(.dots .dot.on, .dots .dot[aria-current="true"], .cat-dots .dot[aria-current="true"], .cat-dots .dot.on, .dots > i.on, .dots > button[aria-current="true"], .swiper-pagination-bullet-active, .slick-dots li.slick-active button)::after {
    transform: scaleX(1);
}

/* On a presentation hero the lines take the text colour the contrast check chose for the photo on screen. */
html:not(#_) [data-c4-slider][style*="--carousel-hero-line"] .dots {
    color: var(--carousel-hero-line);
}

/* A presentation slider that advances by itself fills its active line over the slide's time (js/c4/presentation.js
   sets the time and restarts the line on every slide; a pause holds it where it is). */
html:not(#_) [data-c4-slider].is-autoplaying .dot.on::after {
    animation: carousel-line-fill var(--carousel-line-time, 6500ms) linear both;
}

html:not(#_) [data-c4-slider].is-paused .dot.on::after {
    animation-play-state: paused;
}

@keyframes carousel-line-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    html [data-c4-slider] .dot.on::after {
        animation: none !important;
        transform: scaleX(1);
    }
}

/* The photo indicators on a product card (the photo changes as the pointer moves across the card) are short lines
   too; they only show where the pointer is and are not buttons. */
html:not(#_) .hover-slider-indicator .hover-slider-indicator-dot {
    width: 14px !important;
    height: 2px !important;
    border-radius: 1px !important;
}

html:not(#_) :is(.dots .dot, .cat-dots .dot, .dots > button, .swiper-pagination-bullet, .slick-dots li button):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
