/* $1. Lists */
/* ------------------------------ */
.moto-widget-text {
    * { transition: .3s; }
    li { position: relative; }
    ul {
        li {
            padding: 0 0 0 22px;
            &:not(:last-child) { margin-bottom: 8px; }
            &:before {
                position: absolute;
                display: inline-block;
                top: 50%;
                -webkit-transform: translateY(-50%);
                transform: translateY(-50%);
                left: 0;
                z-index: 0;
                font: 5px/1 FontAwesome;
                color: @baseColor1_3;
                content: "\f111";
                text-align: center;
                transition: .3s;
            }
        }
    }
    ol {
        counter-reset: moto-counter;
        li {
            padding: 0 0 0 75px;
            &:not(:last-child) { margin-bottom: 25px; }
            &:before {
                border-radius: 50%;
                position: absolute;
                display: inline-block;
                top: 0;
                left: 0;
                z-index: 0;
                width: 53px;
                height: 53px;
                text-align: center;
                background: @baseColor2_3;
                font: 700 40px/53px 'PT Sans', serif;
                color: @baseColor5_5;
                content: counter(moto-counter);
                counter-increment: moto-counter;
                text-align: center;
                transition: .3s;
            }
        }
    }
}

/* $2. Menu */
/* ------------------------------ */

.moto-widget-menu {
    &-toggle-btn {
        width: 40px;
        height: 40px;
        padding: 0 8px;
        &-icon {
            font-size: 24px;
            line-height: 40px;
        }
    }
    // General Styles for Menu Links
    &-link {
        padding: 8px 16px;
        font-size: 14px;
        line-height: 22px;
        position: relative;
        display: block;
        text-align: left;
        transition: .3s;
        letter-spacing: .7px;
        z-index: 1;
    }
    .moto-widget-menu-list {
        display: inline-block;
        @media screen and (max-width: @const_media_mobile-h_max_width) { display: none; }
        >.moto-widget-menu-item {
            .moto-widget-menu-sublist {
                top: calc(~"100% + 23px");
                min-width: 258px;
                padding: 5px 19px;
                left: -18px;
                box-shadow: 0 2px 12px rgba(136,136,136,.26);
                @media screen and (max-width: @const_media_tablet_max_width) {
                    min-width: 180px;
                }
                    &:before {
                        position: absolute;
                        top: -26px;
                        height: 26px;
                        left: 0;
                        width: 100%;
                        content: "";
                    }
                .moto-widget-menu-item {
                    .moto-widget-menu-link {
                        font-size: 14px;
                        line-height: 21px;
                        padding: 10px 0;
                        @media screen and (max-width: @const_media_tablet_max_width) {
                            font-size: 12px;
                            padding: 7px 0;
                        }
                    }
                    .moto-widget-menu-sublist {
                        top: -5px;
                        left: calc(~"100% + 23px");
                        &:before {
                            content: "";
                            width: 25px;
                            height: 100%;
                            top: 0;
                            left: -25px;
                            position: absolute;
                        }
                    }
                }
            }
        }
    }
    // -------- Menu 1 -------- 
    &.moto-preset-default {
        .moto-widget-menu-list {
            >.moto-widget-menu-item {
                &:not(:first-child) {
                    &:after {
                        content: '';
                        position: absolute;
                        left: -18px;
                        top: 50%;
                        width: 2px;
                        height: 2px;
                        border-radius: 50%;
                        .transform(0 , -50%);
                        @media screen and (max-width: @const_media_tablet_max_width) {
                            left: -7px;
                        }
                    }
                    margin-left: 36px;
                    @media screen and (max-width: @const_media_tablet_max_width) {
                        margin-left: 14px;
                    }
                }
                >.moto-widget-menu-link {
                    padding: 0;
                }
                .moto-widget-menu-sublist {
                    border-top-width: 2px;
                    border-top-style: solid;
                    .moto-widget-menu-item {
                        .moto-widget-menu-link {
                            border-bottom-width: 1px;
                            border-bottom-style: solid;
                            .moto-widget-menu-link-arrow {
                                display: block;
                                position: absolute;
                                right: 10px;
                                top: 50%;
                                .transform(0, -50%);
                                font-size: 10px;
                                &:before {
                                    content: "\f054";
                                }
                            }
                            &:after {
                                content: '';
                                height: 1px;
                                position: absolute;
                                width: 100%;
                                bottom: 0;
                                left: 0;
                            }
                        }
                        &:last-child {
                            .moto-widget-menu-link {
                                border: none;
                                &:after {
                                    display: none;
                                }
                            }
                        }
                        .moto-widget-menu-sublist {
                            top: -7px;
                        }
                    }
                }
            }
        }
    }
    // -------- Menu 2 -------- 
    &.moto-preset-2 {
        .moto-widget-menu-list {
            >.moto-widget-menu-item {
                &:not(:first-child) {
                    margin-left: 22px;
                }
                >.moto-widget-menu-link {
                    padding: 0;
                }
                .moto-widget-menu-sublist {
                    .moto-widget-menu-item {
                        .moto-widget-menu-link {
                            .moto-widget-menu-link-arrow {
                                display: block;
                                position: absolute;
                                right: 10px;
                                top: 50%;
                                .transform(0, -50%);
                                font-size: 20px;
                                &:before {
                                    content: "\f105";
                                }
                            }
                        }
                        &:last-child {
                            .moto-widget-menu-link {
                                &:after {
                                    display: none;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // -------- Menu 3 -------- 
    &.moto-preset-3 {
        .moto-widget-menu-list {
            >.moto-widget-menu-item {
                >.moto-widget-menu-link {
                    border-bottom: 2px solid;
                }
                .moto-widget-menu-sublist {
                    .moto-widget-menu-item {
                        &:last-child { .moto-widget-menu-link {&:after{content: none;}}}
                        .moto-widget-menu-link {
                            border-width: 2px;
                            border-style: solid;
                            .moto-widget-menu-link-arrow {
                                display: block;
                                position: absolute;
                                right: 10px;
                                top: 50%;
                                .transform(0, -50%);
                                font-size: 20px;
                                &:before {
                                    content: "\f105";
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    /* --- 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: 2px solid;
                z-index: 560;
                .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!important;
                            position: absolute!important;
                            right: 0!important;
                            top: 0;
                            text-align: center!important;
                            width: 50px!important;
                            height: 100%;
                            transition: .3s;
                            font-family: FontAwesome!important;
                            font-size: inherit !important;
                            color: inherit !important;
                            &: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: translate(0,0);
                        transform: translate(0,0);
                        &: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;
                                &:before,
                                &:after { display: none; }
                                &:hover {
                                    padding: 7px 40px;
                                }
                            }
                        }
                        /* --- third level menu --- */
                        .moto-widget-menu-sublist {
                            .moto-widget-menu-item {
                                .moto-widget-menu-link {
                                    padding: 7px 40px 7px 60px;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

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

.moto-widget-button {
    .moto-widget-button-link {
        position: relative;
        text-align: center;
        z-index: 1;
        transition: .3s;
        line-height: 20px;
        border: 2px solid;
        letter-spacing: 1px;
        &.moto-size-small {
            font-size: 12px;
            padding: 11px 27px;
            @media screen and (max-width: @const_media_tablet_max_width) {
                font-size: 11px;
            }
        }
        &.moto-size-medium {
            font-size: 14px;
            padding: 15px 39px;
            @media screen and (max-width: @const_media_tablet_max_width) {
                padding: 12px 16px;
                font-size: 12px;
            }
        }
        &.moto-size-large {
            font-size: 16px;
            padding: 18px 45px;
            @media screen and (max-width: @const_media_tablet_max_width) {
                font-size: 14px;
                padding: 14px 22px;
            }
        }
    }
    // BUTTON 1
    &.moto-preset-default {
        .moto-widget-button-link {
        }
    }
    &.moto-preset-2 {
        .moto-widget-button-link {

        }
    }
    &.moto-preset-3 {
        .moto-widget-button-link {

        }
    }
    &.moto-preset-4 {
        .moto-widget-button-link {
        }
    }
    // BUTTON 5
    &.moto-preset-5 {
        .moto-widget-button-link {
            padding: 0;
            border: none;
            letter-spacing: 0;
            .moto-widget-theme-icon {
                    font-size: 14px;
                    display: inline-block;
                    line-height: 20px;
                    transition: .3s;
                    position: relative;
                    margin-left: 8px;
                    float: right;
                &:before {
                    content: "\f105";
                    transition: .3s;
                }
            }
        }
    }
}

/* $4. Images */
/* ------------------------------ */

.moto-widget-image {
    .moto-widget-image-link {
        position: relative;
        overflow: hidden;
        transition: .3s;
        .moto-widget-image-picture { transition: .3s; }
        &:before, &:after {
            content: "";
            position: absolute;
            transition: all .3s ease-in-out;
        }
        &:before {
            left: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            border: 1px solid;
        }
        &:after {
            top: 50%;
            left: 50%;
            font-family: FontAwesome;
            font-size: 34px;
            z-index: 5;
            .transform();
        }
    }
    &.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
    &.moto-preset-3 {
        .moto-widget-image-link {
            .moto-widget-image-picture {
                opacity: .6;
            }
            &:after {
                top: 20%;
                content: "\f05a";
                font-size: 48px;
                left: 50%;
            }
            &:before {
                border: 2px solid;
            }
            &:hover {
                .moto-widget-image-picture {
                    opacity: 1;
                }
                &:after {
                    top: 50%;
                }
            }
        }
    }
    // Image 4
    &.moto-preset-4 {
        .moto-widget-image-link {
            &:before {
                border: 2px solid;
            }
            &:after {
                content: "\f01d";
                top: 50%;
                font-size: 60px;
            }
        }
    }
    &.moto-preset-5 {
        .moto-widget-image-link {
            &:before { border: 2px solid; }
            &:after { 
                font-size: 30px;
                content: '\f00e';
            }
        }
    }
}

/* $5. Grid Gallery */
/* ------------------------------ */
.moto-widget-grid-gallery {
    .moto-widget-grid-gallery-item {
        .moto-widget-grid-gallery-image {
            transition: .35s;
        }
        .caption {
            position: absolute;
            z-index: 99;
            display: block;
            transition: .35s;
            width: 100%;
            padding: 20px;
            bottom: 50%;
            top: auto;
            left: 50%;
            -webkit-transform: translate(-50%, 50%);
            transform: translate(-50%, 50%);
            opacity: 0;
            @media screen and (max-width: @const_media_tablet_max_width) {
                padding: 15px 20px 15px 23px;
            }
            &_text {
                text-align: center;
                font-size: 22px;
                line-height: 1.4;
                letter-spacing: .88px;
            }
            &-visible {
                opacity: 1;
                transition: .35s;
                transform: translate(-50%, 50%);
                -webkit-transform: translate(-50%, 50%);
                opacity: 1;
            }
        }
        &:before,
        &:after {
            position: absolute;
            transition: .35s;
        }
        &:before {
            content: "";
            top: 0;
            left: 0;
            z-index: 1;
            width: 100%;
            height: 100%;
            border-width: 1px;
            border-style: solid;
        }
        &:after {
            z-index: 10;
            font-family: FontAwesome;
            font-size: 32px;
        }
    }
            
    /* ========= GRID_GALLERY 1 PRESET ========= */
    &.moto-preset-default {
        .moto-widget-grid-gallery-item {
            .caption {
                opacity: 0;
                width: 100%;
                left: 0;
                bottom: 10%;
                -webkit-transform: translateY(50%);
                transform: translateY(50%);
                padding: 10px;
                z-index: 5;
                &-visible {
                    opacity: 1;
                }
            }
            &:after {
                bottom: 50%;
                left: 50%;
                width: auto;
                text-align: center;
                content: "\f055";
                font-size: 50px;
                transform: translate(-50%, 50%);
                -webkit-transform: translate(-50%, 50%);
            }
        }
    }
    /* ========= GRID_GALLERY 2 PRESET ========= */
    &.moto-preset-2 {
        .moto-widget-grid-gallery-items {
            .moto-widget-grid-gallery-item {
                transition: .3s;
                .caption {
                    left: 0;
                    opacity: 1;
                    bottom: 0;
                    width: auto;
                    opacity: 0;
                    -webkit-transform: none;
                    transform: none;
                    &-visible {
                        opacity: 1;
                    }
                }
                &:after {
                    bottom: 50%;
                    left: 50%;
                    width: auto;
                    text-align: center;
                    content: "\f002";
                    font-size: 20px;
                    transform: translate(-50%, 50%);
                    -webkit-transform: translate(-50%, 50%);
                }
            }
        }
    }
    /* ========= GRID_GALLERY 3 PRESET ========= */
    &.moto-preset-3 {
        .moto-widget-grid-gallery-items {
            .moto-widget-grid-gallery-item {
                .caption {
                    bottom: 50%;
                }
                &:after {
                    bottom: 20%;
                    width: 100%;
                    right: 50%;
                    transform: translate(50%, 50%);
                    -webkit-transform: translate(50%, 50%);
                    text-align: center;
                    content: "\f068";
                    font-size: 24px;
                    z-index: 99;
                }
                &:hover {
                    .moto-widget-grid-gallery-image {
                        -webkit-transform: scale(1.1);
                        transform: scale(1.1);
                    }
                }
            }
        }
    }
}

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

.moto-widget-slider {
    .bx-wrapper {
        .bx-controls {
            font-size: 0;
            a { transition: .3s; }
            .bx-pager {
                position: absolute;
                bottom: 75px;
                @media screen and (max-width: @const_media_tablet_max_width) {
                    bottom: 10px;
                }
                .bx-pager-item {
                    &:not(:first-child) { margin-left: 12px; }
                    .bx-pager-link {
                        border-width: 1px;
                        border-style: solid;
                        width: 7px;
                        height: 7px;
                        transition: .3s;
                        border-radius: 50%;
                    }
                }
            }
            .bx-controls-direction {
                a { z-index: 1; }
                .bx-prev, 
                .bx-next {
                    display: block;
                    position: absolute;
                    text-align: center;
                    top: 50%;
                    .transform(0, -50%);
                    border-width: 2px;
                    border-style: solid;
                    width: 80px;
                    height: 80px;
                    transition: .3s;
                    border-radius: 0;
                    @media screen and (max-width: @const_media_mobile-h_max_width) {
                        width: 40px;
                        height: 40px;
                    }
                    &:before {
                        transition: .3s;
                        font: 26px/76px FontAwesome;
                        @media screen and (max-width: @const_media_mobile-h_max_width)  {
                            font: 16px/36px FontAwesome;
                        }
                    }
                }
                .bx-prev {
                    left: 0;
                    &:before { content: "\f053"; }
                }
                .bx-next {
                    right: 0;
                    &:before { content: "\f054"; }
                }
            }
        }
    }
    .bx-caption { 
        left: 0;
        right: 0;
        margin: 0 auto;
        top: 50%;
        -webkit-transform: translate(0,-50%);
        transform: translate(0,-50%);
        padding: 10px;
        width: 67%;
        &_text {
            text-align: center;
            font-size: 100px;
            line-height: 1.2;
            @media screen and (max-width: @const_media_tablet_max_width) {
                font-size: 18px;
            }
        }
    }
    .carousel-block {
        padding-bottom: 20px;
        .bx-wrapper {
            padding: 0 45px;
            .bx-controls {
                .bx-pager {
                    bottom: -20px!important;
                    position: relative;
                    right: 0;
                    left: 0;
                    margin: 0 auto;
                    width: 100%;
                }
                .bx-controls-direction {
                    .bx-prev {
                        left: 0;
                    }
                    .bx-next {
                        right: 0;
                    }
                }
            }
        }
    }
    &.moto-widget-slider-loader {
        li:first-child {
            &:after {
                border-top-color: fade(@baseColor1_2, 20%);
                border-right-color: fade(@baseColor1_2, 20%);
                border-bottom-color: fade(@baseColor1_2, 20%);
                border-left-color: @baseColor1_2;
            }
        }
    }
    /* ========= SLIDER 1 PRESET ========= */
    &.moto-preset-default {
        .bx-wrapper {
            .bx-controls {
                .bx-pager {
                    width: 100%;
                    position: absolute;
                    bottom: 60px;
                    @media screen and (max-width: @const_media_tablet_max_width) {
                        bottom: 10px;
                    }
                    @media screen and (max-width: @const_media_mobile-h_max_width) {
                        bottom: 5px;
                    }
                }
            }
        }
        .carousel-block {
            padding-bottom: 40px;
            .bx-wrapper {
                padding: 0 90px;
                .bx-controls {
                    // .bx-controls-direction {
                    //     display: inline-block;
                    //     position: absolute;
                    //     bottom: -50px;
                    //     top: auto;
                    //     left: auto;
                    //     right: 0;
                    //     .bx-prev, 
                    //     .bx-next {
                    //         display: inline-block;
                    //         position: relative;
                    //         top: auto;
                    //         -webkit-transform: none;
                    //         transform: none;
                    //     }
                    //     .bx-next {
                    //         right: auto;
                    //     }
                    //     .bx-prev {
                    //         left: auto;
                    //         margin-right: 1px;
                    //     }
                    // }
                    .bx-pager {
                        bottom: -40px !important;
                    }
                }
            }
        }
    }
    /* ========= SLIDER 2 PRESET ========= */
    &.moto-preset-2 {
        .bx-wrapper {
            .bx-controls {
                .bx-pager {
                    .bx-pager-item {
                        .bx-pager-link {
                            border: none;
                        }
                    }
                }
                .bx-controls-direction {
                    .bx-prev, 
                        .bx-next {
                            width: 40px;
                            height: 40px;
                            &:before {
                                transition: .3s;
                                font: 14px/38px FontAwesome;
                            }
                        }
                    .bx-prev {
                        left: 20px;
                    }
                    .bx-next {
                        right: 20px;
                    }
                }
            }
        }
        .carousel-block {
            padding-bottom: 60px;
            .bx-wrapper {
                padding: 0;
                .bx-controls {
                     .bx-controls-direction {
                        display: inline-block;
                        position: absolute;
                        bottom: -60px;
                        top: auto;
                        left: auto;
                        right: 0;
                        a { z-index: 1; }
                        .bx-prev, 
                        .bx-next {
                            display: inline-block;
                            position: relative;
                            top: auto;
                            -webkit-transform: none;
                            transform: none;
                        }
                        .bx-prev {
                            right: auto;
                            margin-right: 6px;
                            left: auto;
                        }
                        .bx-next {
                            left: auto;
                            right: 0;
                        }
                    }
                    .bx-pager {
                        bottom: -40px !important;
                    }
                }
            }
        }
    }
}


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

.moto-widget-contact_form {
    input[type="text"]:focus { outline: none; background-color: transparent;}
    textarea:focus {outline: none;}
    .moto-widget-contact_form-success, .moto-widget-contact_form-danger { position: relative; font-size: 13px; }
    .moto-widget-contact_form-form { overflow: visible; }
    .moto-widget-contact_form-label { display: none; }
    .moto-widget-contact_form-group {
        margin-bottom: 20px;
        .moto-widget-contact_form-field {
            padding: 13px 20px;
            font-size: 14px;
            line-height: 24px;
            border: 1px solid;
            &.moto-widget-contact_form-textarea {
                min-height: 200px;
                margin-bottom: 10px;
            }
        }
    }
    .moto-widget-contact_form-buttons {
        margin-top: 20px;
    }
    .moto-widget-contact_form-field-error {
        right: 18px;
        top: 2px;
        font-size: 10px;
        position: absolute;
    }
    /* ========= CONTACT FORM 1 PRESET ========= */
    &.moto-preset-default {
        .moto-widget-contact_form-group {
            .moto-widget-contact_form-field {
                text-align: center;
                font-size: 12px;
            }
            .moto-widget-contact_form-field {
                text-align: center;
                &:active, &:focus {
                    &::-webkit-input-placeholder { color: transparent; }
                    &::-moz-placeholder          { color:transparent; }
                    &:-moz-placeholder           { color:transparent; }
                    &:-ms-input-placeholder      { color:transparent; }
                }
            }
        }
    }
    /* ========= CONTACT FORM 2 PRESET ========= */
    &.moto-preset-2 {
        .moto-widget-contact_form-group {
            .moto-widget-contact_form-field {
                font-size: 16px;
                line-height: 25px;
                padding: 15px 20px;
            }
        }
        .moto-widget-contact_form-success, .moto-widget-contact_form-danger { position: relative; bottom: 25px; }
    }
    /* ========= CONTACT FORM 3 PRESET ========= */
    &.moto-preset-3 {
        .moto-widget-contact_form-group {
            .moto-widget-contact_form-field {
                line-height: 24px;
                padding: 10px 17px;
                border-radius: 35px;
            }
        }
        // .moto-widget-contact_form-buttons {
        //     .moto-widget-button {
        //         .moto-widget-button-link {
        //             &.moto-size-large {
        //                 width: 100%;
        //                 min-width: 0;
        //                 padding: 10px 30px;
        //             }
        //         }
        //     }
        // }
    }
}

/* $9. Back To Top */
/* ------------------------------ */

.moto-back-to-top-button {
    right: 20px;
    bottom: -90px;
    transition: .3s;
    &.moto-back-to-top-button_visible {  
        bottom: 80px;
    }
    .moto-back-to-top-button-link {
        transition: .3s;
        color: @baseColor5_5;
        background-color: @baseColor1_3;
        font: 18px/58px 'FontAwesome';
        text-align: center;
        height: 58px;
        width: 58px;
        border-radius: 50%;
        &:hover {  
            background: @baseColor1_3;
         }
        .moto-back-to-top-button-icon {
            &:before { 
                content: "\f062";
            }
        }
    }
}

/* $10. Accordion */
/* ------------------------------ */

.moto-widget-accordion {
    &.moto-preset-default {
        .moto-widget-accordion {
            &__header {
                padding: 45px 0;
            }
            &__content {
                padding: 0 12px 45px 5px;
            }
        }
    }
    &.moto-preset-2 {
        .moto-widget-accordion {
            &__header {
                padding: 45px 0;
            }
            &__content {
                padding: 0 12px 45px 5px;
            }
        }
    }
}

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