@import '../../../../assets/scss/abstracts/variables';
@import '../../../../assets/scss/abstracts/mixins';

.rdg-blocks .rdg-posts-ajax {
    width: calc(var(--vw, 1vw) * 100);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 99.55vw;

    .container.content {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding-left: 20px;
        padding-right: 20px;

        #wait {
            display: none;
            position: fixed;
            z-index: 1000;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            background: $color-wait url('../../assets/images/spinner.gif') 50% 50% no-repeat;
        }
        
        .filter {
            gap: 1rem;
            display: flex;
            padding-bottom: 2rem;

            @media (max-width: $breakpoint-md) {
                & {
                    flex-direction: column;
                }
            }

            .categories {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;

                @media (max-width: $breakpoint-md) {
                    & {
                        flex-direction: column;
                    }
                }
                    
                .select {
                    @media (max-width: $breakpoint-md) {
                        & {
                            width: 80% !important;
                        }
                    }

                    @media (max-width: $breakpoint-sm) {
                        & {
                            width: 100% !important;
                        }
                    }
                }

                .select {
                    width: 40%;
                    display: flex;
                    position: relative;
                    border-radius: .5rem;
                    overflow: hidden;
                    box-shadow: 1px 5px 14px 0px rgb(0 0 0 / 15%);
                    min-height: 2rem;

                    &:first-of-type {
                        margin-right: 2rem;

                        @media (max-width: $breakpoint-md) {
                            & {
                                margin-right: 0;
                                margin-bottom: 1rem;
                            }
                        }
                    }
            
                    &::after {
                        font-family: 'Font Awesome 5 Free';
                        content: '\f078';
                        display: flex;
                        position: absolute;
                        align-items: center;
                        justify-content: center;
                        top: 0;
                        right: 0;
                        width: 3rem;
                        height: calc(100% - .8rem);
                        color: var(--color-white);
                        background-color: var(--color-primary-dark-light);
                        pointer-events: none;
                        margin: .4rem;
                        border-radius: .5rem;
                    }
            
                    select {
                        border: 0;
                        outline: 0;
                        appearance: none;
                        box-shadow: none;
                        flex: 1;
                        padding: 14px;
                        cursor: pointer;
                        background-image: none;
                        color: var(--color-primary);
                        background-color: var(--color-white);
                        font-weight: 700;
                
                        /* Remove IE arrow */
                        &::-ms-expand {
                            display: none;
                        }
            
                        option {
                            font-weight: 700;
                        }
                    }
                }
            }
        }

        @include title;

        .posts {
            .message {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 1.5rem;
                border-radius: .5rem;
                background-color: var(--rdg-picks-vs-message-bg);
                border: 1px solid var(--rdg-picks-vs-message-border);

                span {
                    text-align: center;
                    color: var(--rdg-picks-vs-message);
                }
            }
    
            .items {
                width: 100%;
                display: flex;
                gap: 1.5rem;
                flex-wrap: wrap;
                justify-content: space-evenly;
    
                .message {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    padding: 1.5rem;
                    border-radius: .5rem;
                    background-color: var(--rdg-picks-vs-message-bg);
                    border: 1px solid var(--rdg-picks-vs-message-border);
    
                    span {
                        text-align: center;
                        color: var(--rdg-picks-vs-message);
                    }
                }
    
                .item {
                    width: 25rem;

                    @media (max-width: 1300px) {
                        & {
                            width: 35rem;
                        }
                    }

                    @media (max-width: 1200px) {
                        & {
                            width: 31rem;
                        }
                    }

                    @media (max-width: 1100px) {
                        & {
                            width: 28rem;
                        }
                    }

                    @media (max-width: 965px) {
                        & {
                            width: 25rem;
                        }
                    }

                    @media (max-width: 910px) {
                        & {
                            width: 21rem;
                        }
                    }

                    @media (max-width: $breakpoint-md) {
                        & {
                            width: 100%;
                        }
                    }
    
                    .image {
                        display: flex;
                        flex-direction: column;
                        justify-content: flex-end;
                        height: 16rem;
                        max-height: 16rem;
                        background-size: cover;
                        background-position: center top;
                        background-repeat: no-repeat;
    
                        @media (max-width: $breakpoint-md) {
                            & {
                                height: 16rem;
                                max-height: 16rem;
                            }
                        }
    
                        @media (max-width: $breakpoint-sm) {
                            & {
                                height: 14rem;
                                max-height: 14rem;
                            }
                        }
                    }
    
                    footer {
                        display: flex;
                        flex-direction: column;
                        margin-top: .5rem;

                        @include link-style;

                        a:hover {
                            color: $color-primary-dark-light !important;
                        }

                        .footer-title {
                            line-height: 28px;
                            display: -webkit-box;
                            -webkit-line-clamp: 3;
                            -webkit-box-orient: vertical;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            margin-bottom: .3rem;
    
                            @media (max-width: $breakpoint-md) {
                                & {
                                    -webkit-line-clamp: 4;
                                }
                            }
                        }

                        .meta {
                            color: var(--color-posts-list-date);
                        }
    
                        .footer-description {
                            margin-top: .5rem;
                            color: var(--color-posts-list-description);
    
                            display: -webkit-box;
                            -webkit-line-clamp: 3;
                            -webkit-box-orient: vertical;
                            overflow: hidden;
                            text-overflow: ellipsis;
    
                            @media (max-width: $breakpoint-md) {
                                & {
                                    -webkit-line-clamp: 4;
                                }
                            }
                        }
    
                        a {
                            margin-top: .8rem;
                        }
                    }
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-posts-ajax {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}
