/*
 * vehicle-slider.css
 * Lightweight vehicle image slider.
 */


/* ========================================================================
   SLIDER
   ======================================================================== */

.vehicle-slider {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 5px auto 12.5px;
    overflow: hidden;
}


/* ========================================================================
   TRACK
   ======================================================================== */

.vehicle-slider-track {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-y pinch-zoom;
}

.vehicle-slider-track::-webkit-scrollbar {
    display: none;
}


/* ========================================================================
   SLIDES
   ======================================================================== */

.vehicle-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.vehicle-slide img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
}


/* ========================================================================
   PREVIOUS / NEXT BUTTONS
   ======================================================================== */

.vehicle-slider-button {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    width: 44px;
    height: 54px;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.vehicle-slider-prev {
    left: 0;
}

.vehicle-slider-next {
    right: 0;
}

.vehicle-slider-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.vehicle-slider-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -5px;
}


/* ========================================================================
   DOT NAVIGATION
   ======================================================================== */

.vehicle-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    z-index: 2;
    display: flex;
    gap: 7px;
    transform: translateX(-50%);
}

.vehicle-slider-dot {
    display: block;
    width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.vehicle-slider-dot[aria-current="true"] {
    background: #fff;
}

.vehicle-slider-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}


/* ========================================================================
   IMAGE COUNTER
   ======================================================================== */

.vehicle-slider-status {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
}


/* ========================================================================
   ACCESSIBILITY
   ======================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}


/* ========================================================================
   SMALL SCREENS
   ======================================================================== */

@media screen and (max-width: 450px) {

    .vehicle-slider-button {
        width: 40px;
        height: 48px;
        font-size: 24px;
    }

    .vehicle-slider-status {
        display: none;
    }

}