/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Typography
# Elements
# Forms
# Accessibility
# Alignments
# Clearings
# Media
# Media: Captions
# Media: Galleries
# Comments
# Helper
/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/

body {
    color: $color_text;
    font-family: $font_main;
    font-weight: 400;
    line-height: 1.618;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}


/* # Heading */

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-weight: 400;
    font-family: $font_main;
    margin: 0 0 ms(-3);
    color: $color_heading;
    clear: both;
}

h1,
.h1 {
    font-size: 2.42em;
    line-height: 1.216;
    @include for_device(tablet) {
        font-size: 2.1em;
    }
    @include for_device(mobile) {
        font-size: 1.8em;
    }
}

h2,
.h2 {
    font-size: 2.1em;
    line-height: 1.216;
    &+h3 {
        border-top: 1px solid $color_border;
        padding-top: ms(-3);
    }
    @include for_device(tablet) {
        font-size: 1.9em;
    }
    @include for_device(mobile) {
        font-size: 1.7em;
    }
}

h3,
.h3 {
    font-size: ms(2);
}

h4,
.h4 {
    font-size: ms(1);
}


/* # Copy */

p {
    margin: 0 0 ms(1);
}

dfn,
cite,
em,
i {
    font-style: italic;
}

blockquote {
    padding: 0px ms(1);
    margin: ms(1) ms(2);
    border-left: 3px solid $color_border;
    font-style: italic;
    font-weight: 200;
    font-size: 1.2em;
    p:last-of-type {
        margin-bottom: 0px;
    }
}

address {
    margin: 0 0 ms(2);
}

pre {
    background: darken($background_body, 5%);
    font-family: "Courier 10 Pitch", Courier, monospace;
    margin-bottom: ms(3);
    padding: ms(2);
    overflow: auto;
    max-width: 100%;
}

code,
kbd,
tt,
var {
    background-color: rgba(0, 0, 0, 0.05);
    font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
    padding: 0.15em ms(-3);
    border-radius: 2px;
}

abbr,
acronym {
    border-bottom: 1px dotted $color_text;
    cursor: help;
}

mark,
ins {
    background: transparent;
    text-decoration: none;
}

big {
    font-size: 125%;
}


/*--------------------------------------------------------------
# Elements
--------------------------------------------------------------*/

html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    /* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
    box-sizing: inherit;
}

body {
    background: $background_body;
    /* Fallback for when there is no custom background color defined. */
}

hr {
    background-color: #ccc;
    border: 0;
    height: 1px;
    margin: 0 0 ms(2);
}

img {
    height: auto;
    /* Make sure images are scaled correctly. */
    max-width: 100%;
    /* Adhere to container width. */
}

figure {
    margin: ms(0) 0;
    /* Extra wide images within figure tags don't overflow the content area. */
}


/* Links */

a.plain_color {
    color: currentColor;
}

a {
    color: $color_link;
    text-decoration: none;
    transition: all 0.14s ease-out;
    &:hover,
    &:focus {
        color: $color_link_hover;
    }
    &:hover,
    &:active {
        outline: 0;
    }
}


/* # Lists */

ul,
ol {
    margin: 0 0 ms(2) ms(4);
    padding: 0;
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

li>ul,
li>ol {
    margin-bottom: 0;
    margin-left: ms(4);
}

dt {
    font-weight: bold;
}

dd {
    margin: 0 0 ms(2);
}


/* # Table */

table {
    width: 100%;
    max-width: 100%;
    margin-bottom: ms(3);
    border-spacing: 0;
    border-collapse: separate;
    caption {
        padding: ms(1);
        font-weight: 600;
    }
    th {
        background: darken($background_body, 5%);
        font-weight: 500;
    }
    th,
    td {
        padding: ms(0) ms(2);
        vertical-align: top;
        text-align: left;
        font-size: 0.9em;
    }
    thead th {
        vertical-align: middle;
    }
    tbody {
        td {
            background: darken($background_body, 2%);
        }
        tr:nth-child(2n) td {
            background: darken($background_body, 3%);
        }
    }
}


/* Float + Clear */

.clearfix,
.clear {
    &:before,
    &:after {
        content: "";
        display: table;
    }
    &:after {
        clear: both;
    }
}

.pull-right {
    float: right;
    margin-right: 0px;
}

.pull-left {
    float: left;
    margin-left: 0px;
}


/*--------------------------------------------------------------
# Forms
--------------------------------------------------------------*/

form {
    margin-bottom: 2em;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
select,
textarea,
.select2-container .select2-selection--single {
    color: #282828;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) inset;
    padding: 0 0.75em;
    height: 2.6em;
    width: 100%;
    max-width: 100%;
    vertical-align: middle;
    border-radius: 1px;
    -moz-appearance: none;
    -webkit-appearance: none;
    &:focus {
        border-color: rgba(0, 0, 0, 0.1);
        outline: none;
        background-color: #f9f9f9;
    }
}

select {
    box-shadow: none;
    background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwMCAxMDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4Ij4KPGc+Cgk8cGF0aCBkPSJNNDkuOTk4LDBMMjcsMzYuNDk4bDQ2LDAuMDA0TDQ5Ljk5OCwweiBNNTAuMDA0LDEwMEw3Myw2My41MDJsLTQ2LTAuMDA0TDUwLjAwNCwxMDB6IiBmaWxsPSIjMDAwMDAwIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==);
    background-position: center right 8px;
    background-repeat: no-repeat;
    padding-right: 1.5em;
    cursor: pointer;
}

.select2-container--default {
    .select2-selection--single {
        box-shadow: none;
        .select2-selection__rendered {
            line-height: 2.4em;
            min-height: 2.6em;
            padding-left: 0px;
        }
        .select2-selection__arrow {
            top: 46%;
            right: 1px;
            transform: translateY(-38%);
            background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwMCAxMDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4Ij4KPGc+Cgk8cGF0aCBkPSJNNDkuOTk4LDBMMjcsMzYuNDk4bDQ2LDAuMDA0TDQ5Ljk5OCwweiBNNTAuMDA0LDEwMEw3Myw2My41MDJsLTQ2LTAuMDA0TDUwLjAwNCwxMDB6IiBmaWxsPSIjMDAwMDAwIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==);
            background-position: center right 8px;
            background-repeat: no-repeat;
            b {
                display: none;
            }
        }
    }
    .select2-dropdown {
        border: 1px solid #e5e5e5;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) inset;
    }
}

body:not(.fl-builder-edit) .button,
body:not(.fl-builder-edit) button:not(.menu-mobile-toggle, .components-button, .customize-partial-edit-shortcut-button),
body:not(.fl-builder-edit) input[type="button"]:not(.ed_button),
.button:not(.components-button, .customize-partial-edit-shortcut-button),
button:not(.components-button, .customize-partial-edit-shortcut-button),
input[type="button"]:not(.ed_button, .components-button, .customize-partial-edit-shortcut-button),
input[type="reset"]:not(.components-button, .customize-partial-edit-shortcut-button),
.wc-block-cart__submit .wp-element-button,
input[type="submit"]:not(.components-button, .customize-partial-edit-shortcut-button) {
    border: none;
    cursor: pointer;
    padding: 0px 1.3em;
    line-height: 2.5em;
    min-height: 2.6em;
    max-width: 100%;
    font-weight: bolder;
    text-transform: uppercase;
    transition: transform 0.3s, border 0.3s, background 0.3s, box-shadow 0.3s, opacity 0.3s, color 0.3s;
    border-radius: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    &:not(.menu-mobile-toggle):hover {
        box-shadow: inset 0 0 0 120px rgba(0, 0, 0, 0.18);
    }
    &:hover {
        color: #ffffff;
        outline: none;
    }
    &:active,
    &:focus {
        outline: none;
    }
    &.loading {
        position: relative;
        i,
        svg,
        .icon-label,
        .hide-on-loading,
        .button-label {
            visibility: hidden;
        }
        &:after {
            content: "" !important;
            height: 16px;
            width: 16px;
            animation: spin 0.6s linear infinite;
            border: 2px solid rgba(0, 0, 0, 0.3);
            border-left-color: currentColor;
            border-radius: 50%;
            display: block;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -8px;
            margin-left: -8px;
            padding: 0px;
            line-height: 0px;
        }
    }
}

body:not(.fl-builder-edit) .button,
body:not(.fl-builder-edit) button:not(.menu-mobile-toggle, .components-button, .customize-partial-edit-shortcut-button),
body:not(.fl-builder-edit) input[type="button"]:not(.ed_button),
.button:not(.components-button):not(.customize-partial-edit-shortcut-button),
input[type="button"]:not(.ed_button),
input[type="button"]:not(.components-button):not(.customize-partial-edit-shortcut-button),
input[type="reset"]:not(.components-button):not(.customize-partial-edit-shortcut-button),
input[type="submit"]:not(.components-button):not(.customize-partial-edit-shortcut-button) {
    color: #ffffff;
    background: $color_primary;
    &:focus {
        color: #ffffff;
    }
}

.button[disabled]:not(.components-button):not(.customize-partial-edit-shortcut-button),
button[disabled]:not(.components-button):not(.customize-partial-edit-shortcut-button),
button.disabled:not(.components-button):not(.customize-partial-edit-shortcut-button),
.button.disabled:not(.components-button):not(.customize-partial-edit-shortcut-button) {
    opacity: 0.5;
}

textarea {
    padding: 0.575em 0.875em 0;
    min-height: 130px;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

select {
    //border: 1px solid darken( $background_body,5% );
}

fieldset {
    border: none;
    margin: ms(3) 0;
    padding: 0;
    legend {
        margin-bottom: ms(-3);
        font-weight: 600;
    }
}

label {
    color: #252525;
}


/*--------------------------------------------------------------
# Accessibility
--------------------------------------------------------------*/


/* Text meant only for screen readers. */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
    /* Many screen reader and browser combinations announce broken words as they would appear visually. */
    &:focus {
        background-color: #f1f1f1;
        border-radius: 3px;
        box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
        clip: auto !important;
        display: block;
        font-weight: bold;
        height: auto;
        left: 0px;
        line-height: normal;
        padding: 1em ms(3);
        text-decoration: none;
        top: 0px;
        width: auto;
        z-index: 100000;
        /* Above WP toolbar. */
    }
}


/* Do not show the outline on the skip link target. */

#content[tabindex="-1"]:focus {
    outline: 0;
}


/*--------------------------------------------------------------
# Alignments
--------------------------------------------------------------*/

.alignleft {
    display: inline;
    float: left;
    margin-right: ms(1);
}

.alignright {
    display: inline;
    float: right;
    margin-left: ms(1);
}

.aligncenter {
    clear: both;
    display: block;
    margin: 0 auto;
}


/*--------------------------------------------------------------
# Clearings
--------------------------------------------------------------*/

.clear:before,
.clear:after,
.entry-content:before,
.entry-content:after,
.comment-content:before,
.comment-content:after,
.site-header:before,
.site-header:after,
.site-content:before,
.site-content:after,
.site-footer:before,
.site-footer:after {
    content: "";
    display: table;
    table-layout: fixed;
}

.clear:after,
.entry-content:after,
.comment-content:after,
.site-header:after,
.site-content:after,
.site-footer:after {
    clear: both;
}


/*--------------------------------------------------------------
# Media
--------------------------------------------------------------*/

.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
    border: none;
    margin-bottom: 0;
    margin-top: 0;
    padding: 0;
}


/* Make sure embeds and iframes fit their containers. */

embed,
iframe,
object {
    max-width: 100%;
}


/* Make sure logo link wraps around logo image. */

.custom-logo-link {
    display: inline-block;
}


/*--------------------------------------------------------------
## Media: Captions
--------------------------------------------------------------*/

.wp-caption {
    margin-bottom: ms(1);
    max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption .wp-caption-text {
    padding: 1em 0;
    font-size: 85%;
}

.wp-caption-text {
    text-align: left;
    font-style: italic;
    color: darken($background_body, 40%);
}


/*--------------------------------------------------------------
## Media: Galleries
--------------------------------------------------------------*/

.gallery {
    margin-bottom: 1.5em;
    @include clearfix;
    margin-bottom: ms(1);
}

.gallery-item {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    width: 100%;
}

.gallery-columns-2 .gallery-item {
    max-width: 50%;
}

.gallery-columns-3 .gallery-item {
    max-width: 33.33%;
}

.gallery-columns-4 .gallery-item {
    max-width: 25%;
}

.gallery-columns-5 .gallery-item {
    max-width: 20%;
}

.gallery-columns-6 .gallery-item {
    max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
    max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
    max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
    max-width: 11.11%;
}

.gallery-caption {
    display: block;
}


/*--------------------------------------------------------------
## Comments
--------------------------------------------------------------*/

.comments-area {
    .comment-reply-title {
        @extend h4;
    }
    .comment-form-comment,
    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        label {
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-size: 0.85em;
        }
    }
}

.comment-list {
    list-style: none;
    margin: 0;
    article.comment {
        margin-bottom: 0px;
    }
    ul {
        list-style: none;
        margin: 0;
    }
    .children li.comment {
        padding-left: 30px;
        @include mq(min-md) {
            padding-left: 85px;
            border-left: 1px solid $color_border;
            position: relative;
            width: 100%;
            &:after {
                content: "";
                display: block;
                position: absolute;
                float: left;
                top: ms(2);
                left: 0;
                width: ms(2);
                height: 1px;
                background-color: $color_border;
            }
        }
        @include mq(max-sm) {
            li.comment li.comment li.comment {
                padding-left: 0px;
            }
        }
    }
}

article.comment {
    padding: ms(2) 0;
    margin-bottom: ms(2);
    .comment-content {
        p:last-of-type {
            margin-bottom: 0px;
        }
    }
    .comment-image {
        float: left;
    }
    .comment-wrap {
        margin-left: 85px;
    }
    .comment-meta {
        display: block;
        margin: 12px 0px 12px;
        padding-bottom: 4px;
        border-bottom: 1px solid $color_border;
        .comment-edit-link {
            margin-left: 10px;
        }
    }
    .comment-author {
        font-weight: 500;
        text-transform: uppercase;
        line-height: 1;
        font-style: normal;
    }
    .comment-post-author {
        background: $color_meta;
        padding: 1px 6px 1px;
        border-radius: 2px;
        color: #ffffff;
        position: relative;
        top: -2px;
        margin-left: 4px;
    }
}

#respond {
    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        @include mq(min-md) {
            width: 29.4117647059%;
            margin-right: 5.8823529412%;
            float: left;
        }
        input {
            width: 100%;
        }
    }
    .comment-form-url {
        margin-right: 0px;
    }
    .comment-form-cookies-consent {
        #wp-comment-cookies-consent {
            position: relative;
            top: -1px;
            margin-right: 5px;
        }
    }
}


/*--------------------------------------------------------------
## Helper
--------------------------------------------------------------*/

// Direction Nav
.nav-btn {
    margin: auto;
    width: 24px;
    height: 24px;
    min-height: 24px;
    overflow: hidden;
    fill: currentColor;
    line-height: 1em;
    font-size: 1em;
    position: relative;
    padding: 0px;
    border-radius: 50%;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
    background-color: rgba(255, 255, 255, 0.5);
    color: #888888;
    opacity: 0.6;
    display: inline-block;
    transition: all 0.3s linear;
    &.x2 {
        width: 36px;
        height: 36px;
        min-height: 36px;
        font-size: 1.1em;
    }
    svg {
        width: 50%;
        height: 50%;
        position: absolute;
        top: 50%;
        left: 50%;
        fill: currentColor;
        color: currentColor;
        transform: translate(-50%, -50%);
    }
    &:hover,
    &:focus {
        color: #333;
        opacity: 1;
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(0, 0, 0, 0.18);
        background-color: rgba(255, 255, 255, 0.99);
    }
    &.nav-next {
        &:before {
            //content: "\f105";
            // transform: translate( -50%, -50%) rotate( 45deg );
        }
        &:after {
            //transform: translate( -50%, -50%) rotate( -45deg );
        }
    }
    &.nav-prev {
        &:before {
            //content: "\f104";
        }
    }
    &:before,
    &:after {}
    &:before {}
    &:after {}
}

// Shape
.shape-rounded {
    border-radius: 10%;
}

.shape-circle {
    border-radius: 50%;
}

// Pre-defined classes.
.text-xsmall {
    font-size: 0.72em;
}

.text-small {
    font-size: 0.875em;
}

.text-large {
    font-size: 1.1em;
}

.text-uppercase {
    text-transform: uppercase;
    line-height: 1.2;
    &.text-xsmall {
        letter-spacing: 0.5px;
    }
}

.link-meta,
.link-meta a {
    color: $color_meta;
}

.link-meta a:hover {
    color: $color_link_hover;
}

.color-meta {
    color: $color_meta;
}


/* Customize Preview */

.customize-previewing {
    overflow-x: hidden;
    .builder-item-focus {
        &.item--inner {
            position: relative;
            &.has_menu {
                position: initial;
                .item--preview-name {
                    left: auto;
                }
            }
        }
        .item--preview-name {
            position: absolute;
            top: 100%;
            left: 0px;
            display: none;
            background: #0073aa;
            color: #fff;
            padding: 5px 8px 6px;
            font-size: 12px !important;
            font-weight: 600;
            line-height: 14px;
            cursor: pointer;
            border-bottom-left-radius: 2px;
            border-bottom-right-radius: 2px;
        }
        &:hover {
            &.item--inner {
                transition-delay: 0s !important;
                outline: 1px solid #0073aa;
                outline-offset: -1px;
                .item--preview-name {
                    display: block;
                    z-index: 9999999;
                }
            }
        }
    }
    .header--row,
    .header-menu-sidebar {
        .customize-partial-edit-shortcut {
            display: none;
        }
        .builder-item-focus {}
    }
    .footer--row {
        .builder-item-focus {
            &:hover {
                &.item--inner {
                    outline: 1px dashed #ff472e;
                    outline-offset: -1px;
                }
            }
        }
    }
}