/*-------------------------------------------------------*/
/* Widgets
/*-------------------------------------------------------*/
.widget {
	a {
		color: $text-color;
	}

	a:hover {
		color: $primary-color;
		text-decoration: underline;
	}

	.footer & {
		margin-bottom: 40px;
	}

	.sidebar &,
	.elementor-widget-sidebar & {
		background-color: #fff;
		border-radius: 5px;
		padding: 36px;
		margin-bottom: 54px;
		border: 1px solid $border-color;
	}

	li {
		list-style: none;
	}

	&.widget_block > h2,
	.wp-block-group__inner-container > h2,
	&-title {
		font-size: 1rem;
		margin-bottom: 20px;
	}

	.sub-menu,
	.children {
		padding-top: 10px;
		padding-left: 10px;

		li:first-child {
			border-top: 1px solid $border-color;
			padding-top: 10px;
		}
	}
}

.menu-item {
	list-style: none;
}

.elementor-widget-sidebar .widget-title,
.sidebar .widget-title,
.sidebar .widget_block > h2,
.sidebar .wp-block-group__inner-container > h2 {
	font-size: 1.125rem;
}

/* Widget Categories, Recent Entries, Comments, Archives, Meta
----------------------------------------------------------------*/
.elementor-widget-wp-widget-recent-comments a,
.widget_recent_comments a {
	color: $heading-color;

	&:hover {
		color: $primary-color;
	}
}

.wp-block-latest-posts.wp-block-latest-posts__list li,
.wp-block-latest-comments li,
.wp-block-categories li,
.elementor-widget-wp-widget-recent-posts li,
.widget_recent_entries li,
.elementor-widget-wp-widget-nav_menu li,
.widget_nav_menu li,
.elementor-widget-wp-widget-pages li,
.widget_pages li,
.elementor-widget-wp-widget-pages-archives li,
.widget_archive li,
.elementor-widget-wp-widget-meta li,
.widget_meta li,
.elementor-widget-wp-widget-recent-comments li,
.widget_recent_comments li,
.widget_categories li,
.elementor-widget-wp-widget-categories li {
	padding: 10px 0;
	border-bottom: 1px solid $border-color;

	&:first-child {
		padding-top: 0;
	}

	&:last-child {
		padding-bottom: 0;
		border-bottom: 0;
	}
}

/* Categories
-------------------------------------------------------*/
.elementor-widget-wp-widget-categories li,
.widget_categories li {
	overflow: hidden;

	&:first-child {
		padding-top: 0;
	}

	&:last-child {
		padding-bottom: 0;
	}
}

/* Recent Comments / Recent Posts
-------------------------------------------------------*/
.recentcomments,
.wp-block-latest-posts__list li,
.wp-block-latest-comments__comment,
.wp-block-categories li,
.widget_recent_entries li,
.widget_categories li {
	position: relative;
	padding-left: 16px !important;

	&::before {
		content: "";
		display: block;
		position: absolute;
		left: 0;
		width: 6px;
		height: 6px;
		background-color: $primary-color;
		opacity: 0.2;
		margin-top: 7px;
	}
}

/* Widget RSS
-------------------------------------------------------*/
.widget_rss {
	li {
		padding: 16px 0;
		border-bottom: 1px solid $border-color;

		&:first-child {
			padding-top: 0;
		}
	}

	.rsswidget {
		color: $heading-color;

		&:hover {
			color: $primary-color;
		}
	}

	.rss-date {
		display: block;
		color: $meta-color;
		font-size: 0.875rem;
		margin: 6px 0 12px;
	}

	.rssSummary {
		margin-bottom: 8px;

		& + cite {
			font-size: 15px;
			color: $meta-color;
		}
	}

	.widget-title .rsswidget:last-child {
		vertical-align: middle;
		margin-left: 5px;
		margin-top: 2px;
		display: inline-block;
	}
}

/* Widgets select (Categories, Archives, Text Widget)
-------------------------------------------------------*/
.widget_categories,
.widget_archive,
.widget_text {
	select {
		margin-bottom: 0;
	}
}

/* Widget Calendar
-------------------------------------------------------*/
.widget.widget_calendar {
	padding: 0;
	border: 0;
}

.calendar_wrap {
	table {
		width: 100%;
	}

	th,
	td,
	span {
		display: table-cell;
		font-size: 1em;
		font-weight: 500;
		line-height: 1;
		padding: 2.5% 2.5% 2% 2.5%;
		text-align: center;
	}

	caption {
		caption-side: top;
		text-align: center;
		background-color: $bg-light;
		padding: 2% 2.5%;
		margin-bottom: 0;
		border: 1px solid $border-color;
		border-bottom: 0;
		font-weight: 600;
	}

	.pad {
		background: none;
	}

	.wp-calendar-nav {
		padding: 10px 5px;
		display: flex;
		justify-content: space-between;

		span {
			flex: 1;
		}
	}

	tfoot #prev,
	.wp-calendar-nav-prev {
		text-align: left;
	}

	tfoot #next,
	.wp-calendar-nav-next {
		text-align: right;
	}
}

/* Widget About
-------------------------------------------------------*/
.widget-about {
	&__description {
		margin-top: 10px;

		@include bp-lg-up {
			padding-right: 40px;
		}
	}
}

/* Widget Info
-------------------------------------------------------*/
.widget-info {
	&__item:not(:last-child) {
		margin-bottom: 20px;
	}

	&__title {
		display: block;
		font-weight: 600;
		margin-bottom: 6px;
		text-transform: uppercase;
		font-size: 0.8125rem;
	}
}

/* Widget Popular Posts
-------------------------------------------------------*/
.widget-popular-posts {
	&__first-post {
		.widget-popular-posts__img-holder {
			width: 100%;
			float: none;

			margin-bottom: 24px !important;
			margin-left: 0 !important;
		}
	}

	&__list > li {
		padding: 20px 0;
		border-bottom: 1px solid $border-color;

		&:first-child {
			padding-top: 0;
		}

		&:last-child {
			padding-bottom: 0;
			border-bottom: 0;
		}
	}

	&__img-holder {
		width: 80px;
		border-radius: 3px;
		float: right;
		position: relative;
		margin-left: 16px !important;
		overflow: hidden;

		@include bp-lg-down {
			width: 50px;
		}
	}

	&__entry {
		min-height: 60px;
		overflow: hidden;
	}

	&__entry-title {
		font-size: 1rem;
		line-height: 1.3;
		margin-bottom: 5px;
	}
}

/* Widget Search
-------------------------------------------------------*/
.widget.widget_search,
.widget.widget_product_search {
	padding: 0;
	border: 0;
}

.widget_search .search-input {
	margin: 0;
}

.widget-search-button,
.search-form__button,
.search-button,
.woocommerce-product-search button[type="submit"] {
	font-family: "everse";
	position: absolute;
	top: 0;
	right: 0;
	width: 56px;
	height: 56px;
	line-height: 56px;
	padding: 0 !important;
	box-shadow: none;
	background-color: transparent !important;
	color: $text-color;
	border: 0;
	vertical-align: middle;

	&:focus {
		background-color: inherit;
		color: inherit;
	}
}

.search-form {
	position: relative;

	.widget-search-button,
	.search-form__button,
	.search-button,
	.woocommerce-product-search button[type="submit"] {
		border-radius: 0;
		border: 0;
		color: inherit;
		font-size: 1.25rem;

		&:hover,
		&:focus {
			box-shadow: none;
			border: 0;
			color: inherit;
			transform: none;
			opacity: 0.92;
		}
	}
}

// Block search
.wp-block-search__inside-wrapper {
	position: relative;
}

.wp-block-search {
	.wp-block-search__button:not(.has-icon) {
		padding-left: 1.2em;
		padding-right: 1.2em;
	}

	.wp-block-search__button.has-icon {
		position: absolute;
		height: 56px;
		width: 56px;
		right: 0;
		top: 1px;
		background-color: transparent;
		border: none;

		&:hover,
		&:focus {
			background-color: transparent;
			box-shadow: none;
			transform: none;
		}
	}
}

/* Widget Socials
----------------------------------------------------------------*/
.widget-socials .social {
	display: inline-block;
	width: 28px;
	height: 28px;

	svg {
		height: 13px;
	}
}

.wp-block-search {
	.wp-block-search__input {
		border-color: $border-color;
		margin-bottom: 0;
	}

	.wp-block-search__button {
		border-color: $border-color;
	}
}

/* Widget Tags / Entry Tags
-------------------------------------------------------*/
.widget.widget_tag_cloud a,
.wp-block-tag-cloud a,
.entry__tags a,
.widget_product_tag_cloud a {
	line-height: 1;
	margin: 0 8px 8px 0;
	padding: 8px 12px;
	border-radius: 5px;
	font-size: 0.875rem !important;
	background-color: $bg-light;
	color: $text-color;
	float: left;
	@include transition(all 0.1s ease-in-out);

	&:hover {
		text-decoration: none;
		background-color: $primary-color;
		border-color: transparent;
		color: #fff;
	}
}

.wp-block-tag-cloud,
.tagcloud {
	overflow: hidden;
	margin-bottom: 0;
}

/* Widget Blocks
-------------------------------------------------------*/
.wp-block-latest-comments__comment {
	line-height: 1.5;
}

.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
	color: $meta-color;
	font-style: italic;
	margin-top: 5px;
	font-size: 0.8125rem;
}
