.toplist-flagship-crypto__wrapper {
    margin: 24px 0;
}

.toplist-flagship-crypto__offers {
    display: flex;
    flex-direction: column;
    counter-reset: bm-toplist-flagship-crypto-counter;
    gap: 16px;
}

.toplist-flagship-crypto__offer {
    display: grid;
    padding: 16px;
    color: #211b2e;
    border: 1px solid #e8e8e8;
    background: #f6f8fb;
    gap: 0 16px;
    grid-auto-flow: row;
    grid-template-areas: 'logo main sidebar';
    grid-template-columns: 160px auto 160px;
    grid-template-rows: auto;
}

.toplist-flagship-crypto__offer-main {
    grid-area: main;
}

.toplist-flagship-crypto__offer-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    grid-area: sidebar;
}

.toplist-flagship-crypto__offer.hidden {
    display: none !important;
}

.toplist-flagship-crypto__offer.visible {
    display: grid !important;
}

.toplist-flagship-crypto__offer.first-visible,
.toplist-flagship-crypto__offer:first-child {
    border: 2px solid #e5c0da;
    background: #f3f3f3;
}

.toplist-flagship-crypto__show-more-btn {
    font-family: var(--bm-alt-font-family);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 24px auto 0;
    padding: 13px 16px;
    color: #060606;
    border: 2px solid #060606;
    border-radius: 7px;
    gap: 8px;
}

.toplist-flagship-crypto__show-more-btn:hover {
    cursor: pointer;
    color: #fff;
    background: #060606;
}

.toplist-flagship-crypto__show-more-btn:hover svg path {
    stroke: #fff;
}

.toplist-flagship-crypto__offer-logo-title-wrapper {
    position: relative;
    grid-area: logo;
}

.toplist-flagship-crypto__offer-logo img {
    width: 160px;
    height: 80px;
    object-fit: cover;
}

.toplist-flagship-crypto__offer-logo:before {
    font-family: var(--bm-alt-font-family);
    font-size: 16px;
    font-weight: 600;
    font-style: normal;
    line-height: 150%;
    position: absolute;
    z-index: 1;
    top: -17px;
    left: -17px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    content: counter(bm-toplist-flagship-crypto-counter);
    counter-increment: bm-toplist-flagship-crypto-counter;
    text-align: center;
    color: #211b2e;
    border: none;
    background: #f3f3f3;
}

.toplist-flagship-crypto__offer.first-visible .toplist-flagship-crypto__offer-logo:before,
.toplist-flagship-crypto__offer:first-child .toplist-flagship-crypto__offer-logo:before {
    background: #e5c0da;
}

.toplist-flagship-crypto__offer-brand-title {
    font-family: var(--bm-alt-font-family);
    font-size: 16px;
    font-weight: 700;
    font-style: normal;
    line-height: 150%;
    margin-top: 8px;
    color: #211b2e;
}

.toplist-flagship-crypto__offer-brand-title:empty {
    display: none;
}

.toplist-flagship-crypto__offer-title,
.toplist-flagship-crypto__offer-title p {
    font-family: var(--bm-alt-font-family);
    font-size: 18px;
    font-weight: 700;
    font-style: normal;
    line-height: 24px;
    margin-bottom: 0;
    color: #211b2e;
}

.toplist-flagship-crypto__offer-title {
    margin-bottom: 16px;
}

.toplist-flagship-crypto__offer-title:empty {
    display: none;
}

.toplist-flagship-crypto__offer-key-features ul {
    display: flex;
    flex-direction: column;
    margin: 0;
    list-style-type: none;
    gap: 4px;
}

.toplist-flagship-crypto__offer-key-features ul li {
    font-family: var(--bm-alt-font-family);
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    line-height: 20px;
    padding-bottom: 0 !important;
    padding-left: 20px;
    color: #211b2e;
    background: url('../images/tick-green.svg') left 5px no-repeat;
}

.toplist-flagship-crypto__offer-visit-link {
    font-family: var(--bm-alt-font-family);
    font-size: 12px;
    font-weight: 600;
    font-style: normal;
    line-height: 135%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 32px;
    margin-top: 0;
    text-align: center;
    vertical-align: middle;
    color: #fff;
    background-color: #591c7e;
}

.toplist-flagship-crypto__offer-visit-link:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 32px;
    content: '';
    background-color: #f6f8fb;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='32' viewBox='0 0 10 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0V22L10 32V0H0Z' fill='%23591C7E'/%3E%3C/svg%3E%0A");
}

.toplist-flagship-crypto__offer-visit-link:after {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 32px;
    content: '';
    background-color: #f6f8fb;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='32' viewBox='0 0 20 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 32V20L0 0V32H20Z' fill='%23591C7E'/%3E%3C/svg%3E%0A");
}

.toplist-flagship-crypto__offer:first-child .toplist-flagship-crypto__offer-visit-link:before,
.toplist-flagship-crypto__offer:first-child .toplist-flagship-crypto__offer-visit-link:after {
    background-color: #f3f3f3;
}

.toplist-flagship-crypto__offer-visit-link:hover {
    text-decoration: none;
    color: #fff;
}

.toplist-flagship-crypto__offer-rating {
    font-family: var(--bm-alt-font-family);
    font-size: 24px;
    font-weight: 700;
    font-style: normal;
    line-height: 135%;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: #211b2e;
}

.toplist-flagship-crypto__offer-rating img {
    width: 80px;
    height: 16px;
    object-fit: contain;
}

.toplist-flagship-crypto__offer-review-link {
    font-family: var(--bm-alt-font-family);
    font-size: 12px;
    font-weight: 600;
    font-style: normal;
    line-height: 135%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    text-align: center;
    color: #a72e83;
    gap: 8px;
}

.toplist-flagship-crypto__offer-review-link:after {
    position: relative;
    width: 10px;
    height: 12px;
    content: '';
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="12" viewBox="0 0 10 12" fill="none"><path d="M3 3L6 6L3 9V11L7 7V5L3 1V3Z" fill="%23A72E83"/></svg>')
        no-repeat right;
}

.toplist-flagship-crypto__offer-review-link:hover {
    text-decoration: none;
    color: #a72e83;
}

.toplist-flagship-crypto__offer .campaign__partner-label-wrapper {
    background-color: unset;
}

.toplist-flagship-crypto__show-only-on-mobile {
    display: none;
}

.toplist-flagship-crypto__header-inner {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

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

.toplist-flagship-crypto__filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    order: 1;
    margin-bottom: 0 !important;
    gap: 8px;
}

.toplist-flagship-crypto__filter-tag {
    font-family: var(--bm-font-family);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    height: 28px;
    padding: 0 12px !important;
    cursor: pointer;
    user-select: none;
    color: #2e83a7;
    border: 1px solid #dfeff6;
}

.toplist-flagship-crypto__filter-tag.filter-tag-active {
    color: #fff;
    border-color: #2e83a7;
    background: #2e83a7;
}

.toplist-flagship-crypto__sort-wrapper {
    position: relative;
    flex-shrink: 0;
    order: 2;
}

.toplist-flagship-crypto__sort-btn {
    font-family: var(--bm-font-family);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    cursor: pointer;
    user-select: none;
    color: #2e83a7;
    border: 1px solid #dfeff6;
    background-color: #fff;
    gap: 4px;
}

.toplist-flagship-crypto__sort-btn:after {
    position: relative;
    width: 16px;
    height: 16px;
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.4 6.40039L8 8.80039L5.6 6.40039H4L7.2 9.60039H8.8L12 6.40039H10.4Z' fill='%232E83A7'/%3E%3C/svg%3E");
}

.toplist-flagship-crypto__sort-wrapper.selected .toplist-flagship-crypto__sort-btn,
.toplist-flagship-crypto__sort-wrapper.opened .toplist-flagship-crypto__sort-btn {
    border: 1px solid #dfeff6;
    background-color: #dfeff6;
}

.toplist-flagship-crypto__sort-options {
    position: absolute;
    z-index: 10;
    top: 32px;
    right: 0;
    display: none;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-width: 160px;
    border: 1px solid #dfeff6;
    background: #fff;
    box-shadow: 0 4px 13px #0000000c;
    isolation: isolate;
}

.toplist-flagship-crypto__sort-wrapper.opened .toplist-flagship-crypto__sort-options {
    display: flex;
}

.toplist-flagship-crypto__sort-option {
    font-family: var(--bm-font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    display: block;
    width: 100%;
    padding: 8px 16px;
    cursor: pointer;
    user-select: none;
    color: #737373;
}

.toplist-flagship-crypto__sort-option.active,
.toplist-flagship-crypto__sort-option:hover {
    color: #2e83a7;
    background-color: #dfeff6;
}

@media (max-width: 991px) {
    .toplist-flagship-crypto__show-only-on-mobile {
        display: block;
    }

    .toplist-flagship-crypto__show-only-on-desktop {
        display: none;
    }

    .toplist-flagship-crypto__offer {
        padding: 16px;
        gap: 16px;
        grid-template-areas:
            'logo'
            'main'
            'sidebar';
        grid-template-columns: 1fr;
    }

    .toplist-flagship-crypto__offer-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px 0;
    }

    .toplist-flagship-crypto__offer-logo img {
        width: 100%;
        height: 120px;
    }

    .toplist-flagship-crypto__offer-brand-title {
        margin-top: 16px;
    }

    .toplist-flagship-crypto__offer-key-features {
        padding-top: 0;
    }

    .toplist-flagship-crypto__offer-rating {
        display: flex;
        flex-direction: row;
        width: 50%;
        gap: 8px;
    }

    .toplist-flagship-crypto__offer-review-link {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 50%;
        margin-top: 0;
    }

    .toplist-flagship-crypto__offer-visit-link {
        width: 100%;
    }

    .toplist-flagship-crypto__header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .toplist-flagship-crypto__filter-wrapper {
        order: 2;
    }

    .toplist-flagship-crypto__sort-wrapper {
        order: 1;
    }

    .toplist-flagship-crypto__filter {
        overflow-x: scroll;
        flex-wrap: nowrap;
        width: 100vw;
        margin: 0 -16px !important;
        padding: 0 16px !important;
    }

    .toplist-flagship-crypto__filter::-webkit-scrollbar {
        display: none;
    }

    .toplist-flagship-crypto__sort-options {
        right: unset;
        left: 0;
    }
}
