.game_chat_banner {
    --game-chat-banner-accent: #1acb6e;
    --game-chat-banner-accent-hover: #15b460;
    --game-chat-banner-text: #fff;
    --game-chat-banner-muted: rgba(255, 255, 255, 0.62);

    align-items: center;
    background-color: var(--game-chat-banner-bg);
    border-radius: 18px;
    box-sizing: border-box;
    color: var(--game-chat-banner-text);
    display: flex;
    gap: 24px;
    inline-size: 100%;
    justify-content: space-between;
    margin-block: 10px;
    min-block-size: 227px;
    overflow: hidden;
    padding-block: 32px;
    padding-inline: 56px 48px;
    position: relative;
}

.game_chat_banner_img {
    block-size: 100%;
    inline-size: auto;
    inset-block-start: 0;
    inset-inline-start: 41%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
    max-inline-size: none;
    -o-object-fit: cover;
    object-fit: cover;
    pointer-events: none;
    position: absolute;
}

.game_chat_banner_content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-inline-size: 38%;
    position: relative;
    z-index: 1;
}

.game_chat_banner_title {
    font-family: Roboto-Bold, sans-serif;
    font-size: 30px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
}

.game_chat_banner_text {
    color: var(--game-chat-banner-muted);
    font-family: Roboto-Regular, sans-serif;
    font-size: 17px;
    line-height: 1.4;
    margin: 0;
}

.game_chat_banner_button {
    align-items: center;
    background-color: var(--game-chat-banner-accent);
    border: 0;
    border-radius: 14px;
    color: var(--game-chat-banner-text);
    cursor: pointer;
    display: inline-flex;
    flex: none;
    font-family: Roboto-Bold, sans-serif;
    font-size: 18px;
    gap: 12px;
    justify-content: center;
    min-block-size: 54px;
    padding-block: 0;
    padding-inline: 30px;
    position: relative;
    transition: background-color 0.2s;
    white-space: nowrap;
    z-index: 1;

    &:hover,
    &:focus-visible {
        background-color: var(--game-chat-banner-accent-hover);
    }
}

@media (max-width: 1024px) {
    .game_chat_banner {
        padding-inline: 32px;
    }

    .game_chat_banner_img {
        inset-inline-start: 36%;
        opacity: 0.85;
    }

    .game_chat_banner_content {
        max-inline-size: 44%;
    }

    .game_chat_banner_title {
        font-size: 24px;
    }

    .game_chat_banner_text {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .game_chat_banner {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
        min-block-size: 0;
        padding-block: 0 20px;
        padding-inline: 0;
    }

    .game_chat_banner_img {
        block-size: 170px;
        inline-size: 100%;
        -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
        object-position: center 20%;
        opacity: 1;
        position: static;
    }

    .game_chat_banner_content {
        gap: 8px;
        margin-block-start: -24px;
        max-inline-size: none;
        padding-inline: 20px;
    }

    .game_chat_banner_title {
        font-size: 22px;
    }

    .game_chat_banner_text {
        font-size: 14px;
    }

    .game_chat_banner_button {
        font-size: 16px;
        margin-inline: 20px;
        min-block-size: 48px;
        white-space: normal;
    }
}

/* In the category grid the banner goes after two rows of cards: 4 per row, 2 per row up to 600px */
.catalog_product_with_cta > :nth-child(n + 9) {
    order: 2;
}

@media (max-width: 600px) {
    .catalog_product_with_cta > :nth-child(n + 5) {
        order: 2;
    }
}

/* Must stay last: beats the nth-child rules above whatever the banner's own position is */
.catalog_product_with_cta > .game_chat_banner {
    flex: 0 0 100%;
    order: 1;
}

.game_chat_banner_outside {
    margin-block: 40px;
}
