@use "mixins/lists";
@use "variables";
@use "vendor/rfs";

// stylelint-disable declaration-no-important, selector-list-comma-newline-after

//
// Headings
//

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    margin-bottom: variables.$headings-margin-bottom;
    font-family: variables.$headings-font-family;
    font-weight: variables.$headings-font-weight;
    line-height: variables.$headings-line-height;
    color: variables.$headings-color;
}

h1,
.h1 {
    @include rfs.font-size(variables.$h1-font-size);
}
h2,
.h2 {
    @include rfs.font-size(variables.$h2-font-size);
}
h3,
.h3 {
    @include rfs.font-size(variables.$h3-font-size);
}
h4,
.h4 {
    @include rfs.font-size(variables.$h4-font-size);
}
h5,
.h5 {
    @include rfs.font-size(variables.$h5-font-size);
}
h6,
.h6 {
    @include rfs.font-size(variables.$h6-font-size);
}

.lead {
    font-weight: variables.$lead-font-weight;
    @include rfs.font-size(variables.$lead-font-size);
}

// Type display classes
.display-1 {
    font-weight: variables.$display1-weight;
    line-height: variables.$display-line-height;
    @include rfs.font-size(variables.$display1-size);
}
.display-2 {
    font-weight: variables.$display2-weight;
    line-height: variables.$display-line-height;
    @include rfs.font-size(variables.$display2-size);
}
.display-3 {
    font-weight: variables.$display3-weight;
    line-height: variables.$display-line-height;
    @include rfs.font-size(variables.$display3-size);
}
.display-4 {
    font-weight: variables.$display4-weight;
    line-height: variables.$display-line-height;
    @include rfs.font-size(variables.$display4-size);
}

//
// Horizontal rules
//

hr {
    margin-top: variables.$hr-margin-y;
    margin-bottom: variables.$hr-margin-y;
    border: 0;
    border-top: variables.$hr-border-width solid variables.$hr-border-color;
}

//
// Emphasis
//

small,
.small {
    font-weight: variables.$font-weight-normal;
    @include rfs.font-size(variables.$small-font-size);
}

mark,
.mark {
    padding: variables.$mark-padding;
    background-color: variables.$mark-bg;
}

//
// Lists
//

.list-unstyled {
    @include lists.list-unstyled();
}

// Inline turns list items into inline-block
.list-inline {
    @include lists.list-unstyled();
}
.list-inline-item {
    display: inline-block;

    &:not(:last-child) {
        margin-right: variables.$list-inline-padding;
    }
}

//
// Misc
//

// Builds on `abbr`
.initialism {
    text-transform: uppercase;
    @include rfs.font-size(90%);
}

// Blockquotes
.blockquote {
    margin-bottom: variables.$spacer;
    @include rfs.font-size(variables.$blockquote-font-size);
}

.blockquote-footer {
    display: block;
    color: variables.$blockquote-small-color;
    @include rfs.font-size(variables.$blockquote-small-font-size);

    &::before {
        content: '\2014\00A0'; // em dash, nbsp
    }
}
