//
// Component: Base
//
// ========================================================================


// Variables
// ========================================================================

@base-blockquote-margin-vertical:               @global-medium-margin;

//
// New
//

@base-code-padding-horizontal:                  6px;
@base-code-padding-vertical:                    2px;
@base-code-background:                          transparent;

@base-blockquote-padding-left:                  0;
@base-blockquote-padding-right:                 0;
@base-blockquote-padding-vertical:              0;
@base-blockquote-background:                    transparent;
@base-blockquote-text-align:                    center;

@base-pre-padding:                              10px;
@base-pre-background:                           @global-background;

@base-blockquote-footer-em-dash:                true;


// Body
// ========================================================================

.hook-base-body() {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}


// Links
// ========================================================================

.hook-base-link() {}

.hook-base-link-hover() {}


// Text-level semantics
// ========================================================================

.hook-base-code() when not (@base-code-padding-vertical = 0), not (@base-code-padding-horizontal = 0) {
    padding: @base-code-padding-vertical @base-code-padding-horizontal;
}

.hook-base-code() when not (@base-code-background = transparent) {
    background: @base-code-background;
}


// Headings
// ========================================================================

.hook-base-heading() {}

.hook-base-h1() {}

.hook-base-h2() {}

.hook-base-h3() {}

.hook-base-h4() {}

.hook-base-h5() {}

.hook-base-h6() {}


// Horizontal rules
// ========================================================================

.hook-base-hr() {}


// Blockquotes
// ========================================================================

.hook-base-blockquote() {
    text-align: @base-blockquote-text-align;
}

.hook-base-blockquote() when not (@base-blockquote-padding-vertical = 0), not (@base-blockquote-padding-left = 0), not (@base-blockquote-padding-right = 0) {
    padding: @base-blockquote-padding-vertical @base-blockquote-padding-right @base-blockquote-padding-vertical @base-blockquote-padding-left;
}

.hook-base-blockquote() when not (@base-blockquote-background = transparent) {
    background: @base-blockquote-background;
}

.hook-base-blockquote-footer() when (@base-blockquote-footer-em-dash = true) {

    &::before { content: "— "; }

}


// Preformatted text
// ========================================================================

.hook-base-pre() {
    padding: @base-pre-padding;
    background: @base-pre-background;
}


// Miscellaneous
// ========================================================================

.hook-base-misc() {}


// Inverse
// ========================================================================

@inverse-base-code-background:                          transparent;
@inverse-base-blockquote-background:                    transparent;

.hook-inverse-base-link() {}
.hook-inverse-base-link-hover() {}

.hook-inverse-base-code() when not ((@base-code-background = transparent) and (@inverse-base-code-background = transparent)) {
    background-color: @inverse-base-code-background;
}

.hook-inverse-base-heading() {}

.hook-inverse-base-h1() {}
.hook-inverse-base-h2() {}
.hook-inverse-base-h3() {}
.hook-inverse-base-h4() {}
.hook-inverse-base-h5() {}
.hook-inverse-base-h6() {}

.hook-inverse-base-blockquote() when not ((@base-blockquote-background = transparent) and (@inverse-base-blockquote-background = transparent)) {
    background-color: @inverse-base-blockquote-background;
}
.hook-inverse-base-blockquote-footer() {}

.hook-inverse-base-hr() {}