/* ==========================================================================
   Vivnix hero campaign carousel — styles
   --------------------------------------------------------------------------
   Every class starts with `vivnix-carousel-`. Nothing here styles existing
   site elements, except the one rule that hides the original hero slider
   while a campaign is live (scoped to the carousel's own active class).
   ========================================================================== */

.vivnix-carousel-active > .hero-slider { display: none; }

.vivnix-carousel-holder { width: 100%; }

.vivnix-carousel-root {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    touch-action: pan-y;
}
.vivnix-carousel-root *,
.vivnix-carousel-root *::before,
.vivnix-carousel-root *::after { box-sizing: border-box; }

.vivnix-carousel-viewport { position: absolute; inset: 0; overflow: hidden; }

.vivnix-carousel-track {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    transition: transform 0.6s ease;
}

.vivnix-carousel-slide {
    flex: 0 0 100%;
    position: relative;
    height: 100%;
    margin: 0;
}
.vivnix-carousel-slide picture,
.vivnix-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.vivnix-carousel-slide.vivnix-carousel-no-image { background: linear-gradient(135deg, #003d82 0%, #0f172a 100%); }

/* Readability overlay: dark at the bottom so the text stays legible over any photo */
.vivnix-carousel-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 56px 22px 22px;
    color: #ffffff;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.55) 60%, rgba(15, 23, 42, 0) 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.vivnix-carousel-badge {
    display: inline-block;
    background: #fbbf24;
    color: #0f172a;
    font-weight: 800;
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.vivnix-carousel-festival { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; }
.vivnix-carousel-headline { margin: 0 0 6px; font-size: 24px; line-height: 1.2; font-weight: 800; }
.vivnix-carousel-description { margin: 0 0 12px; font-size: 14px; line-height: 1.45; opacity: 0.95; }

.vivnix-carousel-cta {
    display: inline-block;
    background: #10b981;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 11px 18px;
    border-radius: 10px;
    min-height: 44px;
}
.vivnix-carousel-cta:focus-visible,
.vivnix-carousel-prev:focus-visible,
.vivnix-carousel-next:focus-visible,
.vivnix-carousel-pause:focus-visible,
.vivnix-carousel-dot:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

/* Controls */
.vivnix-carousel-prev,
.vivnix-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.vivnix-carousel-prev { left: 10px; }
.vivnix-carousel-next { right: 10px; }

/* Close: top right, clear of the dots (which sit top centre) */
.vivnix-carousel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}
.vivnix-carousel-close:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

.vivnix-carousel-dots {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 2;
}
.vivnix-carousel-dot {
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    cursor: pointer;
    position: relative;
}
.vivnix-carousel-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}
.vivnix-carousel-dot[aria-current="true"]::before { background: #ffffff; width: 24px; border-radius: 6px; margin-left: -12px; }

.vivnix-carousel-pause {
    position: absolute;
    top: 10px;
    right: 54px; /* sits left of the close button */
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    z-index: 2;
}

/* Mobile: portrait frame to match the mobile image */
@media (max-width: 767px) {
    .vivnix-carousel-root { aspect-ratio: 4 / 5; }
    .vivnix-carousel-headline { font-size: 21px; }
    .vivnix-carousel-overlay { padding: 48px 16px 16px; }
    .vivnix-carousel-prev,
    .vivnix-carousel-next { width: 40px; height: 40px; font-size: 24px; }
}

/* ---------- Full-width layout (replaces the hero during a campaign) ---------- */
.vivnix-carousel-holder:has(.vivnix-carousel-full) { margin: 0; }

.vivnix-carousel-full {
    aspect-ratio: 4 / 3;
    /* leaves room under the banner so the poster's own "Shop now" button clears the cookie notice */
    max-height: calc(100vh - 170px);
    height: auto;
    width: 100%;
    max-width: none;
    border-radius: 0;
}
/* Keeps the headline and button inside the frame when the wide screen crops the artwork */
/* Show the whole poster (its headline and button are never cropped); the blurred copy fills the sides */
.vivnix-carousel-full .vivnix-carousel-slide img { object-fit: contain; object-position: 50% 50%; position: relative; z-index: 1; }
.vivnix-carousel-full .vivnix-carousel-slide::before {
    content: "";
    position: absolute;
    inset: -40px;
    background: var(--vivnix-slide-bg) center / cover no-repeat;
    filter: blur(24px) brightness(0.55);
}
.vivnix-carousel-full .vivnix-carousel-overlay { padding: 64px 56px 44px; }
.vivnix-carousel-full .vivnix-carousel-headline { font-size: 40px; max-width: 640px; }
.vivnix-carousel-full .vivnix-carousel-description { font-size: 16px; max-width: 560px; }

/* Hides the original hero from view but keeps it in the page (headings and text stay readable by search engines and screen readers) */
.vivnix-carousel-hide-hero {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

/* Image-only slides: the whole slide is the link */
.vivnix-carousel-link {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 1;
}
.vivnix-carousel-link:focus-visible { outline: 3px solid #fbbf24; outline-offset: -6px; }
.vivnix-carousel-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.vivnix-carousel-align-center { text-align: center; }
.vivnix-carousel-align-center .vivnix-carousel-cta { margin: 0 auto; }

@media (max-width: 767px) {
    .vivnix-carousel-full { aspect-ratio: 4 / 5; height: auto; max-height: none; }
    .vivnix-carousel-full .vivnix-carousel-headline { font-size: 26px; }
    .vivnix-carousel-full .vivnix-carousel-overlay { padding: 48px 18px 20px; }
}

/* Reduced motion: no sliding, no fading */
@media (prefers-reduced-motion: reduce) {
    .vivnix-carousel-track { transition: none; }
}
