/**
 * Banner slider styling, owned by the module.
 *
 * Deliberately plain CSS rather than Tailwind utilities: utilities only exist
 * in the CSS a theme compiles, and a theme that never scanned this module (the
 * stock Hyva theme, for one) produces none of them. The same reasoning rules
 * out Swiper — its stylesheet and script are shipped by the project theme, so a
 * banner that depends on them silently loses its slider on any other theme.
 *
 * Everything here is namespaced under .betech-banner so it cannot collide with
 * a theme's own slider styles.
 */

.betech-banner__viewport {
    position: relative;
}

.betech-banner__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* Hide the scrollbar: the strip is driven by the arrows and by swiping. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.betech-banner__track::-webkit-scrollbar {
    display: none;
}

.betech-banner__slide {
    flex: 0 0 100%;
    /* Without min-width:0 a wide image would stretch the flex item past 100%. */
    min-width: 0;
    scroll-snap-align: start;
}

.betech-banner__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: -1.25rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .85);
    color: #1d2733;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

.betech-banner__nav:hover {
    background: #fff;
}

.betech-banner__nav:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.betech-banner__nav[disabled] {
    opacity: .35;
    cursor: default;
}

.betech-banner__nav--prev {
    left: .75rem;
}

.betech-banner__nav--next {
    right: .75rem;
}

.betech-banner__nav svg {
    width: 1.25rem;
    height: 1.25rem;
}

.betech-banner__dots {
    position: absolute;
    right: 0;
    bottom: .75rem;
    left: 0;
    z-index: 2;
    display: flex;
    gap: .5rem;
    justify-content: center;
}

.betech-banner__dot {
    width: .5rem;
    height: .5rem;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.betech-banner__dot[aria-current="true"] {
    background: #fff;
    transform: scale(1.35);
}

/* A visitor who prefers reduced motion gets instant jumps, and no autoplay -
   the script reads the same preference. */
@media (prefers-reduced-motion: reduce) {
    .betech-banner__track {
        scroll-behavior: auto;
    }
}
