/*
 * CSS Fadeshow – Autoplay only
 * Basierend auf https://github.com/alexerlandsson/css-fadeshow (MIT)
 * Nur Autoplay-Fade, kein Ken-Burns, keine Navigation.
 * Unterstützt 2–10 Slides, 5s pro Bild, 1s Fade.
 */

/* === Core === */
[data-fadeshow] {
    position: relative;
    overflow: hidden;
}

[data-fadeshow] .fs-slides {
    height: 100%;
}

[data-fadeshow] .fs-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

[data-fadeshow] .fs-slide:first-child {
    position: relative;
    opacity: 1;
    pointer-events: all;
}

[data-fadeshow] .fs-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-fadeshow] input[type=radio] {
    position: fixed;
    left: -9999px;
    opacity: 0;
}

/* Checked-State bricht Autoplay ab (hier nicht nötig, da keine Labels vorhanden) */
[data-fadeshow] input[type=radio]:checked ~ .fs-slides .fs-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s linear;
    animation: none !important;
}

/* === Autoplay Keyframes (2–10 Slides) === */

/* 2 Slides – 10s Gesamt */
@keyframes fs-auto-2 {
    0%       { opacity: 0; pointer-events: none; }
    10%, 50% { opacity: 1; pointer-events: all; }
    60%, 100%{ opacity: 0; pointer-events: none; }
}
/* 3 Slides – 15s */
@keyframes fs-auto-3 {
    0%            { opacity: 0; pointer-events: none; }
    6.667%, 33.333% { opacity: 1; pointer-events: all; }
    40%, 100%     { opacity: 0; pointer-events: none; }
}
/* 4 Slides – 20s */
@keyframes fs-auto-4 {
    0%        { opacity: 0; pointer-events: none; }
    5%, 25%   { opacity: 1; pointer-events: all; }
    30%, 100% { opacity: 0; pointer-events: none; }
}
/* 5 Slides – 25s */
@keyframes fs-auto-5 {
    0%        { opacity: 0; pointer-events: none; }
    4%, 20%   { opacity: 1; pointer-events: all; }
    24%, 100% { opacity: 0; pointer-events: none; }
}
/* 6 Slides – 30s */
@keyframes fs-auto-6 {
    0%             { opacity: 0; pointer-events: none; }
    3.333%, 16.667%{ opacity: 1; pointer-events: all; }
    20%, 100%      { opacity: 0; pointer-events: none; }
}
/* 7 Slides – 35s */
@keyframes fs-auto-7 {
    0%             { opacity: 0; pointer-events: none; }
    2.857%, 14.286%{ opacity: 1; pointer-events: all; }
    17.143%, 100%  { opacity: 0; pointer-events: none; }
}
/* 8 Slides – 40s */
@keyframes fs-auto-8 {
    0%          { opacity: 0; pointer-events: none; }
    2.5%, 12.5% { opacity: 1; pointer-events: all; }
    15%, 100%   { opacity: 0; pointer-events: none; }
}
/* 9 Slides – 45s */
@keyframes fs-auto-9 {
    0%             { opacity: 0; pointer-events: none; }
    2.222%, 11.111%{ opacity: 1; pointer-events: all; }
    13.333%, 100%  { opacity: 0; pointer-events: none; }
}
/* 10 Slides – 50s */
@keyframes fs-auto-10 {
    0%       { opacity: 0; pointer-events: none; }
    2%, 10%  { opacity: 1; pointer-events: all; }
    12%, 100%{ opacity: 0; pointer-events: none; }
}

/* === Autoplay Slide-Zuweisung (nth-of-type(N):last-of-type erkennt Slide-Anzahl) === */

/* 2 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(2):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-2 10s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(2):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(2):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }

/* 3 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(3):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-3 15s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(3):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(3):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(3):last-of-type ~ .fs-slides .fs-slide:nth-child(3) { animation-delay: 9s; }

/* 4 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(4):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-4 20s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(4):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(4):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(4):last-of-type ~ .fs-slides .fs-slide:nth-child(3) { animation-delay: 9s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(4):last-of-type ~ .fs-slides .fs-slide:nth-child(4) { animation-delay: 14s; }

/* 5 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(5):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-5 25s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(5):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(5):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(5):last-of-type ~ .fs-slides .fs-slide:nth-child(3) { animation-delay: 9s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(5):last-of-type ~ .fs-slides .fs-slide:nth-child(4) { animation-delay: 14s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(5):last-of-type ~ .fs-slides .fs-slide:nth-child(5) { animation-delay: 19s; }

/* 6 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(6):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-6 30s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(6):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(6):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(6):last-of-type ~ .fs-slides .fs-slide:nth-child(3) { animation-delay: 9s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(6):last-of-type ~ .fs-slides .fs-slide:nth-child(4) { animation-delay: 14s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(6):last-of-type ~ .fs-slides .fs-slide:nth-child(5) { animation-delay: 19s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(6):last-of-type ~ .fs-slides .fs-slide:nth-child(6) { animation-delay: 24s; }

/* 7 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-7 35s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide:nth-child(3) { animation-delay: 9s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide:nth-child(4) { animation-delay: 14s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide:nth-child(5) { animation-delay: 19s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide:nth-child(6) { animation-delay: 24s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(7):last-of-type ~ .fs-slides .fs-slide:nth-child(7) { animation-delay: 29s; }

/* 8 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-8 40s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(3) { animation-delay: 9s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(4) { animation-delay: 14s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(5) { animation-delay: 19s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(6) { animation-delay: 24s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(7) { animation-delay: 29s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(8):last-of-type ~ .fs-slides .fs-slide:nth-child(8) { animation-delay: 34s; }

/* 9 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-9 45s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(1) { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(2) { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(3) { animation-delay: 9s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(4) { animation-delay: 14s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(5) { animation-delay: 19s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(6) { animation-delay: 24s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(7) { animation-delay: 29s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(8) { animation-delay: 34s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(9):last-of-type ~ .fs-slides .fs-slide:nth-child(9) { animation-delay: 39s; }

/* 10 Slides */
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide { animation: fs-auto-10 50s linear infinite; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(1)  { animation-delay: -1s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(2)  { animation-delay: 4s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(3)  { animation-delay: 9s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(4)  { animation-delay: 14s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(5)  { animation-delay: 19s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(6)  { animation-delay: 24s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(7)  { animation-delay: 29s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(8)  { animation-delay: 34s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(9)  { animation-delay: 39s; }
[data-fadeshow~=autoplay] input[type=radio]:nth-of-type(10):last-of-type ~ .fs-slides .fs-slide:nth-child(10) { animation-delay: 44s; }
