/* --- HERO CAROUSEL EXTENDED — the opt-ins' styles (hero-carousel-extended.html.twig): slides[].eyebrow (a small label
   above the caption, shown at every width) and fade (hero-carousel--fade: the slides cross-fade in place). Only under
   their own classes; a brand using these opt-ins loads this file after hero-carousel.css. --- */

.hero-carousel-slide__eyebrow {
    margin: var(--hero-carousel-eyebrow-margin, 0);
    font-size: var(--hero-carousel-eyebrow-size, 13px);
    font-weight: var(--hero-carousel-eyebrow-weight, 700);
    line-height: var(--hero-carousel-eyebrow-line-height, 1.7);
    letter-spacing: var(--hero-carousel-eyebrow-letter-spacing, normal);
    text-transform: var(--hero-carousel-eyebrow-transform, uppercase);
    color: var(--hero-carousel-eyebrow-color, inherit);
}

/* data.fade: the slides cross-fade in place instead of sliding. carousel.js still moves the track with an inline
   transform; the fade variant cancels it (hence !important) and stacks the slides in one grid cell, only the current
   one visible. --hero-carousel-fade-duration, default 0.6s. */
.hero-carousel--fade .carousel-track {
    display: grid;
    transform: none !important;
    transition: none;
}

.hero-carousel--fade .carousel-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--hero-carousel-fade-duration, 0.6s) ease-in-out, visibility 0s linear var(--hero-carousel-fade-duration, 0.6s);
}

.hero-carousel--fade .carousel-slide.current-slide {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--hero-carousel-fade-duration, 0.6s) ease-in-out, visibility 0s;
}

/* slides[].text: a line of text under the slide's caption, at every width. */
.hero-carousel-slide__text {
    margin: 0;
    font-family: var(--hero-carousel-text-family, var(--font-family-body, var(--font-family)));
    font-size: var(--hero-carousel-text-size, 17px);
    font-weight: var(--hero-carousel-text-weight, 400);
    line-height: var(--hero-carousel-text-line-height, 1.4);
    color: var(--hero-carousel-text-color, inherit);
}

/* data.captionLook (hero-carousel--caption-look), with slideLook: the caption, its text and the button in a centred
   column of a set width (--hero-carousel-caption-max-width, of the slide's width), their lines centred, white, over a
   shade laid on the picture (under the caption); the button's colour under the pointer. Only under this class (paired
   with hero-carousel--slide-look, so it outranks slideLook's own rules wherever this block sits); up to 767px the
   -mobile tokens apply, falling back to the desktop ones. */
.hero-carousel--slide-look.hero-carousel--caption-look .hero-carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-carousel-caption-shade, transparent);
    pointer-events: none;
}

.hero-carousel--slide-look.hero-carousel--caption-look .hero-carousel-slide__content {
    max-width: var(--hero-carousel-caption-max-width, 80%);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero-carousel--slide-look.hero-carousel--caption-look .hero-carousel-slide__subtitle,
.hero-carousel--slide-look.hero-carousel--caption-look .hero-carousel-slide__text {
    color: var(--hero-carousel-caption-color, #FFFFFF);
}

.hero-carousel--slide-look.hero-carousel--caption-look .hero-carousel-slide__cta {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-carousel--slide-look.hero-carousel--caption-look .hero-carousel-slide__cta:is(:hover, :focus-visible) {
    background-color: var(--hero-carousel-caption-cta-bg-hover, var(--hero-carousel-look-cta-bg, var(--color-primary)));
    color: var(--hero-carousel-caption-cta-color-hover, var(--hero-carousel-look-cta-color, var(--color-text-light, #FFFFFF)));
}

@media (max-width: 767px) {
    .hero-carousel-slide__text {
        font-size: var(--hero-carousel-text-size-mobile, var(--hero-carousel-text-size, 17px));
        line-height: var(--hero-carousel-text-line-height-mobile, var(--hero-carousel-text-line-height, 1.4));
    }

    .hero-carousel--slide-look.hero-carousel--caption-look .hero-carousel-slide__content {
        max-width: var(--hero-carousel-caption-max-width-mobile, var(--hero-carousel-caption-max-width, 80%));
    }
}

/* data.slideLook (hero-carousel--slide-look): the slides keep a set ratio (no minimum height or padding of their own),
   the caption and button sit centred at a set height from the slide's bottom, the button reads its own look, and the
   dots lie over the picture near its bottom. Every value is a --hero-carousel-look-* token; up to 768px the -mobile
   ones apply, falling back to the desktop ones. Only under this class. */
.hero-carousel--slide-look .hero-carousel-slide {
    min-height: var(--hero-carousel-look-min-height, 0);
    aspect-ratio: var(--hero-carousel-look-aspect-ratio, auto);
    padding: var(--hero-carousel-look-padding, 0);
}

.hero-carousel--slide-look .hero-carousel-slide__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--hero-carousel-look-content-bottom, 10%);
    max-width: none;
    align-items: var(--hero-carousel-look-content-align, center);
    gap: var(--hero-carousel-look-content-gap, 30px);
}

.hero-carousel--slide-look .hero-carousel-slide__cta {
    background-color: var(--hero-carousel-look-cta-bg, var(--color-primary));
    color: var(--hero-carousel-look-cta-color, var(--color-text-light, #FFFFFF));
    border: var(--hero-carousel-look-cta-border, none);
    border-radius: var(--hero-carousel-look-cta-radius, var(--border-radius-button, 10px));
    padding: var(--hero-carousel-look-cta-padding, 5px 25px);
    font-family: var(--hero-carousel-look-cta-family, var(--font-family));
    font-size: var(--hero-carousel-look-cta-size, 20px);
    font-weight: var(--hero-carousel-look-cta-weight, inherit);
    line-height: var(--hero-carousel-look-cta-line-height, normal);
    text-transform: var(--hero-carousel-look-cta-transform, none);
}

.hero-carousel--slide-look .carousel-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--hero-carousel-look-dots-bottom, 2%);
    padding: 0;
    gap: var(--hero-carousel-look-dot-gap, 10px);
}

.hero-carousel--slide-look .carousel-indicator {
    width: var(--hero-carousel-look-dot-size, 10px);
    height: var(--hero-carousel-look-dot-size, 10px);
    border: var(--hero-carousel-look-dot-border, none);
    background-color: var(--hero-carousel-look-dot-bg, #FFFFFF);
    opacity: var(--hero-carousel-look-dot-opacity, 0.6);
}

.hero-carousel--slide-look .carousel-indicator.current-indicator {
    background-color: var(--hero-carousel-look-dot-current-bg, #FFFFFF);
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-carousel--slide-look .hero-carousel-slide {
        min-height: var(--hero-carousel-look-min-height-mobile, var(--hero-carousel-look-min-height, 0));
        aspect-ratio: var(--hero-carousel-look-aspect-ratio-mobile, var(--hero-carousel-look-aspect-ratio, auto));
        padding: var(--hero-carousel-look-padding-mobile, var(--hero-carousel-look-padding, 0));
    }

    .hero-carousel--slide-look .hero-carousel-slide__cta {
        font-size: var(--hero-carousel-look-cta-size-mobile, var(--hero-carousel-look-cta-size, 20px));
        padding: var(--hero-carousel-look-cta-padding-mobile, var(--hero-carousel-look-cta-padding, 5px 25px));
        line-height: var(--hero-carousel-look-cta-line-height-mobile, var(--hero-carousel-look-cta-line-height, normal));
        border: var(--hero-carousel-look-cta-border, none);
    }
}
