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

.cbm-presale-toplist__wrapper {
    margin-bottom: 32px;
}

.cbm-presale-toplist__offers-list {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.cbm-presale-toplist__offer {
    position: relative;
    display: grid;
    align-items: start;
    padding: 24px 0 11px 170px;
    background: #fff;
    gap: 30px;
    grid-template-areas: 'main extra info';
    grid-template-columns: auto 164px 220px;
    grid-template-rows: 1fr;
}

.dark-mode .cbm-presale-toplist__offer {
    background: #171515;
}

.cbm-presale-toplist__offer:before {
    position: absolute;
    top: -3px;
    right: 0;
    width: calc(100% - 72px);
    height: 8px;
    content: '';
    border-radius: 4px;
    background: #f5f5f5;
}

.dark-mode .cbm-presale-toplist__offer:before {
    background: #242424;
}

.cbm-presale-toplist__offer-logo {
    position: absolute;
    top: -8px;
    width: 144px;
    height: 144px;
    min-height: 144px;
    border-radius: 100%;
}

.cbm-presale-toplist__offer-logo img {
    width: 144px;
    height: 144px;
    border-radius: inherit;
    object-fit: contain;
}

.cbm-presale-toplist__offer-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    grid-area: main;
}

.cbm-presale-toplist__offer-title,
.cbm-presale-toplist__offer-title a {
    font-family: Chivo, sans-serif;
    font-size: 24px;
    font-weight: 700;
    font-style: normal;
    line-height: 32px;
    letter-spacing: -0.24px;
    text-transform: capitalize;
    color: #242424;
}

.dark-mode .cbm-presale-toplist__offer-title,
.dark-mode .cbm-presale-toplist__offer-title a {
    color: #fff;
}

.cbm-presale-toplist__offer-name {
    font-family: Chivo, sans-serif;
    font-size: 20px;
    font-weight: 700;
    font-style: normal;
    line-height: 122%;
    text-transform: capitalize;
    color: #424242cc;
}

.dark-mode .cbm-presale-toplist__offer-name {
    color: #ffffff8e;
}

.cbm-presale-toplist__offer-label {
    font-family: Sora, sans-serif;
    font-size: 12px;
    font-weight: 600;
    font-style: normal;
    line-height: 16px;
    color: #1946f6;
}

.dark-mode .cbm-presale-toplist__offer-label {
    color: #496df8;
}

.cbm-presale-toplist__offer-extra {
    display: flex;
    flex-direction: column;
    gap: 8px;
    grid-area: extra;
}

.cbm-presale-toplist__offer-extra .cbm-presale-toplist__offer-name {
    display: none;
}

.cbm-presale-toplist__offer-launched,
.cbm-presale-toplist__offer-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cbm-presale-toplist__date-head,
.cbm-presale-toplist__meta-head {
    font-family: Sora, sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 16px;
    color: #424242cc;
}

.dark-mode .cbm-presale-toplist__date-head,
.dark-mode .cbm-presale-toplist__meta-head {
    color: #ffffff8e;
}

.cbm-presale-toplist__date-body,
.cbm-presale-toplist__meta-body {
    font-family: Sora, sans-serif;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 20px;
    color: #242424;
}

.dark-mode .cbm-presale-toplist__date-body,
.dark-mode .cbm-presale-toplist__meta-body {
    color: #fff;
}

.cbm-presale-toplist__offer-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    grid-area: info;
}

.cbm-presale-toplist__offer-payments-wrapper {
    display: grid;
    gap: 8px 4px;
    grid-template-areas:
        'label label-extra'
        'payments payments';
    grid-template-columns: auto;
    grid-template-rows: 1fr;
}

.cbm-presale-toplist__offer-payments-label,
.cbm-presale-toplist__offer-payments-label-extra {
    font-family: Sora, sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 16px;
    text-align: right;
    color: #424242cc;
    grid-area: label;
}

.cbm-presale-toplist__offer-payments-label-extra {
    text-align: left;
    grid-area: label-extra;
}

.dark-mode .cbm-presale-toplist__offer-payments-label,
.dark-mode .cbm-presale-toplist__offer-payments-label-extra {
    color: #ffffff8e;
}

.cbm-presale-toplist__offer-payments {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0;
    list-style-type: none;
    gap: 8px;
    grid-area: payments;
}

.cbm-presale-toplist__offer-payment {
    position: relative;
    width: 24px;
    height: 24px;
    padding-bottom: 0 !important;
    cursor: pointer;
    border-radius: 100px;
}

.cbm-presale-toplist__offer-payment-image {
    width: 24px;
    height: 24px;
    border-radius: inherit;
    object-fit: contain;
}

.cbm-presale-toplist__offer-payment-tooltip {
    font-size: 12px;
    line-height: 18px;
    position: absolute;
    z-index: 1;
    top: 34px;
    left: 50%;
    display: none;
    width: max-content;
    padding: 12px 16px;
    transform: translateX(-50%);
    color: #fff;
    border-radius: 4px;
    background: #060606;
}

.dark-mode .cbm-presale-toplist__offer-payment-tooltip {
    background: #808080;
}

.cbm-presale-toplist__offer-payment-tooltip:before {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -8px;
    content: '';
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #060606;
}

.dark-mode .cbm-presale-toplist__offer-payment-tooltip:before {
    border-color: transparent transparent #808080;
}

.cbm-presale-toplist__offer-payment:hover .cbm-presale-toplist__offer-payment-tooltip {
    display: block !important;
}

.cbm-presale-toplist__offer-payments-hidden-counter {
    display: none;
}

.cbm-presale-toplist__offer-cta-button {
    font-family: Sora, sans-serif;
    font-size: 12px;
    font-weight: 600;
    font-style: normal;
    line-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    color: #242424;
    border-radius: 32px;
    background: #f6ca19;
}

.cbm-presale-toplist__offer-cta-button:hover {
    text-decoration: none;
    color: #242424;
    background: #fdf6d8;
}

@media screen and (width <= 991px) {
    .cbm-presale-toplist__wrapper {
        margin-bottom: 24px;
    }

    .cbm-presale-toplist__offers-list {
        gap: 24px;
    }

    .cbm-presale-toplist__offer {
        padding: 21px 0 8px;
        gap: 16px;
        grid-template-areas:
            'main'
            'extra'
            'info';
        grid-template-columns: auto;
    }

    .cbm-presale-toplist__offer:before {
        top: 0;
        width: calc(100% - 40px);
    }

    .cbm-presale-toplist__offer-logo,
    .cbm-presale-toplist__offer-logo img {
        top: 0;
        width: 80px;
        height: 80px;
        min-height: 80px;
    }

    .cbm-presale-toplist__offer-main {
        padding-left: 100px;
    }

    .cbm-presale-toplist__offer-title {
        padding-right: 4px;
    }

    .cbm-presale-toplist__offer-title,
    .cbm-presale-toplist__offer-title a {
        font-size: 20px;
        line-height: 122%;
        letter-spacing: 0;
    }

    .cbm-presale-toplist__offer-name {
        display: none;
    }

    .cbm-presale-toplist__offer-extra {
        flex-direction: row;
        gap: 20px;
    }

    .cbm-presale-toplist__offer-extra .cbm-presale-toplist__offer-name {
        font-size: 16px;
        font-weight: 500;
        line-height: 18px;
        display: block;
        min-width: 80px;
        max-width: 80px;
        margin-top: 12px;
        padding-left: 4px;
        text-align: center;
    }

    .cbm-presale-toplist__offer-meta {
        padding-right: 4px;
    }

    .cbm-presale-toplist__date-body,
    .cbm-presale-toplist__meta-body {
        line-height: 18px;
    }

    .cbm-presale-toplist__offer-info {
        gap: 12px;
    }

    .cbm-presale-toplist__offer-purchase-methods {
        order: 2;
    }

    .cbm-presale-toplist__offer-payments-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        grid-template-areas: unset;
    }

    .cbm-presale-toplist__offer-payments-label,
    .cbm-presale-toplist__offer-payments-label-extra {
        text-align: unset;
    }

    .cbm-presale-toplist__offer-cta-button {
        order: 1;
    }
}
