@import "@cnbritain/merlin-www-common:brides";
@import "@cnbritain/merlin-www-card:brides";

@import "../wireframe/wireframe";

.c-card-list--a-recommended,
.c-card-list--c-curated,
.c-card-list--c-tag,
.c-card-list--c-video-articles,
.c-card-list--mag-articles,
.c-card-list--v-genre-articles,
.c-card-list--s-results {
    margin: -21px -12px;

    .c-card-list__item {
        display: inline-block;
        padding: 0 12px;
        margin: 21px 0;
        width: 100%;

        @include two-column-size() {
            width: 50%;
        }

        @include four-column-size() {
            width: 25%;
        }
    }
}

.c-card-list--c-splash {
    margin: -12px -12px;

    .c-card-list__item {
        display: inline-block;
        padding: 0 12px;
        margin: 12px 0;
        vertical-align: middle;
        width: 100%;

        @include two-column-size() {
            width: 50%;
        }

        @include four-column-size() {
            width: 25%;
        }
    }
}

.c-card-list--tg-articles {
    margin: -21px -12px;

    .c-card-list__item {
        display: inline-block;
        padding: 0 12px;
        margin: 21px 0;
        width: 100%;
    }

    @include two-column-size() {
        margin: -8px -12px;

        .c-card-list__item {
            margin: 8px 0;
            padding: 0 12px;

            .c-card {
                border-top: 1px solid $ballet-grey;
                padding-top: 16px;
            }

            &:first-child {
                .c-card {
                    border-top: none;
                    padding-top: 0;
                }
            }
        }
    }
}

.c-card-list--tg-header-articles,
.c-card-list--v-articles {
    margin: -21px -12px;

    .c-card-list__item {
        display: inline-block;
        padding: 0 12px;
        margin: 21px 0;
        width: 100%;

        @include two-column-size() {
            width: 50%;
        }

        @include four-column-size() {
            width: 33.33333%;
        }
    }
}

.c-card-list--c-magazine-articles {
    margin: -12px -12px;

    .c-card-list__item {
        display: inline-block;
        padding: 0 12px;
        margin: 12px 0;
        width: 100%;
    }
}

.c-card-list--v-related-articles {
    margin: -8px -12px;

    .c-card-list__item {
        display: inline-block;
        padding: 0 12px;
        margin: 8px 0;
        width: 100%;

        .c-card__images {
            &:after {
                @include font("SOLEIL", 10px, 400, 12px, 120);
                color: $white;
                content: "Now Playing";
                left: 50%;
                opacity: 0;
                position: absolute;
                text-transform: uppercase;
                top: 50%;
                transform: translate(-50%, -50%);
                transition-duration: 300ms;
                white-space: nowrap;
            }
        }

        .c-card__image {
            &:after {
                background-color: rgba($black, 0.25);
                bottom: 0;
                content: "";
                height: 100%;
                left: 0;
                opacity: 0;
                position: absolute;
                right: 0;
                top: 0;
                transition-duration: 300ms;
                width: 100%;
            }
        }

        &.is-active {
            .c-card__images {
                &:after {
                    opacity: 1;
                }
            }

            .c-card__image {
                &:after {
                    opacity: 1;
                }
            }
        }
    }
}

.c-card-list--mag-magazines {
    margin: -22px -8px;

    @include four-column-size() {
        margin: -34px -12px;
    }

    .c-card-list__item {
        display: inline-block;
        padding: 0 8px;
        margin: 22px 0;
        width: 50%;

        @include four-column-size() {
            margin: 34px 0;
            padding: 0 12px;
            width: 25%;
        }
    }
}

.c-card-list--c-contributors {
    .c-card-list__item {
        display: inline-block;
        margin: 0 0 21px 0;
        width: 100%;
    }

    @include tablet-size {
        .c-card-list__item {
            width: 33.33%;
        }
    }

}
