/*
 * Anywhere Sliders, Empora skin (loaded by the plugin from Themes/<theme>/Content/slick/ for the Empora theme only).
 * Colours and fonts come from the theme tokens in Themes/Empora/Content/css/empora.css (:root).
 * Layout is decided by where the slider sits and how many slides it has (classes set by Themes/Empora/Content/scripts/empora.js):
 *   inside .home-top (zone home_page_top)  the hero: an HTML slide with the sample's .hero markup (styled in empora.css),
 *                                          or picture slides (cover)
 *   any other zone                         banners: .is-solo (1 slide, one full-width tile), .is-pair (2: side by side from
 *                                          768px, stacked on phones), .is-carousel (3+: slick, one tile at a time)
 * A banner is .picture-slide.ban with a caption .cap > h3 + a.u built from the slide's alt text and url.
 * The right-to-left differences are in anywhereSliders.rtl.css.
 */

.slider-wrapper {
    position: relative;
    margin: 0;
    overflow: hidden;
}

.slider-wrapper .anywhere-slider {
    position: relative;
}

.slider-wrapper .html-slide {
    display: block;
}

.slider-wrapper .picture-slide a {
    display: block;
}

/* ---------- picture slides: hero (any height set below) and banner tiles ---------- */
.slider-wrapper .picture-slide {
    position: relative;
    overflow: hidden;
    background: var(--sand);
}

.slider-wrapper .picture-slide > a {
    position: absolute;
    inset: 0;
}

.slider-wrapper .picture-slide img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
}

/* hero picture slides: the sample's hero height, as the HTML hero (.page-home .hero in empora.css): the photo drops below the
   logo (62px phone, 84px from 768px) and is 2:3 full width on phones, 2:3 at half width from 768px (so 4:3 over the full width) */
.home-top .picture-slide {
    box-sizing: content-box;
    padding-block-start: 62px;
    aspect-ratio: 2 / 3;
    background: var(--blush);
}

/* below the padding: the link (when the slide has a url) or, with no link, the picture itself; a linked picture fills its link */
.home-top .picture-slide > a,
.home-top .picture-slide > picture,
.home-top .picture-slide > img {
    position: absolute;
    inset: 62px 0 0;
}

.home-top .picture-slide > picture {
    display: block;
}

.home-top .picture-slide > img {
    height: calc(100% - 62px);
}

.home-top .picture-slide > a img,
.home-top .picture-slide > picture img {
    inset: 0;
    height: 100%;
}

/* banner tiles: the sample's shoes tile on phones (4:5), 640px from 768px */
.slider-wrapper .picture-slide.ban {
    aspect-ratio: 4 / 5;
}

/* a pair on phones: two stacked 2:3 tiles */
.slider-wrapper.is-pair .picture-slide.ban {
    aspect-ratio: 2 / 3;
}

.slider-wrapper .picture-slide.ban::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 1;
    height: 45%;
    background: linear-gradient(to top, var(--ban-hi), var(--ban-0));
    pointer-events: none;
}

.slider-wrapper .ban .cap {
    position: absolute;
    inset-inline-start: var(--m);
    inset-block-end: 32px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.slider-wrapper .ban .cap h3 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 500;
    line-height: 1;
    color: var(--ivory);
}

.slider-wrapper .ban .cap a.u {
    font-size: 14px;
    color: var(--ivory);
}

/* a pair is laid out by CSS (empora.js switches slick off for two slides) */
.slider-wrapper.is-pair .anywhere-slider:not(.slick-initialized) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

/* the (empty) arrows container of a pair would take a grid cell */
.slider-wrapper.is-pair .anywhere-slider:not(.slick-initialized) .slick-arrows {
    display: none;
}

/* ---------- dots and arrows: the sample's minimal style (only a slider with 2+ slides in slick has them) ---------- */
.slider-wrapper .anywhere-slider .slick-arrows {
    display: block;
    font-size: 0;
}

.slider-wrapper .anywhere-slider .slick-dots {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 2px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.slider-wrapper .anywhere-slider .slick-dots li {
    margin: 0;
    padding: 0;
}

.slider-wrapper .anywhere-slider .slick-dots button {
    width: 18px;
    height: 26px;
    padding: 12px 0;
    border: 0;
    background: rgba(246, 242, 236, .55);
    background-clip: content-box;
    font-size: 0;
    cursor: pointer;
}

.slider-wrapper .anywhere-slider .slick-dots .slick-active button {
    background-color: var(--ivory);
}

.slider-wrapper .anywhere-slider .slick-dots button::before,
.slider-wrapper .anywhere-slider .slick-dots button::after {
    content: none;
}

/* arrows float over the picture from 768px, like the rails' arrows (hidden on phones) */
.slider-wrapper .anywhere-slider .slick-arrow {
    display: none;
    position: absolute;
    top: calc(50% - 22px);
    z-index: 3;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(246, 242, 236, .92);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 18px 18px;
    box-shadow: none;
    font-size: 0;
    opacity: 1;
    cursor: pointer;
}

.slider-wrapper .anywhere-slider .slick-arrow::before,
.slider-wrapper .anywhere-slider .slick-arrow::after {
    content: none;
}

.slider-wrapper .anywhere-slider .slick-prev {
    left: 24px;
    right: auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234B252F' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E");
}

.slider-wrapper .anywhere-slider .slick-next {
    left: auto;
    right: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234B252F' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
    .home-top .picture-slide {
        padding-block-start: 84px;
        aspect-ratio: 4 / 3;
    }

    .home-top .picture-slide > a,
    .home-top .picture-slide > picture,
    .home-top .picture-slide > img {
        inset: 84px 0 0;
    }

    .home-top .picture-slide > img {
        height: calc(100% - 84px);
    }

    .slider-wrapper .picture-slide.ban {
        height: 640px;
        aspect-ratio: auto;
    }

    .slider-wrapper.is-pair .picture-slide.ban {
        height: auto;
        aspect-ratio: 2 / 3;
    }

    .slider-wrapper.is-pair .anywhere-slider:not(.slick-initialized) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .slider-wrapper .ban .cap h3 {
        font-size: 40px;
    }

    .slider-wrapper .anywhere-slider .slick-arrow {
        display: block;
    }

    .slider-wrapper .anywhere-slider .slick-dots {
        inset-block-end: 12px;
    }
}
