/* $1. Lists */
/* ------------------------------ */

/* --- general styles for lists --- */
.moto-widget-text {
    a { transition: .3s; }
    li { 
        position: relative;
        &:before {
            position: absolute;
            content: '';
            transition: .3s;
            left: 0;
            top: 50%;
            .transform(0 , -50%);
        }
     }
    ul {
        li {
            padding: 0 0 0 15px;
            &:not(:last-child) { margin-bottom: 10px; }
            &:before {
                width: 4px;
                height: 4px;
                border-radius: 50%;
                background: @baseColor1_3;
            }
        }
    }
    ol {
        counter-reset: moto-counter;
        li {
            padding-left: 33px;
            &:not(:last-child) { margin: 0 0 10px; }
            &:before {
                font:  400 italic 20px/1 'Merriweather';    
                color: @baseColor1_3;
                transition: .3s;
                content: counter(moto-counter,decimal-leading-zero) ".";
                counter-increment: moto-counter;
            }
        }
    }
}
/* $2. Menu */
/* ------------------------------ */

/* --- general styles for menu presets --- */
.moto-widget-menu {
    .moto-widget-menu-toggle-btn {
        width: 40px;
        height: 40px;
        padding: 0 8px;
        .moto-widget-menu-toggle-btn-icon {
            font-size: 24px;
            line-height: 40px;
        }
    }
    .moto-widget-menu-list {
        display: inline-block;
        @media screen and (max-width: @const_media_mobile-h_max_width) { display: none; }
        > .moto-widget-menu-item {
            &:not(:first-child) { margin-left: 10px; }
            > .moto-widget-menu-link {
                position: relative;
                display: block;
                text-align: center;
                font-size: 16px;
                line-height: 1.25;
                transition: .3s;
                @media screen and (max-width: @const_media_tablet_max_width) { font-size: 14px; }
            }
        }

        .moto-widget-menu-sublist {  
            top: calc(~'100% + 5px');
            left: 0;
            min-width: 210px;
            transition: .3s;
            @media screen and (max-width: @const_media_tablet_max_width) { min-width: 170px; }
            &:before {
                position: absolute;
                top: -6px;
                height: 6px;
                left: 0;
                width: 100%;
                content: "";
            }
            .moto-widget-menu-item {
                .moto-widget-menu-link {
                    font-size: 14px;
                    text-align: left;
                    padding: 14px 22px;
                    transition: .4s;
                    @media screen and (max-width: @const_media_tablet_max_width) {  font-size: 12px; }
                }

            }   
            /* --- 3rd Level --- */
            .moto-widget-menu-sublist {
                left: calc(~'100% + 10px')!important;
                &:before {
                    top: 0;
                    left: -11px;
                    width: 11px;
                    height: 100%;
                    position: absolute;
                    content: '';
                }
            }
        }
    }
    /* --- Menu default preset --- */
    &.moto-preset-default {
        .moto-widget-menu-list {
            >.moto-widget-menu-item {
                &:not(:first-child) { margin-left: 0; }
                >.moto-widget-menu-link {
                    padding: 45px 22px;
                    border-width: 8px 0 0;
                    border-style: solid;
                    @media screen and (max-width: @const_media_tablet_max_width) { padding: 21px 5px; }
                }
            }
            .moto-widget-menu-sublist {
                top: 100%;
                &:before { width: 0; }
                .moto-widget-menu-item {
                    &:not(:last-child) {
                        .moto-widget-menu-link {
                            &:after {
                                content: "";
                                position: absolute;
                                left: 0;
                                right: 0;
                                bottom: 0;
                                margin: 0 auto;
                                width: auto;
                                height: 1px;
                            }
                        }                    
                    }
                }
                .moto-widget-menu-sublist {
                    top: 0;
                    &:before { width: 11px; }
                    .moto-widget-menu-item { &:last-child { .moto-widget-menu-link { &:after { display: none; } } } }
                }
            }
        }
    }
    /* --- Menu 2 preset --- */
    &.moto-preset-2 {
        .moto-widget-menu-list {
            >.moto-widget-menu-item {
                &:not(:first-child) { margin-left: 10px; }
                >.moto-widget-menu-link { padding: 6px 12px;  }
            }
        }
    }
    /* --- Menu 3 preset --- */
    &.moto-preset-3 {
        .moto-widget-menu-list {
            >.moto-widget-menu-item {
                &:not(:first-child) { margin-left: 0px; }
               >.moto-widget-menu-link {
                    padding: 0 5px 5px;
                    border-width: 0 0 3px;
                    border-style: solid;
                }
            }
            .moto-widget-menu-sublist {
                box-shadow: 1px 1px 17px -4px rgba(0, 0, 0, 0.2);
                .moto-widget-menu-item {
                    .moto-widget-menu-link {
                        padding: 9px 22px;
                        &:hover{ padding: 9px 30px;  }
                    }              
                }
                .moto-widget-menu-sublist {
                    .moto-widget-menu-item { &:last-child { .moto-widget-menu-link { &:after { display: none; } } } }
                }
            }
        }
    }
    /* --- General mobile menu styles --- */
        &.moto-widget-menu-mobile-open {
        @media screen and (max-width: @const_media_mobile-h_max_width) {
            .moto-widget-menu-list {
                border: 1px solid;
                .moto-widget-menu-item {
                    border: none;
                    margin: 0!important;
                    padding: 0;
                    &:after, 
                    &:before { display: none; }
                    &:not(:last-child) { border-bottom: 1px solid; }
                    .moto-widget-menu-link {
                        padding: 10px 50px 10px 20px;
                        font-size: 18px;
                        line-height: 1.2;
                        text-align: left;
                        border: none;
                        border-radius: 0;
                        &:after,
                        &:before { display: none; }
                        .moto-widget-menu-link-arrow {
                            display: block;
                            position: absolute;
                            right: 0;
                            top: 0;
                            text-align: center;
                            width: 50px;
                            height: 100%;
                            transition: .3s;
                            font-size: 18px;
                            &:after {
                                content: "\f107";
                                display: -webkit-box;
                                display: -webkit-flex;
                                display: flex;
                                -webkit-box-pack: center;
                                -webkit-justify-content: center;
                                justify-content: center;
                                -webkit-box-align: center;
                                -webkit-align-items: center;
                                align-items: center;
                                height: 100%;
                            }
                            &:before {display: none;}
                        }
                    }
                    .moto-widget-menu-sublist {
                        width: 100%;
                        padding: 0;
                        border: none;
                        box-shadow: none;
                        border-radius: 0;
                        -webkit-transform: none;
                        -moz-transform: none;
                        transform: none;
                        &:before,
                        &:after { content: none; }
                        .moto-widget-menu-item {
                            width: 100%;
                            border-bottom: none;
                            .moto-widget-menu-link {
                                padding: 7px 40px;
                                font-size: 14px;
                                margin: 0;
                                border: none;
                                text-align: left;
                                .moto-widget-menu-link-arrow {
                                    right: 0;
                                    top: 50%;
                                    font-size: 18px;
                                    transform: translateY(-50%);
                                    -webkit-transform: translateY(-50%);
                                    color: inherit!important;
                                }
                                &:before,
                                &:after { display: none; }
                            }
                        }
                        /* --- third level menu --- */
                        .moto-widget-menu-sublist {
                            .moto-widget-menu-item {
                                .moto-widget-menu-link {padding: 7px 40px 7px 60px;}
                            }
                        }
                    }
                }
            }
        }
    }
}

/* $3. Buttons */
/* ------------------------------ */

/* --- general styles for button presets --- */
.moto-widget-button {
    .moto-widget-button-link {
        position: relative;
        text-align: center;
        z-index: 1;
        -webkit-backface-visibility: hidden;
        line-height: 1.5;
        border-width: 2px;
        border-style: solid;
        border-radius: 30px;
        transition: all .3s;
        font-size: 16px;
        letter-spacing: 0.64px;
        .moto-widget-button-label { position: relative; }
        &.moto-size-small   {
            padding: 15px 38px;
            @media screen and (max-width: @const_media_tablet_max_width) {  padding: 10px 20px; }
        }
        &.moto-size-medium  {
            padding: 17px 38px;
            @media screen and (max-width: @const_media_tablet_max_width) { padding: 12px 20px; }
        }
        &.moto-size-large   {
            padding: 15px 48px;
            @media screen and (max-width: @const_media_tablet_max_width) { padding: 10px 25px; } 
        }
    }
    /* --- Button 3 preset --- */
    &.moto-preset-3 {
        .moto-widget-button-link {  
        }
    }
    /* --- Button 4 preset --- */
    &.moto-preset-4 {
        .moto-widget-button-link {
            min-width: 0;
            padding: 0;
            border-radius: 0;
            border:none;
            letter-spacing: 0;
            &.moto-size-medium  { font-size: 18px; }
            &.moto-size-large   { font-size: 20px; }
        }
    }
    /* --- Button 5 preset --- */
    &.moto-preset-5 {
        .moto-widget-button-link {
            &:hover {
                transform: translateY(-5px);
                -webkit-transform: translateY(-5px);
                -ms-transform: translateY(-5px);
            }
        }
    }
}

/* $4. Images */
/* ------------------------------ */
/* --- general styles for image presets --- */
.moto-widget-image {
    .moto-widget-image-link {
        position: relative;
        overflow: hidden;
        transition: .3s;
        &:before {
            width: 100%;
            height: 100%;
            z-index: 1;
            left: 0;
            top: 0;
            border-width: 1px;
            border-style: solid;
        }
        &:after {
            z-index: 2;
            left: 50%;
            top: 50%;
            opacity: 1;
            font: 24px/1 'FontAwesome';
            .transform(-50%, -50%);
        }
        &:before,
        &:after {
            position: absolute;
            content: "";
            transition: 0.4s all ease;
        }
    }
    .moto-widget-image-picture { transition: .3s; }
    /* --- Image default, 2 preset --- */
    &.moto-preset-default { .moto-widget-image-link { &:before { display: none; } } }
    &.moto-preset-2 { .moto-widget-image-link { border-radius: 50%; &:before { display: none;} } }
        
    /* --- Image 3 preset --- */
    &.moto-preset-3 {
        .moto-widget-image-link {
            &:after {  
                content: "\f00e";
                transform: translate(-50% , -50%) scale(0);
                -webkit-transform: translate(-50% , -50%) scale(0);
                -ms-transform: translate(-50% , -50%) scale(0);
            }
            &:hover:after { 
                transform: translate(-50% , -50%) scale(1);
                -webkit-transform: translate(-50% , -50%) scale(1);
                -ms-transform: translate(-50% , -50%) scale(1);
            }
        }
    }
    /* --- Image 4 preset --- */      
    &.moto-preset-4 {
        .moto-widget-image-link {
            &:after { display: none;}
        }
    }
    /* --- Image 5 preset --- */
    &.moto-preset-5 {
        .moto-widget-image-link {
            &:after {   content: "\f121"; }
            &:hover { 
                .moto-widget-image-picture {
                    transform: scale(1.05);
                    -webkit-transform: scale(1.05);
                    -ms-transform: scale(1.05);
               }
            }
        }    
    }
}

/* $5. Grid Gallery */
/* ------------------------------ */

/* --- general styles for grid gallery presets --- */
.moto-widget-grid-gallery {
    .moto-widget-grid-gallery-item {
        overflow: hidden;
        .caption {
            position: absolute;
            z-index: 99;
            display: block;
            top: 50%;
            left: 0;
            right: 0;
            margin: 0 auto;
            bottom: auto;
            width: auto;
            max-width: 90%;
            padding: 15px;
            opacity: 0;
            .transform(0 , -50%);
            transition: .4s;
            @media screen and (max-width: @const_media_mobile-h_max_width) {padding: 5px;}
            &_text {
                text-align: center;
                font-size: 14px;
                line-height: 20px;
            }
            &-visible { opacity: 1; }
        }
        &:before {
            width: 100%;
            height: 100%;
            z-index: 1;
            left: 0%;
            top: 0;
        }
        &:after {
            z-index: 2;
            font: 24px/1 'FontAwesome';
            left: 50%;
            top: 50%;
            opacity: 1;
            .transform(-50% , -50%);
        }
        &:before,
        &:after {
            position: absolute;
            content: "";
            transition: all .4s;
        }
        .moto-widget-grid-gallery-image { transition: all .4s; }
    }
     /* --- Grid Gallery default preset --- */
    &.moto-preset-default {
        .moto-widget-grid-gallery-item {
            .caption {
                top: auto;
                bottom: 0;
                left: 5%;
                right: 5%;
                width: auto;
                transform:none;
                max-width: none;
                &-visible { bottom: 10%; }
            }
            &:after {  
                content: "\f00e";
                transform: translate(-50% , -50%) scale(0);
                -webkit-transform: translate(-50% , -50%) scale(0);
                -ms-transform: translate(-50% , -50%) scale(0);
            }
            &:hover:after { 
                transform: translate(-50% , -50%) scale(1);
                -webkit-transform: translate(-50% , -50%) scale(1);
                -ms-transform: translate(-50% , -50%) scale(1);
            }
        }
    }
    /* --- Grid Gallery 2 preset --- */
    &.moto-preset-2 {
        .moto-widget-grid-gallery-item {
            .caption {
                left: 0;
                right: 0;
                width: auto;
                max-width: 60%;
                transform:translateY(-50%) scale(0);
                -webkit-transform: translateY(-50%) scale(0);
                -ms-transform: translateY(-50%) scale(0);
                opacity: 0;
                &-visible { 
                    opacity: 1;
                    transform:translateY(-50%) scale(1);
                    -webkit-transform: translateY(-50%) scale(1);
                    -ms-transform: translateY(-50%) scale(1);
                }
                &_text {
                    font-size: 30px;
                     @media screen and (max-width: @const_media_mobile-h_max_width) { font-size: 20px; }
                }
            }
        }
    }
    /* --- Grid Gallery 3 preset --- */
    &.moto-preset-3 {
        .moto-widget-grid-gallery-item {
            .caption {
                top: 60%;
                transition: .3s;
                &-visible { top: 50%; }
            }
            &:before {
                top: 20%;
                transition: .3s;
            }
            &:hover:before { top: 0; } 
        }
    }
}

/* $6. Sliders and Carousel */
/* ------------------------------ */

/* --- general styles for slider presets --- */
.moto-widget-slider {
    .bx-pager {
        position: absolute;
        bottom: 20px;
        left: 0;
        right: 0;
        @media screen and (max-width: @const_media_tablet_max_width) {bottom: 5px;}
    }
    .bx-pager-item { 
        &:not(:first-child) { 
            margin-left: 20px;
            @media screen and (max-width: @const_media_mobile-h_max_width) { margin-left: 10px; }
        } 
    }
    .bx-pager-link {
        width: 14px;
        height: 14px;
        border-width: 3px;
        border-style: solid;
        font-size: 0;
        transition: all .3s;
        @media screen and (max-width: @const_media_mobile-h_max_width) {
            width: 8px;
            height: 8px;
            border-width: 2px;
        }
    }
    .bx-caption {
        top: 50%;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: auto;
        padding: 10px;
        max-width: 75%;
        .transform(0 , -50%);
        @media screen and (max-width: @const_media_mobile-h_max_width) { padding: 5px; }
        &_text {
            text-align: center;
            font-size: 130px;
            line-height: 1.15;
            @media screen and (max-width: @const_media_tablet_max_width) { font-size: 44px; }
            @media screen and (max-width: @const_media_mobile-h_max_width) { font-size: 18px; }
        }
    }
    .bx-controls-direction {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        .transform(0 , -50%);
        .bx-prev,
        .bx-next {
            top: 50%;
            width: 58px;
            height: 58px;
            text-align: center;
            font: 0/1 'FontAwesome'; 
            border-width: 1px;
            border-style: solid;
            transition: all .3s;
            .transform(0 , -50%);
            border-radius: 50%;
            @media screen and (max-width: @const_media_mobile-h_max_width) {
                width: 30px;    
                height: 30px;
            }
            &:before { 
                font-size: 30px;
                line-height: 53px;
                transition: all .3s;
                @media screen and (max-width: @const_media_mobile-h_max_width) {
                    line-height: 29px;
                    font-size: 14px;
                }
            }
        }
        .bx-prev {
            left: 0;
            padding-right: 2px;
            &:before { content: "\f104"; }
        }
        .bx-next {
            right: 0;
            padding-left: 2px;
            &:before { content: "\f105"; }
        }
    }
    /* --- general styles for carousel presets --- */
    &.moto-widget-carousel {
        .bx-wrapper {
            padding: 0 60px;
            @media screen and (max-width: @const_media_mobile-h_max_width) { padding: 0 40px;  }
        }
        .carousel-block { padding: 0 0 40px; }
        .bx-pager {  bottom: -38px; }
        .bx-controls-direction {
            .bx-prev {left: 0;}
            .bx-next {right: 0;}
        }
    }
}
/* --- Slider default preset --- */ 
&.moto-preset-default {
    .bx-controls-direction {
        .bx-prev {
            left: 1%;
            &:hover { padding-right: 8px; }
        }
        .bx-next {
            right: 1%;
            &:hover { padding-left: 8px; }
        }
    }
}

/* --- Slider 2 preset --- */
&.moto-preset-2 {
    .bx-pager {
        bottom: 50px;
        @media screen and (max-width: @const_media_tablet_max_width) { bottom: 25px; }
        @media screen and (max-width: @const_media_mobile-h_max_width)  { bottom: 5px; }
    }
    .bx-pager-link {  border-radius: 50%; }
    .bx-controls-direction {
        .bx-prev,
        .bx-next {
            width: auto;
            height: auto;
            border: none;
            border-radius: 0;
            &:before {
                font-size: 30px;
                line-height: 1;
                @media screen and (max-width: @const_media_mobile-h_max_width) { font-size: 14px; }
            }  
        }
        .bx-prev {
            left: 1%;
            &:before { content: "\f053"; }
        }
        .bx-next {
            right: 1%;
            &:before { content: "\f054"; }
        }    
    }
}

/* $7. Social Icons */
/* ------------------------------ */

/* --- general styles for social links--- */
.moto-widget-social-links {
    .moto-widget-social-links-item {
        &:not(:first-child) { 
            margin: 0 0 0 10px;
            @media screen and (max-width: @const_media_tablet_max_width) { margin: 0 0 0 4px;  }
        }
        .moto-widget-social-links-link {
            position: relative;
            display: inline-block;
            width: 38px;
            height: 38px;
            text-align: center;
            font: 16px/38px 'FontAwesome';
            transition: all .3s;
            border-radius: 50%;
            @media screen and (max-width: @const_media_tablet_max_width) {
                width: 28px;
                height: 28px;
                text-align: center;
                font: 13px/28px 'FontAwesome';
            }
            &:before {
                display: block;
                transition: .3s;
            }
        }
    }

    .moto-widget-social-links-link_facebook   { &:before { content: "\f09a"; } }
    .moto-widget-social-links-link_googleplus { &:before { content: "\f0d5"; } }
    .moto-widget-social-links-link_twitter    { &:before { content: "\f099"; } }
    .moto-widget-social-links-link_pinterest  { &:before { content: "\f0d2"; } }
    .moto-widget-social-links-link_linkedin   { &:before { content: "\f0e1"; } }
    .moto-widget-social-links-link_instagram  { &:before { content: "\f16d"; } } 

    /* --- Social links default preset --- */
    &.moto-preset-default {
        .moto-widget-social-links-item {
            &:not(:first-child) {  margin: 0 0 0 15px; }
            .moto-widget-social-links-link {
                width: auto;
                height: auto;
                line-height: 1;
                border-radius: 0;
            }
        }
    }
    /* --- Social links 2 preset --- */
    &.moto-preset-2 {
        .moto-widget-social-links-item {
            .moto-widget-social-links-link {
                border-width: 2px;
                border-style: solid; 
                line-height: 34px;
                @media screen and (max-width: @const_media_tablet_max_width)  {
                    border-width: 1px;
                    line-height: 24px;
                }
            }
        }
    }
    /* --- Social links 3 preset --- */
    &.moto-preset-3 {
        .moto-widget-social-links-item {
            .moto-widget-social-links-link { 
                width: 40px;
                height: 40px;
                line-height: 40px;
            }
        }
    }
}

/* $8. Contact Forms */
/* ------------------------------ */

/* --- default contact form preset --- */
.moto-widget-contact_form {
    .moto-widget-contact_form-form { overflow: visible; }
    .moto-widget-contact_form-group {
        padding-bottom: 18px;
        .moto-widget-contact_form-label { display: none; }
        .moto-widget-contact_form-field {
            font-size: 20px;
            padding: 12px 20px;
            line-height: normal;
            height: 61px;
            outline: none;
            border-width: 1px;
            border-style: solid;
            @media screen and (max-width: @const_media_tablet_max_width) { font-size: 16px; }
            &.moto-widget-contact_form-textarea { min-height: 150px; }
        }
        .moto-widget-contact_form-field-error,
        .moto-widget-contact_form-required {
            position: absolute;
            font-size: 11px;
            top: 4px;
            right: 5px;
            line-height: 1;
        }
    }
    .moto-widget-contact_form-success,
    .moto-widget-contact_form-danger {
        position: relative;
        font-size: 12px;
        bottom: 15px;
    }
    /* --- Contact form default preset --- */
    &.moto-preset-default {
        .moto-widget-contact_form-group {
            .moto-widget-contact_form-field {
                font-size: 16px;
                height: 56px;
            }
        }
    }
     /* --- Contact form 2 preset --- */
    &.moto-preset-2 {}
    /* --- Contact form 3 preset --- */
    &.moto-preset-3 {}
}

/* $9. Back-to-top */
/* ------------------------------ */
/* --- default back-to-top styles --- */
.moto-back-to-top-button {
    .transform(0,100px);
    right: 40px;
    bottom: 40px;
    transition: .3s;
    &.moto-back-to-top-button_visible { .transform(0,0); }
    .moto-back-to-top-button-link {
        width: 58px;
        height: 58px;
        font: 700 32px/54px 'FontAwesome';
        color: @baseColor5_5;
        background: @baseColor1_3;
        text-align: center;
        transition: .3s;
        border-radius: 50%;
        @media screen and (max-width: @const_media_tablet_max_width) {
            width: 40px;
            height: 40px;
            font: 18px/38px 'FontAwesome';
        }
        .moto-back-to-top-button-icon {         
            &:before { content: "\f106"; }
        }
        &:hover { 
            background: @baseColor2_3;
            box-shadow: 0px 0px 1px 1px fade(@baseColor5_5 , 20%); 
        }
    }
}

/* $0. Mixins */
/* ------------------------------ */
.transform(@X: -50%; @Y: -50%;) {
    -webkit-transform: translate(@X, @Y);
    transform: translate(@X, @Y);
}