/*=======  Sidebar & Widgets  =======*/
.widget-area {
    @include respond-below(md) {
        margin-top: 50px;
    }
}

.widget {
    padding: 40px;
    border: 2px solid #ededed;
    margin-bottom: 40px;

    @include respond-between(md, lg) {
        padding: 35px 25px;
    }

    @include respond-below(xs) {
        padding: 35px 25px;
    }

    &:last-child {
        margin-bottom: 0;
    }

    .widget-title {
        font-size: 20px;
        text-transform: uppercase;
        margin-bottom: 35px;
        padding-left: 45px;
        position: relative;

        &::before,
        &::after {
            content: "";
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            background-color: $primary-color;
        }

        &::before {
            height: 4px;
            width: 18px;
            border-radius: 2px;
        }

        &::after {
            left: 22px;
            height: 4px;
            width: 4px;
            border-radius: 50%;
        }
    }

    &.widget_categories,
    &.widget_archive,
    &.yankee-service-list {
        li {
            @include transition(0.3s);

            &:not(:last-child) {
                margin-bottom: 10px;
            }

            .children {
                margin-top: 10px;
                padding-left: 10px;
            }

            a {
                background-color: $secondary-color;
                display: block;
                color: $white;
                font-size: 14px;
                font-family: $raj;
                font-weight: 700;
                text-transform: uppercase;
                padding: 14px 50px 14px 30px;
                position: relative;
                @include transition(0.3s);

                .posts-count {
                    position: absolute;
                    right: 0;
                    width: 50px;
                    height: 100%;
                    background-color: #131718;
                    top: 0;
                    color: $white;
                    font-size: 14px;
                    font-family: $raj;
                    text-align: center;
                    line-height: 50px;
                    @include transition(0.3s);
                }

                &:hover {
                    color: $white;
                    background-color: $primary-color;

                    .posts-count {
                        background-color: #ea9d19;
                    }
                }
            }
        }
    }

    &.widget_calendar {
        caption {
            font-weight: 700;
            font-size: 15px;
            color: $secondary-color;
            font-family: $raj;
        }

        .wp-calendar-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 15px;
        }
    }

    &.widget_pages,
    &.widget_meta,
    &.widget_nav_menu,
    &.widget_recent_entries {
        li {
            &:not(:last-child) {
                margin-bottom: 10px;
            }

            .children,
            .sub-menu {
                margin-top: 10px;
                padding-left: 10px;
            }

            a {
                color: $secondary-color;
                font-size: 15px;
                font-weight: 600;

                &:hover {
                    color: $primary-color;
                    padding-left: 8px;
                }
            }
        }
    }

    &.widget_recent_comments {
        li {
            &:not(:last-child) {
                margin-bottom: 10px;
            }

            a {
                color: $secondary-color;
                font-size: 15px;
                font-weight: 500;

                &:hover {
                    color: $primary-color;
                }
            }

            .comment-author-link {
                a {
                    font-weight: 700;
                }
            }
        }
    }

    &.widget_rss {
        li {
            &:not(:last-child) {
                margin-bottom: 15px;
            }

            a.rsswidget {
                font-size: 18px;
                display: block;
                color: $secondary-color;
                font-weight: 700;
                margin-bottom: 8px;
                line-height: 1.1;
                font-family: $raj;

                &:hover {
                    color: $primary-color;
                }
            }

            span.rss-date,
            cite {
                font-size: 14px;
                margin-bottom: 5px;
                font-weight: 600;
            }

            .cite {
                margin-top: 8px;
                margin-bottom: 0;
                display: block;
            }
        }
    }

    &.widget_search {
        form {
            position: relative;

            input {
                background-color: #f0f4f7;
                font-size: 12px;
                height: 60px;
                padding: 0 65px 0 25px;
            }

            button {
                position: absolute;
                right: 0;
                top: 0;
                width: 60px;
                height: 100%;
                background-color: $primary-color;
                font-size: 14px;
                border: none;
                transition: 0.3s;

                &:hover {
                    background-color: $secondary-color;
                    color: $white;
                }
            }
        }
    }

    &.widget_text {
        font-size: 15px;
    }

    &.widget_tag_cloud {
        .tagcloud {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            margin: -5px;

            a {
                font-size: 12px !important;
                text-transform: uppercase;
                background-color: #f4f4f4;
                color: $secondary-color;
                padding: 8px 20px;
                font-family: $raj;
                font-weight: 700;
                margin: 5px;

                &:hover {
                    background-color: $primary-color;
                }

                @include respond-between(md, lg) {
                    padding: 8px 15px;
                }

                @include respond-below(xs) {
                    padding: 8px 15px;
                }
            }
        }
    }

    &.yankee-recent-post {
        .recent-post-loop li {
            display: flex;
            align-items: center;

            @include respond-below(xs) {
                display: block;
            }

            &:not(:last-child) {
                margin-bottom: 30px;
                padding-bottom: 30px;
                border-bottom: 1px solid #e1e6ff;
            }

            h6 {
                font-size: 16px;
                text-transform: uppercase;
                line-height: 1.3;
                margin-bottom: 5px;
            }

            .post-thumb {
                height: 80px;
                width: 80px;
                min-width: 80px;
                background-color: #ddd;
                background-size: cover;
                background-position: center;
                border-radius: 50%;
                margin-right: 20px;

                @include respond-between(md, lg) {
                    margin-right: 15px;
                }

                @include respond-below(xs) {
                    margin-bottom: 20px;
                }
            }

            .time {
                font-size: 14px;

                i {
                    margin-right: 8px;
                }
            }
        }
    }

    &.yankee-social-links {
        ul {
            margin: -5px;
            display: flex;
            align-items: center;
            flex-wrap: wrap;

            li {
                padding: 5px;
            }

            a {
                background-color: #ededed;
                height: 40px;
                width: 40px;
                text-align: center;
                line-height: 40px;
                font-size: 14px;
                color: $secondary-color;

                @include respond-between(md, lg) {
                    width: 35px;
                    height: 35px;
                    line-height: 35px;
                }

                @include respond-below(xs) {
                    width: 35px;
                    height: 35px;
                    line-height: 35px;
                }

                &:hover {
                    background-color: $primary-color;
                }
            }
        }
    }

    &.yankee-contact-form {
        background-color: $secondary-color;
        padding: 40px;

        @include respond-between(md, lg) {
            padding: 40px 25px;
        }

        @include respond-below(xs) {
            padding: 30px 20px;
        }

        .title-tag {
            color: $primary-color;
            font-family: $raj;
            font-weight: 700;
            letter-spacing: 2px;
            margin-bottom: 5px;
            text-transform: uppercase;
        }

        .widget-title {
            font-size: 40px;
            letter-spacing: -1px;
            text-transform: uppercase;
            color: $white;
            margin-bottom: 20px;
            padding: 0;

            @include respond-below(sm) {
                font-size: 28px;
            }

            @include respond-below(xs) {
                font-size: 28px;
            }

            &::before,
            &::after {
                display: none;
            }
        }

        .wpcf7-form-control-wrap {
            display: block;
            width: 100%;
        }

        input,
        textarea {
            background-color: #2a3031;
            color: $white;
            font-family: $raj;
            font-weight: 700;
            font-size: 14px;
            text-transform: uppercase;
            margin-bottom: 10px;
        }

        ::placeholder {
            color: #868f90;
        }

        .wpcf7-form-control.wpcf7-submit {
            background-color: $primary-color;
            border: none;
            margin-right: auto;
            margin-left: 0;

            &:hover {
                background-color: $white;
                color: $secondary-color;
            }
        }

        .wpcf7-response-output {
            color: $white;
        }
    }
}


.mc4wp-form {
    .input-group:not(:last-child) {
        margin-bottom: 10px;
    }

    .main-btn {
        width: 100%;
        height: 50px;
        line-height: 52px;
    }

    input {
        background-color: #f5f9fa;
        font-size: 14px;
    }

    input[type="submit"],
    button {
        background-color: $primary-color;
        color: $secondary-color;
        text-transform: uppercase;
        text-align: center;
        font-weight: 700;
        padding: 0 20px;
        height: 50px;
        @include transition(0.3s);
        border: none;

        &:hover {
            background-color: $secondary-color;
            color: $white;
        }

        i {
            margin-right: 5px;
        }
    }

    .mc4wp-response {
        margin-top: 15px;
    }
}

.yankee-nav-widget {
    ul,
    li {
        padding: 0;
        margin: 0;
        list-style: none;
    }

        li {
            &:not(:last-child) {
                margin-bottom: 15px;
            }

            a {
                font-family: $raj;
                text-transform: uppercase;
                font-weight: 700;
                color: $secondary-color;
                position: relative;
                background-size: 200% 100%;
                background-position: 100%;

                &:hover {
                    padding-left: 5px;
                    color: $primary-color;
                }
            }
    }
}

.portfolio-sidebar {
    .widget:not(.yankee-contact-form) {
        padding: 0;
        border: none;
        margin-bottom: 40px;

        &:last-child {
            margin-bottom: 0;
        }

        .widget-title {
            padding: 0;
            font-size: 24px;
            margin-bottom: 30px;

            &::before,
            &::after {
                display: none;
            }
        }
    }
}