//
// Unstyled list modifier
// Required for horizontal, icon, and link list modifiers
//

.m-list__unstyled,
.m-list__horizontal,
.m-list__links {
    padding-left: 0;
    list-style-type: none;

    // This is needed for dd elements.
    .m-list_item {
        margin-left: 0;
    }
}

//
// Spaced list modifier
//

.m-list__spaced {
    .m-list__spaced,
    .m-list_item + .m-list_item {
        margin-top: unit( 24px / @base-font-size-px, em );
    }
}

//
// Horizontal list modifier
//

.m-list__horizontal {
    .m-list_item {
        display: inline-block;

        // Assuming a natural space of 4px between inline block items
        // then the space between would be 8px (4px natural + 4px added).
        margin-right: unit( 4px / @base-font-size-px, em );
        margin-bottom: 0;
    }
}

//
// Link list modifier
//

.m-list__links {
    .m-list_item {
        .respond-to-max( @bp-xs-max, {
            margin-bottom: 0;

            &:nth-child( n+2 ) .m-list_link {
                border-top-width: 0;
            }
        } );
    }

    .m-list_link {
        font-weight: 500;

        .respond-to-max( @bp-xs-max, {
            .u-block-link();
        } );
    }
}
