html {
    font-size: 16px;
}

.x-bonus-toplist {
    --p-color: #202A32;
    --border-color: #cccccc;
    --main-title-color: #e12428;
    --counter-color: #F2F0F1;
    --statistic-color: #1F252E;
    --statistic-bg: #F2F0F1;
    --btn-color: #2ecc71;
    --btn-color-secondary: #ffffff;

    margin-top: 48px;
    margin-bottom: 48px;

    @media (min-width: 768px) {
        margin-top: 64px;
        margin-bottom: 64px;
    }

    @media (min-width: 1280px) {
        margin-top: 80px;
        margin-bottom: 80px;
    }
}

.x-bonus-toplist h2 {
    color: var(--main-title-color);
    margin-bottom: 24px;
    margin-top: 0;
    font-weight: 700;
}

.x-bonus-toplist h2 + slot[name="component-description"] {
    p {
        margin-bottom: 20px;
    }
}

.x-bonus-toplist__box {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    row-gap: 16px;
}

.x-bonus-toplist__game {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
    flex-grow: 1;
}

.x-bonus-toplist__image {
    border-radius: 8px;
    background: var(--border-color);
    min-height: 86px;
    width: 100%;
    position: relative;
    counter-increment: number;
    flex-shrink: 0;
}

.x-bonus-toplist__image img {
    border-radius: 8px;
    max-height: 108px;
    object-fit: cover;
    width: 100%;
}

.x-bonus-toplist__image:before {
    content: counter(number);
    width: 44px;
    height: 44px;
    position: absolute;
    top: -7px;
    left: -7px;
    border-radius: 50%;
    background: var(--main-title-color);;
    color: var(--counter-color);
    font-size: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.x-bonus-toplist__name {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--p-color);
    text-align: center;
}

.x-bonus-toplist__name strong {
    font-size: 24px;
    line-height: 33.6px;
}

.x-bonus-toplist__name span {
    font-size: 16px;
    line-height: 22.4px;
}

.x-bonus-toplist__statistic {
    display: flex;
    align-items: center;
    background: var(--statistic-bg);
    border-radius: 4px;
    padding: 8px 16px;
    column-gap: 8px;
    justify-content: space-between;
}

.x-bonus-toplist__statistic div {
    display: flex;
    flex-direction: column;
    row-gap: 4px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 18px;
    color: var(--p-color);
    text-align: center;
    flex-grow: 1;
}

.x-bonus-toplist__statistic b {
    font-size: 16px;
    line-height: 24px;
    color: var(--statistic-color);
}

/*Fix bug on safari devices*/
.x-bonus-toplist__statistic b a {
    color: var(--statistic-color)!important;
    pointer-events: none;
}

.x-bonus-toplist-wrapper {
    display: grid;
    row-gap: 12px;
    counter-reset: number;
}

.x-bonus-toplist__btn {
    display: grid;
    row-gap: 8px;
    flex-shrink: 0;
}

.x-bonus-toplist .tile-card__btn {
    width: 100%;
    padding: 8px 16px;
    background: var(--btn-color-secondary);
    color: var(--btn-color);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 24px;
    border: 1px solid var(--btn-color);
    border-radius: 22px;
    opacity: 1;
    transition: all 0.2s ease-out;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.x-bonus-toplist .tile-card__btn.disabled {
    color: var(--border-color);
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.x-bonus-toplist .tile-card__btn:hover {
    background: var(--btn-color);
    color: var(--btn-color-secondary);
    text-decoration: none;
}

.x-bonus-toplist .tile-card__btn--green {
    background: var(--btn-color);
    color: var(--btn-color-secondary);
    border: none;
}

.x-bonus-toplist .tile-card__btn.tile-card__btn--green.disabled {
    background: var(--border-color);
    color: var(--btn-color-secondary);
    border: none;
}

.x-bonus-toplist .tile-card__btn--green:hover {
    opacity: 0.8;
    color: var(--btn-color-secondary);
}

.x-bonus-toplist .tile-card__btn--green:visited {
    text-decoration: none!important;
    color: var(--btn-color-secondary);
}

.x-bonus-toplist .tile-card__btn--green:focus {
    text-decoration: none!important;
    color: var(--btn-color-secondary);
}

.x-bonus-toplist .hidden {
    display: none;
}

@media(min-width: 600px) {
    .x-bonus-toplist-wrapper {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 12px;
    }
}

@media(min-width: 768px) {
    .x-bonus-toplist__box {
        padding: 24px;
    }

    .x-bonus-toplist__image:before {
        top: -15px;
        left: -15px;
    }
}

@media (min-width: 1024px) {
    .x-bonus-toplist-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(min-width: 1280px) {
    .x-bonus-toplist-wrapper {
        grid-template-columns: 100%;
    }

    .x-bonus-toplist__box {
        padding: 16px 24px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        row-gap: 0;
    }

    .x-bonus-toplist__btn {
        padding-left: 36px;
    }

    .x-bonus-toplist__statistic-container {
        padding: 0 36px;
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        flex-grow: 1;
        max-width: 500px;
        width: 100%;
        flex-shrink: 0;
    }

    .x-bonus-toplist__game {
        align-items: center;
        column-gap: 16px;
        flex-direction: row;
        row-gap: 0;
    }

    .x-bonus-toplist__image {
        max-width: 145px;
    }

    .x-bonus-toplist__image img {
        max-height: 86px;
    }

    .x-bonus-toplist__name {
        align-items: flex-start;
        text-align: left;
        padding-right: 36px;
    }

    .x-bonus-toplist__statistic {
        min-height: 76px;
    }

    .x-bonus-toplist__image:before {
        width: 34px;
        height: 34px;
        font-size: 18px;
        top: -10px;
        left: -5px;
    }

    .x-bonus-toplist__statistic div {
        font-size: 14px;
        line-height: 21px;
        width: calc(100% / 3);
    }

    .x-bonus-toplist__statistic b {
        font-size: 18px;
        line-height: 27px;
    }

    .x-bonus-toplist .tile-card__btn {
        max-width: 170px;
    }
}