@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap');

.toplist-escapist__wrapper {
    margin: 24px 0;
}

.toplist-escapist__offers {
    display: flex;
    flex-direction: column;
    counter-reset: toplist-escapist-counter 0;
    gap: 8px;
}

.toplist-escapist__filter-tags-json {
    box-sizing: border-box;
}

.toplist-escapist__filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    margin: 16px 0;
    gap: 8px;
}

.toplist-escapist__filter-tag {
    font-family: Rubik, sans-serif;
    font-size: 16px;
    font-weight: 600;
    font-style: normal;
    line-height: 24px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    height: 48px;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    color: #0c1434;
    border: 1px solid #0c1434;
    border-radius: 4px;
    background: #fff;
}

body.theme-dark .toplist-escapist__filter-tag {
    color: #fff;
    border-color: #94a0ff;
    background: #040629;
}

.toplist-escapist__filter-tag.filter-tag-active {
    color: #fff;
    border: 2px solid #0c1434;
    background: #0c1434;
}

body.theme-dark .toplist-escapist__filter-tag.filter-tag-active {
    color: #0c1434;
    border-color: #f3f2ff;
    background: #f3f2ff;
}

.toplist-escapist__offer.hidden {
    display: none;
}

.toplist-escapist__offer-inner {
    position: relative;
    display: grid;
    align-items: center;
    counter-increment: toplist-escapist-counter 1;
    border: 1px solid #e0dfed;
    border-radius: 16px 4px 4px 16px;
    background: #fff;
    grid-template-areas:
        'logo title'
        'logo rating'
        'logo actions';
    grid-template-columns: 236px auto;
    grid-template-rows: auto;
}

body.theme-dark .toplist-escapist__offer-inner {
    border: 1px solid #292b4b;
    background: #0c1434;
}

.toplist-escapist__offer-inner:before {
    font-family: Rubik, sans-serif;
    font-size: 18px;
    font-weight: 600;
    font-style: normal;
    line-height: 24px;
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    content: counter(toplist-escapist-counter);
    text-align: center;
    color: #fff;
    border-radius: 15px 0 4px;
    background: #4856a9;
}

body.theme-dark .toplist-escapist__offer-inner:before {
    color: #101019;
    background: #94a0ff;
}

.toplist-escapist__offer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    grid-area: logo;
}

.toplist-escapist__offer-logo img {
    width: 236px;
    height: 113px;
    object-fit: contain;
}

.toplist-escapist__offer-title {
    font-family: Rubik, sans-serif;
    font-size: 23px;
    font-weight: 700;
    font-style: normal;
    line-height: 33px;
    padding: 24px 24px 0;
    color: #0c1434;
    grid-area: title;
}

body.theme-dark .toplist-escapist__offer-title {
    color: #fff;
}

.toplist-escapist__offer-rating-wrapper {
    display: flex;
    align-items: center;
    padding: 8px 24px 0;
    gap: 8px;
    grid-area: rating;
}

.toplist-escapist__offer-rating-value {
    font-family: Rubik, sans-serif;
    font-size: 20px;
    font-weight: 700;
    font-style: normal;
    line-height: 28px;
    display: flex;
    align-items: center;
    height: 32px;
    padding: 4px 12px;
    color: #06955a;
    border-radius: 100px;
    background: #ebf9ee;
}

body.theme-dark .toplist-escapist__offer-rating-value {
    color: #7adeb4;
    background: #224939;
}

.toplist-escapist__offer-rating-value span {
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    position: relative;
    top: 2px;
}

.toplist-escapist__offer-rating-value:after {
    width: 16px;
    height: 16px;
    margin-left: 4px;
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' viewBox='0 0 16 17' fill='none'%3E%3Cpath d='M12 14.8446H4.66671V6.1779L9.33337 1.51123L10.1667 2.34456C10.2445 2.42234 10.3084 2.5279 10.3584 2.66123C10.4084 2.79456 10.4334 2.92234 10.4334 3.04456V3.2779L9.70004 6.1779H14C14.3556 6.1779 14.6667 6.31123 14.9334 6.5779C15.2 6.84456 15.3334 7.15567 15.3334 7.51123V8.84456C15.3334 8.92234 15.3223 9.00567 15.3 9.09456C15.2778 9.18345 15.2556 9.26679 15.2334 9.34456L13.2334 14.0446C13.1334 14.2668 12.9667 14.4557 12.7334 14.6112C12.5 14.7668 12.2556 14.8446 12 14.8446ZM6.00004 13.5112H12L14 8.84456V7.51123H8.00004L8.90004 3.84456L6.00004 6.74456V13.5112ZM4.66671 6.1779V7.51123H2.66671V13.5112H4.66671V14.8446H1.33337V6.1779H4.66671Z' fill='%2306955A'/%3E%3C/svg%3E");
}

.toplist-escapist__offer-label-highlight {
    font-family: Rubik, sans-serif;
    font-size: 14px;
    font-weight: 600;
    font-style: normal;
    line-height: 22px;
    color: #06955a;
}

body.theme-dark .toplist-escapist__offer-label-highlight {
    color: #7adeb4;
}

.toplist-escapist__offer-actions {
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 32px 24px 24px;
    gap: 16px;
    grid-area: actions;
}

.toplist-escapist__offer-coupon-code-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
    height: 48px;
    padding: 0 16px;
    cursor: pointer;
    border: 1px solid #f3f2ff;
    border-radius: 4px;
    background: #f3f2ff;
    gap: 12px;
}

.toplist-escapist__offer-coupon-code-wrapper:hover {
    border-color: #4856a9;
}

body.theme-dark .toplist-escapist__offer-coupon-code-wrapper {
    border-color: #292b4b;
    background: #292b4b;
}

.toplist-escapist__offer-coupon-code {
    font-family: Rubik, sans-serif;
    font-size: 18px;
    font-weight: 400;
    font-style: normal;
    line-height: 32px;
    width: 100%;
    text-align: center;
    color: #4856a9;
}

body.theme-dark .toplist-escapist__offer-coupon-code {
    color: #e0dfed;
}

.toplist-escapist__offer-coupon-code-btn {
    font-family: Rubik, sans-serif;
    font-size: 16px;
    font-weight: 600;
    font-style: normal;
    line-height: 22px;
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 12px;
    text-align: center;
    text-transform: uppercase;
    color: #3a4483;
    border-left: 0.5px solid #94a0ff;
}

body.theme-dark .toplist-escapist__offer-coupon-code-btn {
    color: #94a0ff;
    border-left-color: #3a4483;
}

.toplist-escapist__offer-coupon-code-wrapper:hover .toplist-escapist__offer-coupon-code-btn {
    color: #0c1434;
}

body.theme-dark .toplist-escapist__offer-coupon-code-wrapper:hover .toplist-escapist__offer-coupon-code-btn {
    color: #f3f2ff;
}

.toplist-escapist__offer-cta-btn {
    font-family: Rubik, sans-serif;
    font-size: 18px;
    font-weight: 600;
    font-style: normal;
    line-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    height: 48px;
    padding: 16px;
    text-align: center;
    color: #fff;
    border-radius: 4px;
    background: #4856a9;
}

.toplist-escapist__offer-cta-btn:hover {
    text-decoration: none;
    color: #fff;
    background: #3a4483;
}

body.theme-dark .toplist-escapist__offer-cta-btn {
    color: #101019;
    background: #94a0ff;
}

body.theme-dark .toplist-escapist__offer-cta-btn:hover {
    color: #101019;
    background: #4856a9;
}

.toplist-escapist__offer-terms,
.toplist-escapist__offer-terms p {
    font-family: Rubik, sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 14px;
    margin-top: 4px;
    color: #5a5b76;
}

body.theme-dark .toplist-escapist__offer-terms,
body.theme-dark .toplist-escapist__offer-terms p {
    color: #8f8ea3;
}

.toplist-escapist__show-more-btn {
    font-family: Rubik, sans-serif;
    font-size: 16px;
    font-weight: 600;
    font-style: normal;
    line-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 48px;
    margin: 16px auto 0;
    padding: 16px;
    text-align: center;
    color: #0c1434;
    border: 2px solid #0c1434;
    border-radius: 4px;
    background: #fff;
}

.toplist-escapist__show-more-btn:hover {
    cursor: pointer;
    border-color: #e0dfed;
    background: #e0dfed;
}

body.theme-dark .toplist-escapist__show-more-btn {
    color: #e0dfed;
    border-color: #94a0ff;
    background: #040629;
}

body.theme-dark .toplist-escapist__show-more-btn:hover {
    border-color: #292b4b;
    background: #292b4b;
}

@media screen and (width <= 991px) {
    .toplist-escapist__filter-wrapper {
        overflow-x: scroll;
        flex-wrap: nowrap;
        width: 100vw;
        margin: 0 -16px 16px;
        padding: 0 16px;
    }

    .toplist-escapist__filter-wrapper::-webkit-scrollbar {
        display: none;
    }

    .toplist-escapist__offer-inner {
        padding: 16px;
        border-radius: 4px;
        gap: 16px 12px;
        grid-template-areas:
            'logo title'
            'rating rating'
            'actions actions';
        grid-template-columns: 72px auto;
    }

    .toplist-escapist__offer-inner:before {
        font-size: 16px;
        font-weight: 700;
        line-height: 22px;
        width: 32px;
        height: 32px;
        border-radius: 3px 0 4px;
    }

    .toplist-escapist__offer-logo {
        height: 72px;
        border-radius: 10.667px;
    }

    .toplist-escapist__offer-logo img {
        width: 72px;
        height: 34.56px;
        object-fit: contain;
    }

    .toplist-escapist__offer-title {
        font-size: 18px;
        font-weight: 600;
        line-height: 24px;
        padding: 0;
    }

    .toplist-escapist__offer-rating-wrapper {
        padding: 0;
    }

    .toplist-escapist__offer-actions {
        flex-direction: column;
        padding: 8px 0 0;
        gap: 8px;
    }

    .toplist-escapist__offer-coupon-code-wrapper {
        width: 100%;
    }

    .toplist-escapist__offer-cta-btn {
        font-weight: 700;
        line-height: 26px;
        min-width: 100%;
    }

    .toplist-escapist__offer-terms,
    .toplist-escapist__offer-terms p {
        font-size: 10px;
        line-height: 12px;
    }
}
