
#cplone-advent {
    display: grid;
    grid-template-areas: "advent";

    figure {

        > img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        &.advent-bg {
            margin: 0 auto;
            width: 100%;
            max-width: 1200px;
            grid-area: advent;
        }

    }

    .superac {
        --gap: 1.5rem;
        --max-cols: 6;

        /*--item-max: 200px;*/
        --item-max: 160px;
        --min-col: 10rem;

        /* total gap space if the max number of columns were shown */
        --total-gap: calc((var(--max-cols) - 1) * var(--gap));

        display: grid;
        gap: var(--gap);
        justify-content: center;

        width: 100%;
        max-width: calc(var(--max-cols) * var(--item-max) + (var(--max-cols) - 1) * var(--gap));
        justify-self: center;
        margin-inline: auto;

        grid-template-columns: repeat(
            auto-fit,
            minmax(min(var(--min-col), 100%), var(--item-max))
        );

        grid-area: advent;
        background-color: transparent;
        padding: 0;
        align-self: center;
        align-content: start;
        height: fit-content;

        @media (max-width: 30rem) {
            grid-template-columns: repeat(2, minmax(0, var(--item-max)));
        }

        /*.superac-day--animation-flip.is-open,*/

        /*.superac-day--animation-none.is-open {*/

        /*    transform: none;*/

        /*}*/

        .superac-day {
            width: 100%;
            max-width: var(--item-max);
            aspect-ratio: 4 / 5;
            box-shadow: 10px 5px 5px rgba(0, 0, 0, 0.4);

            .superac-card {
                background-color: transparent;
                align-items:flex-start;
                justify-content: flex-end;
                padding:8px;

                .superac-card-title {
                    font-size:36px;
                    line-height:36px;
                }
            }

            &:nth-child(1 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles1.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles1.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles1.webp);
                }
            }

            /*&:nth-child(1 of .superac-day):hover {*/

            /*    background: url(../cplone/images/advent/one.gif) no-repeat center/contain;*/

            /*}*/

            &:nth-child(2 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles2.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles2.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles2.webp);
                }

                .superac-card-title {
                    color:#fc6d27;
                }
            }

            &:nth-child(3 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles3.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles3.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles3.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }
            }

            &:nth-child(4 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles4.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles4.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles4.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }
            }

            &:nth-child(5 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles5.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles5.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles5.webp);
                }
            }

            &:nth-child(6 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles6.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles6.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles6.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }
            }

            &:nth-child(7 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles7.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles7.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles7.webp);
                }

            }

            &:nth-child(8 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles8.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles8.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles8.webp);
                }

                .superac-card-title {
                    color:#fc6d27;
                }
            }

            &:nth-child(9 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles9.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles9.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles9.webp);
                }

            }

            &:nth-child(10 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles10.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles10.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles10.webp);
                }

            }

            &:nth-child(11 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles11.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles11.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles11.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }
            }

            &:nth-child(12 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles12.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles12.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles12.webp);
                }

                .superac-card-title {
                    color:#e63ae8;
                }
            }

            &:nth-child(13 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles13.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles13.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles13.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }
            }

            &:nth-child(14 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles14.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles14.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles14.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }
            }

            &:nth-child(15 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles15.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles15.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles15.webp);
                }

            }

            &:nth-child(16 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles16.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles16.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles16.webp);
                }

                .superac-card-title {
                    color:#e63ae8;
                }
            }

            &:nth-child(17 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles17.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles17.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles17.webp);
                }

            }

            &:nth-child(18 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles18.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles18.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles18.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }
            }

            &:nth-child(19 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles19.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles19.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles19.webp);
                }

            }

            &:nth-child(20 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles20.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles20.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles20.webp);
                }

            }

            &:nth-child(21 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles21.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles21.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles21.webp);
                }

                .superac-card-title {
                    color:#694aff;
                }

            }

            &:nth-child(22 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles22.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles22.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles22.webp);
                }

            }

            &:nth-child(23 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles23.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles23.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles23.webp);
                }

                .superac-card-title {
                    color:#fc6d27;
                }
            }

            &:nth-child(24 of .superac-day) {
                background: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles24.png) no-repeat center/contain;

                @supports (background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles24.webp)) {
                    background-image: url(../cplone/images/advent/CPL-One_Christmas_Advent-Baubles24.webp);
                }

            }

            .superac-card-content{
                clip: rect(1px, 1px, 1px, 1px);
                clip-path: inset(50%);
                height: 1px;
                width: 1px;
                margin: -1px;
                overflow: hidden;
                padding: 0;
                position: absolute;
            }

            &.is-open {
                position: relative;
                overflow:hidden;
                height:100%;

                &::after {
                    content: "";
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background-color: rgba(0, 0, 0, 0.4);
                    transition: opacity 500ms;
                    z-index: 0;
                }
            }

        }

    }

}

.superac-dialog-content {
    display: grid;
    grid-template-columns: 1fr 24px;
    width:auto;

    .superac-dialog-top-bar {
        display: block;
        width: 24px;
        height: 24px;
        order: 2;
        margin-top: 6px;
    }

    .superac-dialog-title {
        order: 1;
        margin: 0 0 1rem 0;
    }

    .superac-dialog-body {
        grid-column: 1 / -1;
        order: 3;

        .yt-embed iframe,
        .vimeo-embed iframe {
            width: 100%;
            height: 100%;
            border: 0;
        }

    }

}