/**
 * Game Rules — Spribe original structure:
 * .rules-list.pt-2 > .rules-list-title + ul.list-group > li.list-group-item
 */

#game-rules-modal .modal-body {
    padding: 16px 12px !important;
    font-family: Inter, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
}

#game-rules-modal .text-grey {
    color: #b8b8b8;
    margin: 0;
    line-height: 1.5;
}

#game-rules-modal .modal-body h6.text-uppercase {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

#game-rules-modal .modal-body h6.mt-4 {
    margin-top: 24px !important;
}

#game-rules-modal .modal-body h6.mt-5 {
    margin-top: 48px !important;
}

#game-rules-modal .modal-body h6.mb-2 {
    margin-bottom: 8px !important;
}

#game-rules-modal h6.game-functions-heading {
    margin-bottom: 4px !important;
}

#game-rules-modal .game-functions-heading + .rules-list.pt-2,
#game-rules-modal .rules-list.game-functions-first-list {
    margin-top: 0 !important;
    padding-top: 8px !important;
}

#game-rules-modal .steps-subtitle.pl-2 {
    padding-left: 8px;
}

#game-rules-modal .steps-subtitle.pt-5 {
    padding-top: 48px;
}

/* Steps row — Spribe original 320px columns */
#game-rules-modal .steps-row,
#game-rules-modal .steps-container {
    display: grid;
    grid-template-columns: repeat(3, 320px);
    justify-content: center;
    align-items: start;
    gap: 32px;
}

#game-rules-modal .step {
    width: 320px;
    max-width: 320px;
}

#game-rules-modal .step-bg-img {
    width: 100%;
    height: 170px;
}

#game-rules-modal .step-bg-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

#game-rules-modal .step-text span.text-uppercase {
    white-space: nowrap;
}

#game-rules-modal .mt-3 {
    margin-top: 16px;
}

#game-rules-modal .pt-2 {
    padding-top: 8px;
}

#game-rules-modal .pt-3 {
    padding-top: 16px;
}

#game-rules-modal .steps-wrapper > p.mt-3.text-grey {
    margin-bottom: 24px;
}

#game-rules-modal .steps-wrapper > .rules-list.pt-3 {
    padding-top: 24px;
}

#game-rules-modal .rules-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
}

#game-rules-modal .rules-list.pt-3 .rules-list-title {
    font-weight: 400;
    margin-bottom: 12px;
}

#game-rules-modal .rules-list.pt-2 + .rules-list.pt-2 {
    padding-top: 16px !important;
}

#game-rules-modal .rules-list .list-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 0 0 16px !important;
    list-style: none !important;
    background: transparent !important;
    border: none !important;
}

/* Spribe: one tab indent; chevron 10px + 2px gap before text */
#game-rules-modal .rules-list .list-group-item {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 0 0 12px !important;
    border: none !important;
    background: transparent !important;
    color: #b8b8b8 !important;
    font-size: 14px;
    line-height: 1.5 !important;
}

#game-rules-modal .rules-list .list-group-item::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 2px !important;
    width: 10px !important;
    height: 16px !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16'%3E%3Cpath d='M1.5 2 7.5 8 1.5 14' fill='none' stroke='%23E50539' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

#game-rules-modal .rules-pf-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

#game-rules-modal .link {
    color: #e50539;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 1024px) {
    #game-rules-modal .steps-wrapper {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    #game-rules-modal .steps-row,
    #game-rules-modal .steps-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        align-items: stretch;
        gap: 20px;
        width: 100%;
        max-width: 100%;
        margin: 16px 0 0;
        padding: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    #game-rules-modal .step {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    #game-rules-modal .step-bg-img {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 264 / 140;
        max-height: min(180px, 42vw);
        margin: 0 0 10px;
    }

    #game-rules-modal .step-bg-img img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
        object-position: center center;
    }

    #game-rules-modal .step-number {
        font-size: 20px;
    }

    #game-rules-modal .step-text {
        font-size: 13px;
        line-height: 1.45;
    }

    #game-rules-modal .step-text span.text-uppercase {
        white-space: normal;
    }

    #game-rules-modal .step-icon {
        width: 28px;
        height: 28px;
    }

    #game-rules-modal .steps-subtitle.pt-5 {
        padding-top: 24px;
    }
}

@media (max-width: 480px) {
    #game-rules-modal .steps-row,
    #game-rules-modal .steps-container {
        gap: 16px;
    }

    #game-rules-modal .step-bg-img {
        max-height: min(150px, 46vw);
    }

    #game-rules-modal .step-number {
        font-size: 18px;
    }

    #game-rules-modal .step-text {
        font-size: 12px;
    }

    #game-rules-modal .step-icon {
        width: 24px;
        height: 24px;
    }
}
