.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;
    grid-template-columns: 160px auto 160px;
    grid-template-rows: auto;
    grid-auto-flow: row;
    gap: 0 16px;
    grid-template-areas:
    "logo main sidebar";
}

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

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

.toplist-flagship-crypto__offers.with-default-offers .toplist-flagship-crypto__offer:not(.default-offer) {
    display: none;
}

.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: #FFFFFF;
    background: #060606;
}

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

.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 a {
    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-icon {
    width: 10px;
    height: 12px;
    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 a:hover {
    text-decoration: none;
}

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

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

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

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

.toplist-flagship-crypto__filter li {
    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 li::marker {
    content: none;
}

.toplist-flagship-crypto__filter li.active {
    color: #FFF;
    border-color: #2E83A7;
    background: #2E83A7;
}

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

.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.selected .toplist-flagship-crypto__sort-btn,
.toplist-flagship-crypto__sort.active .toplist-flagship-crypto__sort-btn {
    border: 1px solid #DFEFF6;
    background-color: #DFEFF6;
}

.toplist-flagship-crypto__sort-content {
    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 rgba(0, 0, 0, 0.05);
    isolation: isolate;
}

.toplist-flagship-crypto__sort.active .toplist-flagship-crypto__sort-content {
    display: flex;
}

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

.toplist-flagship-crypto__sort-item.active,
.toplist-flagship-crypto__sort-item:hover {
    color: #2E83A7;
    background-color: #DFEFF6;
}

@media screen and (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;
        grid-template-columns: 1fr;
        gap: 16px;
        grid-template-areas:
        "logo"
        "main"
        "sidebar";
    }

    .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__head {
        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-content {
        right: unset;
        left: 0;
    }
}
