.ace-popular-posts {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.ace-popular-posts .wp-block-ace-popular-result {
    position: relative;
    counter-increment: step-counter;
    padding: 1rem 0;
    border-bottom: 1px solid var(--wp--preset--color--lightgrey);
    clear: both;
    min-height: 75px;
}

.ace-popular-posts .wp-block-ace-popular-result span {
    font-size: var(--wp--preset--font-size--small);
    line-height: 1;
    display: block;
}

.ace-popular-posts .wp-block-ace-popular-result span a {
    text-decoration: none;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image {
    float: left;
    max-width: 100%;
    margin: 0;
    border-radius: .5rem !important;
    overflow: hidden;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image img {
    border-radius: .5rem !important;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image figure {
    position: relative;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image .count {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--wp--preset--color--background);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -1px;
    pointer-events: none;
    text-shadow: 0 2px 5px var(--wp--preset--color--tertiary);
    width: 100%;
    text-align: center;
    font-family: var(--wp--preset--font-family--barlow-semi-condensed) !important;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image .count.rank-1,
.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image .count.rank-2,
.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image .count.rank-3 {
    font-size: 2.65rem;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image .count.rank-1 {
    color: #ffd700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image .count.rank-2 {
    color: #c0c0c0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image .count.rank-3 {
    color: #cd7f32;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image:after {
    content: "";
    display: block;
    background: linear-gradient(135deg, var(--wp--preset--color--tertiary) 0%, rgba(0, 0, 0, 0) 100%);
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    opacity: .5;
    border-top-left-radius: .25rem !important;
    pointer-events: none;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-post-featured-image a {
    height: auto;
}

.ace-popular-posts .wp-block-ace-popular-result .wp-block-columns {
    margin: 0;
    padding: 0;
    gap: .5rem !important;
}

.ace-popular-posts .wp-block-ace-popular-result h3 {
    margin: 0 0 .25rem;
}

.ace-popular-posts .wp-block-ace-popular-result h3 a {
    text-decoration: none;
    line-height: 1;
    color: var(--wp--preset--color--tertiary);
}

.ace-popular-posts .wp-block-ace-popular-result h3 a:hover {
    color: var(--wp--preset--color--primary);
}

.ace-popular-posts .wp-block-ace-popular-result .meta-bits {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem !important;
    align-items: center !important;
    width: auto !important;
    margin-top: .25rem !important;
}

.ace-popular-posts .wp-block-ace-popular-result .meta-bits > * {
    margin-left: 0 !important;
    padding: 0 !important;
    height: auto !important;
    max-height: none !important;
    line-height: 1.2 !important;
    border-radius: 0 !important;
    white-space: nowrap;
}

.ace-popular-posts .wp-block-ace-popular-result .meta-bits p {
    white-space: nowrap;
    opacity: .6;
}

.ace-popular-posts .wp-block-ace-popular-result .meta-bits .wp-block-post-author-name,
.ace-popular-posts .wp-block-ace-popular-result .meta-bits .wp-block-post-terms,
.ace-popular-posts .wp-block-ace-popular-result .meta-bits .wp-block-post-date,
.ace-popular-posts .wp-block-ace-popular-result .meta-bits .taxonomy-category {
    white-space: nowrap;
    margin: 0 !important;
}

.custom-tabs-slider > * > *.sidebar .ace-popular-posts {
    border-top: none !important;
}

.custom-tabs-slider > * > *.sidebar .ace-popular-posts li:first-child {
    border-top: none !important;
}

.custom-tabs-slider > * > *.sidebar .ace-popular-posts hr {
    display: none !important;
}

@media (max-width: 781px) {
    .ace-popular-posts .wp-block-ace-popular-result .meta-bits {
        flex-wrap: wrap !important;
        gap: .2rem .4rem !important;
        width: auto !important;
    }

    .ace-popular-posts .wp-block-ace-popular-result .meta-bits > *:not(:first-child) {
        margin-left: 0 !important;
    }

    .ace-popular-posts .wp-block-ace-popular-result .meta-bits .time-bits,
    .ace-popular-posts .wp-block-ace-popular-result .meta-bits .readtime-bits {
        order: initial;
        margin-left: 0 !important;
    }
}

@media only screen and (min-width: 1240px) {
    body.beta .ace-popular-posts {
        margin: 0 !important;
        padding: 0 !important;
    }

    body.beta .ace-popular-posts .wp-block-ace-popular-result {
        padding: 0;
        margin: 0;
    }

    body.beta .ace-popular-posts .wp-block-ace-popular-result .wp-block-columns {
        padding: .5rem !important;
        margin: 0 !important;
    }
}
