html{
    font: {
        family: $main-font;
        size: $root-font-size;
        weight: $main-font-weight;
    }
}

body{
    @extend html;
    line-height: $basic-line-height;

    @if $background-color-setting == yes{
        background-color: $background-color;
    }
}

// Headings
h1, h2, h3, h4, h5, h6{
    line-height: 1;
    padding: 10px 0px;

    @if $headings-text-transform != none{
        text-transform: $headings-text-transform;
    }

    @if $headings-font != $main-font{
        font-family: $headings-font;
    }

    @if $headings-font-weight != $main-font-weight{
        font-weight: $headings-font-weight;
    }
}

h1{
    font-size: 2.35em;
}

h2{
    font-size: 1.6em;
}

h3{
    font-size: 1.45em;
}

h4{
    font-size: 1.25em;
}

h5{
    font-size: 1.08em;
}

h6{
    font-size: 1em;
}

// Links
a{
    @if $link-transition == yes {
        transition: .3s all;
    }

    @if $link-line-default == no{
        text-decoration: none;
    }
    @else{
        text-decoration: underline;
    }

    color: $link-color;

    &:hover{
        cursor: pointer;
        color: $link-hover-color;

        @if $link-line-default == yes and $link-line-hover == no{
            text-decoration: none;
        }
        @if $link-line-default == no and $link-line-hover == yes{
            text-decoration: underline;
        }
    }
}

// Defaults

img{
    max-width: 100%;
    height: auto;
}

iframe{
    width: 100%;
    // height: auto;
}

code{
    font-family: 'Source Code Pro', 'Courier New', monospace;
}

kbd,
pre{
    @extend code;
}

@if $paragraph-gap == yes{
    p + p{
        margin-top: $paragraph-gap-size;
    }
}

// Container
@if $container-settings == yes{
    .#{$container-class-name}{
        max-width: $container-max-width;
        width: $container-width;
        background: $container-background-color;
        @include center();
    }
}

// Extended Defaults
@if $extended-defaults == yes {
    input,
    textarea {
        position: relative;
        border: 1px solid white;
        transition: 0.3 all ease;
        padding: 9px 13px;
        box-sizing: border-box;
        border-color: darken(white, 10%);

        &:focus {
            border-color: darken(white, 15%);
        }
    }

    cite {
        font-style: italic;
        font-size: 1em;
    }

    address,
    var {
        font-style: italic;
    }

    pre {
        background: rgba(black, 0.02);
        padding: 10px;
        margin: 10px 0;
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
    }

    q {
        display: inline;

        &:before {
            content: "“";
        }

        &:after {
            content: "”";
        }
    }
}

// Blockquotes
@if $include-blockquote-style == yes {
    blockquote {
        width: calc(100% - 10px);
        box-sizing: border-box;
        padding: 10px 20px;
        border-left: $blockquote-border;
        margin: 15px 0 0 10px;
        font-size: 1.1em;
    }
}

// Tables
@if $include-table-style == yes {
    table {
        width: 100%;
        border: $table-border;
		overflow-x: auto;

        thead tr {
            background: darken($even-rows-bg, 5%);
        }

        tr {
            border-bottom: $table-border;

            &:last-of-type {
                border-bottom: $noborder;
            }

            &:nth-of-type(even) {
                background: $even-rows-bg;
            }
        }

        td, th {
            padding: 3px 4px;
            border-right: $table-border;

            &:last-of-type {
                border-right: $noborder;
            }
        }

        th {
            white-space: nowrap;
            padding: 5px 7px;
            font-size: 1.05em;
            font-weight: bold;
        }
    }
}

// Defintion List
@if $include-definition-list-style == yes {
    dl {
        width: 100%;
        text-align: left;
        @include flexbox(row, wrap, space-between, stretch);

        dt {
            font-weight: bold;
            width: 20%;
            min-width: 130px;
            border-bottom: $definition-list-border;
            padding: 3px 0;

            &:after {
                content: ":";
            }

            &:last-of-type {
                border-bottom: $noborder;
            }
        }

        dd {
            padding: 3px 0;
            width: 80%;
            max-width: calc(100% - 130px);
            border-bottom: $definition-list-border;

            &:last-of-type {
                border-bottom: $noborder;
            }
        }
    }
}

// WordPress default classes
@if $inlcude-WordPress-kit == yes {
    .alignnone {
        float: none;
        margin: 0;
    }

    .aligncenter,
    div.aligncenter {
        display: block;
        margin: 0 auto;
    }

    .alignright {
        float:right;
        margin: 10px 15px !important;
    }

    .alignleft {
        float: left;
        margin: 10px 15px !important;
    }

    .gallery-caption {
        font-size: 0.9em;
    }

    .bypostauthor {
        > div {
            p {
                font-weight: bold;
            }
        }
    }

    .wp-caption {
        border: 1px solid rgba($black, 0.05);
        text-align: center;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
        max-width: 100%;
        height: auto;
    }

    .wp-caption p.wp-caption-text {
        font-size: 0.9em;
    }

    .sticky {
        position: fixed;
    }
}
