:root {
    --text-color: #212529;
    --dropdown-color: #6c757d;
    --background-color: #fafafafa;
}

.movies-list {
    height: calc(100vh - 3em);
    overflow-x: hidden;
    position: relative;
    top: 3em;
}

.similar-cards-row {
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
}

.language-icon {
    margin-left: 2em;
    width: 1.5em;
    height: 1.125em;
    transition: 0.3s;
    cursor: pointer;
}

.language-icon:hover {
    transform: scale(1.5);
}

@media (max-width: 576px) {
    /* small devices, landscape phones up to 576px */
    .language-icon {
        margin-left: 0.5em;
    }
    .similar-cards-row {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    /* small devices, landscape phones, tablets up to 576px */
    .col-lg-2 {
        margin-left: 2rem !important;
        margin-right: 2rem !important;
    }
}

.no-results {
    font-size: 1.3em;
    margin: 0 auto;
    display: table;
    position: relative;
}

.movie-item {
    line-height: 3ex;
    /* 3ex for each visible line */
    height: 3ex;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-overview {
    position: relative;
    line-height: 2.5ex;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 2.5ex for each visible line */
    height: 10ex;
    transition: 0.3s;
}

.movie-overview:after {
    position: absolute;
    bottom: 0;
    height: 2.5ex;
    right: 0;
    width: 70%;
    content: "";
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%);
}

@supports(-webkit-line-clamp:4) {
    .movie-overview {
        height: 10ex;
        line-height: 2.5ex;
        overflow: hidden;
        text-overflow: ellipsis;
        /* 2.5ex for each visible line */
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        transition: 0.3s;
    }
    .movie-overview:after {
        display: none;
    }
}

.card-hoverable {
    width: 100%;
    color: var(--text-color);
    transition: 0.3s;
}

.card-hoverable:hover {
    cursor: pointer;
    transform: scale(1.05);
    box-shadow: 0 8px 8px 0 rgba(0, 0, 0, .14), 0 12px 4px -2px rgba(0, 0, 0, .2), 0 4px 20px 0px rgba(0, 0, 0, .12)
}

.card-hoverable:hover>.card-body>.card-title {
    transform: scale(0.953);
}

.card-hoverable:hover>.card-body>.movie-overview {
    transform: scale(0.953);
}

.card-opened-icon {
    width: 1em;
    height: 1em;
    position: absolute;
    bottom: 0.5em;
    right: 0;
    left: 0;
    display: none;
    color: #2962FF;
    opacity: 0.5;
}

.col-lg-2>.card:hover>.card-body>.card-items-container {
    /* keep card-items' scale the same as before hover */
    transform: scale(0.953);
}

.main-card-title {
    position: relative;
    /* 2 lines */
    height: 2.4em;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: 0.3s;
}

.main-card-title:after {
    position: absolute;
    bottom: 0;
    height: 1.2em;
    right: 0;
    width: 70%;
    content: "";
    /* gradient for clamping text */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%);
}

@supports(-webkit-line-clamp: 2) {
    .main-card-title {
        /* 2 lines */
        /* webkit for clamping text */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .main-card-title:after {
        display: none;
    }
}

.card-items-container {
    transition: 0.3s;
}

.card-icon {
    width: 3ex;
    height: 3ex;
    margin-right: 1em;
}

.movie-dropdown {
    width: 100%;
    justify-content: space-around;
}

.review {
    position: relative;
    text-align: left;
    overflow: hidden;
    line-height: 2.5ex;
    text-overflow: ellipsis;
    /* 2.5ex for each visible line */
    height: 15ex;
}

.review:after {
    position: absolute;
    bottom: 0;
    height: 2.5ex;
    right: 0;
    width: 70%;
    content: "";
    /* gradient for clamping text */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, var(--dropdown-color) 50%);
}

.review-whole {
    text-align: left;
    overflow: hidden;
    line-height: 2.5ex;
    text-overflow: ellipsis;
    /* 2.5ex for each visible line */
}

@supports(-webkit-line-clamp:6) {
    .review {
        /* 2.5ex for each visible line */
        height: unset;
        /* webkit for clamping text */
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
    }
    .review:after {
        display: none;
    }
}

.search-clear-icon {
    cursor: pointer;
    transition: 0.3s;
    opacity: 0;
}

.search-clear-icon:hover {
    transform: scale(1.5);
}