
/* Sidebar Widgets */

.widget{
    .wp-block-heading{
        @extend .title, .bordered;
    }
    #footer &{ margin-bottom: $grid-gap; }
	.nice-select{
        float: none;
        color: #fff;
        border-color: $red;
        background-color: $red;
        color: #fff;
        font-weight: 500;
        margin: 0;
        &:active, &:focus, &:hover{
            background-color: $red;
            border-color: $red;
            color: #fff;
        }
        &:after{
            border-bottom: 2px solid #fff;
            border-right: 2px solid #fff;
        }
        #footer &{
          
        }
    }
}

// Default Text Widget
.widget_text{
    .textwidget{
        margin-top: -9px;
    }
    p{ margin-bottom: 20px; }
    p:last-of-type{ margin-bottom: 0; }
}

// Standard widgets
.widget_recent_entries, .widget_categories, .widget_archive, .widget_recent_comments, .widget_meta, .widget_nav_menu, .widget_pages, .widget_rss{
    label{ display: none; }
	// select{ @extend .custom-select; } // Custom dropdowns
	ul > li{ // Archives, categories, menus
		display: block;
		margin-bottom: 10px;
		padding-bottom: 10px;
		border-bottom: 1px solid $border-color;
		a{ font-size: 16px; }
		&:last-of-type{ margin-bottom: 0 !important; border-bottom: 0; padding-bottom: 0; }
		ul.children, ul.sub-menu{
            clear: both;
            padding: 10px 0 0 0;
            margin-top: 10px;
            border-top: 1px solid $border-color;
            li{ 
                padding-left: $grid-gap;
            }
            #footer &{
                border-color: rgba(#fff, 0.25);
            }
		}
		#footer &{
			border-color: rgba(#fff, 0.25);
            a:before{ display: none; }
		}
	}
}

.widget_recent_comments, .widget_categories, .widget_archive, .widget_recent_entries, .widget_rss{
    > ul > li{
        position: relative;
        z-index: 1;
        padding-left: 27px;
        font-size: 16px;  
        .comment-author-link{ font-weight: 600; }
        &:before{
            color: $red;
            font-family: 'remixicon' !important;
            font-size: 18px;
            font-style:normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            position: absolute;
            left: 0;
            top: 0px;
            #footer &{
                color: #fff;
            }
        }
    }
}
.widget_recent_entries > ul > li:before{
    content: "\ec1d";
    top: -2px;
}
.widget_archive > ul > li:before{
    content: "\eae0";
}
.widget_recent_comments > ul > li:before{
    content: "\eafc";
    top: -2px;
    transform: scale(-1, 1);
    font-size: 19px;
}
.widget_rss > ul > li:before{
    content: "\ee6c";
    top: -2px;
}
.widget_categories > ul > li{
    padding-left: 0;
    &:before{
        display: none;
    }
}

.widget_categories > ul > li:before{ content: '\f02b'; }

.widget_archive, .widget_categories{
    color: lighten($text-color, 20%);
    ul li{
        text-align: right;
        background: none;
        line-height: 30px;
        margin-bottom: 10px;
		padding-bottom: 10px;
        border-bottom: 1px solid $border-color;
        &:last-of-type{ margin-bottom: 0 !important; border-bottom: 0; padding-bottom: 0; }
    }
    ul li span{
        display: inline-block;
        padding: 0;
        border-radius: 20px;
        color: #fff;
        background-color: $red;
        width: 25px;
        height: 25px;
        text-align: center;
        line-height: 25px;
        font-size: 12px;
        box-sizing: border-box;
        #footer &{
            color: #fff;
        }
    }
    ul > li{
        clear: both;
        a{
            float: left;
        }
        &:after{
            content: '';
            display: block;
            width: 100%;
            clear: both;
        }
    }
    
}

// Tag Cloud
.widget_tag_cloud, .widget_epcl_tag_cloud{
    @extend .epcl-tags;
    display: block;
    div.tagcloud{ margin-left: -3px; }
	a{
        font-size: 14px !important;
        margin: 0 2px 8px 0;
        color: #fff;
        background-image: none !important;
        &:hover{ color: #fff; }
		.tag-link-count{ margin-left: 2px; }
    }
    span{
        display: inline;
        padding: 0;
        color: inherit;
        font-size: 13px;
        background: transparent;
        vertical-align: inherit;
        margin: 0;        
    }
	#footer & a{ // Tag Cloud on Footer
		color: #fff;
        font-size: 15px !important;
        padding: 4px 20px;
        &:before{ display: none; }
		&:hover{ color: #fff; }
	}
}

// Recent Entries
.widget_recent_entries{
    .post-date{ 
        font-size: 13px;
        display: block;
        color: lighten($text-color, 15%);
    }
}

// Audio
.widget_media_audio{
	a:before{ display: none; }
}

// Calendar
.widget_calendar{
	table{
        width: 100%;
		caption{ @extend .title, .small; font-weight: 600; }
		thead{ background: $black1; color: #fff; }
		th{ font-weight: 600; border: 0; }
		td{
			border-top: 1px solid $border-color;
            text-align: center;
            a{
                font-weight: 600;
            }
        }
		th, td{ padding: 5px; }
		#prev{ text-align: left; }
		#next{ text-align: right; }
    }
    #footer &{
        table{ border-collapse: separate; }
        table td{ border: 0; border-top: 1px solid rgba(#fff, 0.25); }
        tfoot{
            border-top: 1px solid rgba(#fff, 0.25);
        }
    }
}

// Single image
.widget_media_image{
	a{
		@extend .hover-effect;
		display: inline-block;
		padding: 0;
		img{ display: block; width: auto; }
	}
    a:before{ display: none; }
    img{ border-radius: 15px; }
}

// Gallery

.widget_media_gallery{
    .gallery-item{ margin-top: 0 !important; }
    a{
        display: inline-block;
        vertical-align: top;
        padding: 0px 4px;
        overflow: hidden;
        img{ border: 0 !important; }
    }
}

// RSS
.widget_rss{
	.widget-title a{
        padding-bottom: 0;
        img{ display: none; }
		&:before{ display: none; }
    }
    ul li{ font-size: 14px; }
    a{
        font-family: $title-font-family;
        font-weight: 600;
    }
    .rss-date{
        display: block;
        font-size: 13px;
    }
    cite{ font-weight: 600; }
	.rssSummary, cite{ display: block; padding-top: 15px; }
}

/* Gutenberg Widgets */

.widget_block{
    .wp-block-latest-posts, .wp-block-categories, .wp-block-archives, .wp-block-latest-comments{
        li{
            display: block;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px solid $border-color;
            a{ text-decoration: underline; }
        }
    }
    &.widget_search{
        input[type="search"]{
            border: 1px solid $border-color;
            padding: 10px 15px;
            border-radius: 25px;
            @include placeholder{
                color: $text-color;
            };
        }
        .wp-block-search__button{
            border-radius: $border-radius;
            background: $red;
        }
    }
}

