.widget {
	margin: 0 0 3em;

	// Make sure select elements fit in widgets.
	select {
		max-width: 100%;
	}

	.gallery {
		margin-bottom: 0;
	}

}

.wp-block-calendar:not(.wp-block) {
	border: 1px solid #dadfe3;
	max-width: 300px;

	.wp-block-calendar,
	.calendar_wrap {
		position: relative;
	}

	.wp-calendar-table {
		margin-bottom: 5px;
		border: none;
	}

	caption{
		margin-bottom: 15px;
		font-weight: 600;
		padding: 10px 20px;
		text-align: center;
		background-color: #fbfbfc;
	}

	thead, tbody{
		border: none;

		th, td{
			background: transparent;
			border: 0;
			word-break: normal;
			padding: 0.5em;
			text-align: center;
			@include font-size(16/16);

			&:first-child {
				padding-left: 1em;
			}

			&:last-child {
				padding-right: 1em;
			}
		}
	}

	thead {
		th {
			color: #999;

		}
	}

	.wp-calendar-nav {
		padding: 10px 0;
		a {
			text-decoration: none;
		}

	}
}

ul.wp-block-categories,
.wp-block-categories__list,
ul.wp-block-archives {
	padding: 0;
	margin: 0;

	li {
		list-style: none;
		padding: 0 0 8px;
		color: var(--gz-color-base);
		transition: 0.4s;

		&:hover {
			color: var(--gz-color-primary);

			a {
				color: var(--gz-color-primary);
			}
		}

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

.wp-block-latest-posts,
.wp-block-latest-comments,
.wp-block-page-list,
.widget_nav_menu ul.menu {
	margin: 0;
	padding: 0;

	li {
		padding: 5px 0;
		font-weight: 500;
		list-style: none;

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

		&:first-child {
			padding-top: 0;
		}
	}

	ul {
		margin-top: 10px;
	}
}

ol.wp-block-latest-comments {
	padding-left: 0;
}

.wp-block-latest-comments__comment {
	margin-bottom: 0;
}

.wp-block-latest-comments__comment-excerpt p {
	margin: 5px 0 0;
}

.wp-block-search {
    --gz-input-padding-y: 0.75rem;
	--gz-button-padding-right: 0.75rem;
	--gz-button-padding-left: 0.75rem;
}

.wp-block-group {
	.wp-block-heading {
		margin: 0 0 20px;
	}
}

.wp-block-tag-cloud.is-style-outline a {
	padding: 8px 20px;
	border-color: var(--gz-border-color);
}

.wp-block-tag-cloud a {
	margin: 0;
	border-radius: var(--gz-button-rounded);
}

.wp-block-tag-cloud.is-style-outline a:not(:hover) {
	border-color: var(--gz-border-color);
}

.wp-block-tag-cloud:not(.is-style-outline) {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;

	a {
		background-color: var(--gz-color-light-grey);
		border-radius: var(--gz-button-rounded);
		padding: 11px 20px;
		text-decoration: none;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		line-height: normal;
		text-transform: capitalize;
		color: var(--gz-color-base);

		&:hover {
			background-color: var(--gz-color-dark);
			color: var(--gz-color-light);
		}
	}

}

p.wp-block-tag-cloud {
	margin: 0;
}

.wp-block-social-links {
	margin: 0;
	padding: 0;
}

.widget_archive,
.widget_categories {
	ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	li {
		display: flex;
		align-items: center;
		gap: 7px;
		font-weight: 500;
		padding: 5px 0;
		color: var(--gz-color-dark);
		transition: 0.3s;

		&:first-child {
			padding-top: 0;
		}

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

		&:hover {
			color: var(--gz-color-primary);

			a {
				color: var(--gz-color-primary);
			}
		}
	}
}

.widget_tag_cloud {
	.tagcloud {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;

		a {
			background-color: var(--gz-color-light-grey);
			border-radius: var(--gz-button-rounded);
			padding: 11px 20px;
			text-decoration: none;
			display: inline-block;
			line-height: normal;
			text-transform: capitalize;
			color: var(--gz-color-base);

			&:hover {
				background-color: var(--gz-color-dark);
    			color: var(--gz-color-light);
			}
		}
	}
}

.widget_media_image {
	.wp-block-image {
		&:last-child {
			margin-bottom: 0;
		}
	}
}

.single-post,
.blog-sidebar {
	.widget {
		margin-bottom: calc(30 / 16 * 1rem);
		padding-bottom: calc(30 / 16 * 1rem);
		border-bottom: 1px solid var(--gz-border-color);

		.widget {
			margin-bottom: 0;
			padding-bottom: 0;
			border-bottom: none;
		}

		&:last-child {
			margin-bottom: 0;
			padding-bottom: 0;
			border-bottom: none;
		}
	}
}