/* -----------------------------------------
	Widgets Styling
----------------------------------------- */
.widget {
	margin: 0 0 $widget-margin-lg;
	font-size: 14px;
	line-height: 1.5;

	@include media-breakpoint-down(md) {
		margin-bottom: $widget-margin-md;
	}

	@include media-breakpoint-down(sm) {
		margin-bottom: $widget-margin-sm;
	}

	/* Nullify bottom margin for last elements in widgets and sidebars */
	.sidebar & {
		&:last-child {
			margin-bottom: 0;
		}
	}

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

	select {
		width: 100%;
	}
}

.widget-title {
	font-size: 14px;
	margin-bottom: 25px;
	padding-top: 25px;
	color: $text-color;
	text-transform: uppercase;
	line-height: normal;
	letter-spacing: $letter-spacing-default;
	border-top: solid 3px $accent-color-alt;

	label {
		text-transform: none;
		display: block;
		font-size: inherit;
		margin: 0;
		line-height: inherit;
		font-weight: inherit;
	}
}

/* WIDGET: Theme - Contact Widget
========================================= */
.ci-contact-widget-title {
	font-size: 16px;
	margin: 0 0 15px;
}

.ci-contact-widget-items {
	margin: 0;
	padding: 0;
	list-style-type: none;
}

.ci-contact-widget-item {
	display: flex;
	align-items: baseline;
	margin-bottom: 15px;

	i {
		text-align: center;
		min-width: 26px;
		color: $accent-color-alt;
	}
}

/* WIDGET: Theme - Availability
========================================= */
.ci-tabular-data-widget-intro {
	margin-bottom: 20px;
}

.ci-tabular-data-widget-table {
	text-align: left;

	th, td {
		padding: 10px 0;
	}

	tr {
		border-bottom: 1px solid $border-color;
	}
}

/* WIDGET: Theme - Widget Item
========================================= */
.widget_ci-post-type-items {
	ul {
		margin: 0;
		padding: 0;
		list-style: none;

		li {
			margin: 0;
			padding: 0;
		}
	}
}

.ci-widget-item {
	display: flex;
	border-bottom: 1px solid $border-color;
	padding: 0 0 15px;
	margin: 0 0 15px;

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

.ci-widget-item-thumb {
	width: 80px;
	margin-right: 15px;
	flex: none;

	img {
		border-radius: $border-radius-base;
	}
}

.ci-widget-item-content {
	flex: auto;
}

.ci-widget-item-title {
	font-size: 16px;
	line-height: normal;
	font-weight: $font-weight-extra-bold;
	margin-bottom: 5px;
	letter-spacing: $letter-spacing-default;

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

.ci-widget-item-subtitle {
	opacity: .8;
	margin: 0;

	a {
		color: inherit;
	}
}

/* WIDGET: List Widgets
========================================= */
// sass-lint:disable class-name-format
.widget_meta,
.widget_pages,
.widget_categories,
.widget_archive,
.widget_nav_menu,
.widget_product_categories,
.wp-block-woocommerce-product-categories,
.widget_ci-page-children-menu,
.woocommerce-widget-layered-nav-list {
	ul {
		list-style: none;
		margin: 0;
		padding: 0;

		ul {
			margin-left: 15px;
		}
	}

	li {
		line-height: normal;
		display: block;
		position: relative;

		a {
			display: block;
			padding: 10px 30px 10px 0;
			border-bottom: 1px solid $border-color;

			.footer & {
				padding-top: 10px;
				padding-bottom: 10px;
			}
		}

		span,
		.count,
		.ci-count {
			position: absolute;
			background-color: $grey-light;
			color: $text-color;
			right: 0;
			top: 8px;
			height: 24px;
			min-width: 24px;
			line-height: 24px;
			border-radius: 2px;
			text-align: center;
			font-size: 11px;
			font-weight: 700;
		}

		&.current-cat {
			> a {
				font-weight: 700;
			}
		}
	}
}

.sidebar {
	.widget_nav_menu,
	.widget_ci-page-children-menu {
		li {
			> a {
				background-color: $grey-light;
				padding: 18px;
				margin-bottom: 1px;
				border-left: solid 3px $grey-light;
				border-bottom: none;
				border-radius: 0;
				font-weight: 700;
				transition: all 0.2s ease;

				&:hover {
					background-color: $grey;
					color: $accent-color;
					border-left-color: $accent-color;
				}
			}
		}

		.current-menu-item,
		.current_page_item {
			> a,
			> a:hover {
				border: 0;
				position: relative;
				color: $white;
				background-color: $accent-color;
				border-left: solid 3px $accent-color;
			}
		}
	}
}

.widget_recent_comments,
.widget_rss,
.widget_recent_entries {
	ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	li {
		display: block;
		padding: 11px 0;
		border-bottom: 1px solid $border-color;
		font-size: 14px;
	}
}

.widget_recent_entries {
	.post-date {
		display: block;
		font-size: 12px;
	}
}

.entry-tags a, // sass-lint:disable-line force-element-nesting
.tag-cloud-link {
	display: inline-block;
	padding: 6px 16px;
	font-size: 11px;
	border: 0;
	color: $text-color-light;
	margin-bottom: 3px;
	margin-right: 3px;
	border-radius: 3px;
	text-transform: uppercase;
	letter-spacing: $letter-spacing-default;
	background-color: $grey;

	&:hover {
		color: $white;
		background-color: $accent-color-alt;
	}
}

.rss-date {
	display: block;
	font-size: .8rem;
	margin: 5px 0;
	opacity: .8;
}

// sass-lint:enable class-name-format

/* WIDGET: #Search
========================================= */
.searchform {
	> div {
		position: relative;
	}

	input[type="text"],
	input[type="search"] {
		// Styling for the search input if required
		padding-right: 30px;
	}

	.searchsubmit {
		position: absolute;
		top: 0;
		right: 0;
		height: 100%;
		padding: 0 20px;
		border: 0;

		&:hover {
			background: $accent-color-alt;
			border: 0;
		}
	}
}

/* WIDGET: #Subscribe
========================================= */
.form-subscribe {
	button {
		display: block;
		padding-top: 14px;
		padding-bottom: 14px;
		width: 100%;
		margin-top: 25px;
	}
}

/* WIDGET: #Text Widget
========================================= */
.widget_text { // sass-lint:disable-line class-name-format
	p {
		&:last-child {
			margin-bottom: 0;
		}
	}
}

/* WIDGET: #Calendar
================================================== */
#wp-calendar {
	width: 100%;

	a {
		font-weight: $font-weight-bold;
		font-style: italic;
	}

	caption {
		text-align: left;
		margin-top: 10px;
		background: none repeat scroll 0 0 rgba($black, .03);
		padding: 9px;
	}

	thead {
		font-size: 10px;

		th {
			background: rgba($black, .1);
			font-weight: $font-weight-bold;
			padding: 8px;
		}
	}

	tbody {
		td {
			background: none;
			border: 1px solid rgba($black, .1);
			text-align: center;
			padding: 3px;

			&:hover {
				background: rgba($black, .1);
			}
		}

		.pad {
			background: none;
		}
	}

	tfoot {
		#next {
			font-size: 10px;
			text-transform: uppercase;
			text-align: right;
		}

		#prev {
			font-size: 10px;
			text-transform: uppercase;
			padding-top: 10px;
		}
	}
}

/* WIDGET: Theme - Callout
========================================= */
.ci-box-callout {
	padding: 25px;
	background-color: $accent-color-alt;
	border-radius: 3px;

	.ci-box-callout-title {
		display: block;
		margin-bottom: 10px;
		color: $white;
		font-weight: 700;
		font-size: 18px;
	}

	p {
		color: $white;
		margin-bottom: 20px;
	}

	.btn {
		border: solid 3px $accent-color;
	}
}
