/**
 * The following styles get applied both on the front of your site
 * and in the editor.
 *
 * Replace them with your own styles or remove the file completely.
 */

:root {
    --bc-block-article-gap: 20px;
    --bc-live-event-color: #d93025;
}

/* main article rules */
.bc-article {
    margin-bottom: var(--wp--preset--spacing--40);
    & > .block-group {
        gap: var(--wp--preset--spacing--40);
    }
    &.bc-featured {
        img {
            aspect-ratio: 16 / 9 !important;
        }
    }
    h2,
    p {
        margin: 0;
    }
    .bc-single-category {
        color: var(--wp--preset--color--secondary);
        a {
            color: var(--wp--preset--color--secondary);
            &:hover {
                border-color: var(--wp--preset--color--white);
            }
        }
    }
    ul {
        margin: 0;
        padding: 0;
        list-style-type: none;
        display: flex;
        gap: var(--wp--preset--spacing--20);
        /*
        li::after {
            content: ", ";
        }
        li:last-child::after {
            content: "";
        }
        */
    }
    img {
        display: block;
        width: 100%;
        object-fit: cover;
    }
}

/* live event block from EvolutionGroup Plugin */
.bc-article.bc-live {
    .bc-single-category {
        position: relative;
        & > ul {
            display: inline-block;
        }
        &::before {
            content: "IN DIRETTA";
            display: inline-block;
            font-size: var(--wp--preset--font-size--x-small);
            background: var(--bc-live-event-color);
            color: white;
            font-weight: 700;
            padding: 5px 8px;
            margin-right: 6px;
            border-radius: 2px;
            padding-left: 20px;
        }
        &::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 8px;
            transform: translateY(-50%) !important;
            width: 4px;
            height: 4px;
            background: #fff;
            border-radius: 50%;
            animation: pulse 1.5s infinite;
        }
    }
}


@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50%) scale(1.6);
        opacity: 0.3;
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* live event block from EvolutionGroup Plugin */
.bc-article.bc-live.bc-card--huge {
    .bc-single-category {
        & > ul {
            transform: translateY(2px) !important;
        }
    }
}

.bc-article--warning {
    color: red;
    background: #ebeef0;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    padding: 20px 0;
    text-align: center;
}

/* card-inline-small */
.bc-card.bc-card--inline.bc-card--small {
    .block-group {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        & > .block-group {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: var(--wp--preset--spacing--40);
            width: 66.33%;
        }
        & > a {
            width: 33.34%;
        }
    }
    h2 {
        font-size: var(--wp--preset--font-size--large);
    }
    img {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--x-small);
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
}

/* card-inline-medium */
.bc-card.bc-card--inline.bc-card--medium {
    .block-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        @media (min-width: 600px) {
            flex-wrap: nowrap;
        }
        & > .block-group {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: var(--wp--preset--spacing--40);
            width: 100%;
            @media (min-width: 600px) {
                width: 50%;
            }
        }
        & > a {
            width: 100%;
            @media (min-width: 600px) {
                width: 50%;
            }
        }
    }
    h2 {
        font-size: var(--wp--preset--font-size--large);
    }
    img {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--x-small);
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
}

/* card-inline-small-flipped */
.bc-card.bc-card--inline.bc-card--small.bc-card-flipped {
    .block-group {
        justify-content: space-between;
        & > .block-group {
            width: 66.33%;
        }
        & > a {
            width: 33.34%;
        }
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
    img {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* card-overlay-medium */
.bc-card.bc-card--overlay.bc-card--medium {
    height: 100%;
    .block-group {
        display: flex;
        flex-direction: column;
        color: var(--wp--preset--color--white);
    }
    .wp-block-cover {
        height: 100%;
        position: relative;
        &::before {
            content: "";
            position: absolute;
            inset: 0;
            background: #000;
            opacity: 0.2;
        }
        .wp-block-cover__inner-container {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            margin-left: var(--wp--preset--spacing--40);
            width: calc(100% - (var(--wp--preset--spacing--40) * 2));
        }
        img {
            display: block;
            width: 100%;
        }
    }
    a {
        color: var(--wp--preset--color--white);
        &:hover {
            border-color: var(--wp--preset--color--white);
        }
    }
    h2 {
        font-size: var(--wp--preset--font-size--4-x-large);
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--small);
    }
    .bc-single-author {
        font-size: var(--wp--preset--font-size--x-small);
        display: flex;
        align-items: center;
        a {
            display: block;
            &:nth-child(1) {
                order: 2;
            }
            &:nth-child(2) {
                order: 1;
            }
        }
    }
}

/* card-stack-medium */
.bc-card.bc-card--stack.bc-card--medium {
    .block-group {
        display: flex;
        flex-direction: column;
    }
    h2 {
        font-size: var(--wp--preset--font-size--4-x-large);
    }
    p {
        font-size: var(--wp--preset--font-size--large);
    }
    img {
        aspect-ratio: 16 / 9;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--small);
    }
    .bc-single-author {
        font-size: var(--wp--preset--font-size--x-small);
        display: flex;
        align-items: center;
        a {
            display: block;
            &:nth-child(1) {
                order: 2;
            }
            &:nth-child(2) {
                order: 1;
            }
        }
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
}

/* card-text-extrasmall */
.bc-card.bc-card--text.bc-card--extrasmall {
    display: flex;
    flex-direction: column;
    h2 {
        font-size: var(--wp--preset--font-size--medium);
    }
    .bc-single-category {
        font-size: var(--wp--preset--font-size--x-small);
    }
    .bc-single-author {
        font-size: var(--wp--preset--font-size--x-small);
        display: flex;
        align-items: center;
        a {
            display: block;
            &:nth-child(1) {
                order: 2;
            }
            &:nth-child(2) {
                order: 1;
            }
        }
    }
    .bc-single-date {
        font-size: var(--wp--preset--font-size--x-small);
    }
}
