/**
 * Header cart
 */
.site-header-cart {
	position: relative;
	margin: 0;
	padding: 0;
	display: inline-block;

	.cart-contents {
		text-decoration: none;
	}

	.widget_shopping_cart {
		display: none;
		margin: 0;
		min-width: 300px;
	}

	.woocommerce-mini-cart__total {
		clear: both;
		border-top: 1px solid #ebebeb;
		padding-top: 10px;
		color: $color__text-main;
	}	
	
	.woocommerce-mini-cart__buttons {
		margin: 30px 0 0;
		
		a {
			width: 48%;
			display: inline-block;
			padding: 10px;
			text-align: center;
			color: #fff !important;

			&:first-of-type {
				margin-right: 4%;
				background: #1c1c1c;
				border-color: #1c1c1c;
			}
		}
	}

	.product_list_widget {
		margin: 0;
		padding: 0;
		position: static;
		box-shadow: none;
		max-width: 100%;

		li {
			padding: 10px 0 10px 80px;
			min-height: 80px;
			background: transparent;
			color: $color__text-main !important;
			position: relative;
			max-width: 100%;
			border-bottom: 1px solid #ebebeb;

			img {
				max-width: 60px;
				position: absolute;
				top: 10px;
				left: 20px;
			}

			a {
				color: $color__text-main !important;
			}

			a.remove {
				max-width: 20px;
				position: absolute;
				top: 10px;
				left: 0;
			}

			& > a:not(.remove),
			& > span {
				padding-left: 15px;
				max-width: 100%;
			}

			& > span {
				color: #716f6f;
				@include font-size(14);
			}
		}
	}
}

.woocommerce-links {

	.wc-account-link {
		margin-right: 10px;
	}

	.wc-account-link,
	.cart-contents {
		display: inline-block;
	}

	.cart-contents {
		position: relative;
	}

	.count-number {
		display: inline-block;
		position: relative;
		top: -13px;
		right: 4px;
		background-color: $color__accent;
		color: #fff;
		@include font-size(12);
		width: 18px;
		height: 18px;
		line-height: 18px;
		text-align: center;
		border-radius: 50%;
	}
}

/**
 * Star rating
 */
.star-rating {
	overflow: hidden;
	position: relative;
	height: 1.618em;
	line-height: 1.618;
	width: 5.3em;
	font-family: star;
	font-weight: 400;

	&::before {
		content: "\53\53\53\53\53";
		opacity: 0.25;
		float: left;
		top: 0;
		left: 0;
		position: absolute;
	}

	span {
		overflow: hidden;
		float: left;
		top: 0;
		left: 0;
		position: absolute;
		padding-top: 1.5em;
	}

	span::before {
		content: "\53\53\53\53\53";
		top: 0;
		position: absolute;
		left: 0;
		color: $color__link;
	}
}

p.stars {

	a {
		position: relative;
		height: 1em;
		width: 1em;
		text-indent: -999em;
		display: inline-block;
		text-decoration: none;
		margin-right: 1px;
		font-weight: 400;

		&::before {

			display: block;
			position: absolute;
			top: 0;
			left: 0;
			width: 1em;
			height: 1em;
			line-height: 1;
			font-family: star;
			content: "\53";
			color: $color__text-main;
			text-indent: 0;
			opacity: 0.25;
		}

		&:hover {

			~ a::before {
				content: "\53";
				color: $color__text-main;
				opacity: 0.25;
			}
		}
	}

	&:hover {

		a {

			&::before {
				content: "\53";
				color: $color__link;
				opacity: 1;
			}
		}
	}

	&.selected {

		a.active {

			&::before {
				content: "\53";
				color: $color__link;
				opacity: 1;
			}

			~ a::before {
				content: "\53";
				color: $color__text-main;
				opacity: 0.25;
			}
		}

		a:not(.active) {

			&::before {
				content: "\53";
				color: $color__link;
				opacity: 1;
			}
		}
	}
}

/**
 * Tabs
 */
.woocommerce-tabs {

	margin: 40px 0;

	h2 {
		margin-top: 0 !important;
	}

	ul.tabs {
		list-style: none;
		margin: 0 0 15px;
		padding: 0;
		text-align: left;

		li {
			display: inline-block;
			margin: 0 30px 0 0;
			position: relative;

			&:last-of-type {
				margin: 0;
			}

			a {
				color: #716f6f;
				padding: 1em 0;
				display: block;
				font-weight: 600;
				padding-bottom: 3px;
				border-bottom: 2px solid transparent;

			}

			&.active {
				a {
					color: $color__text-main;
					border-bottom: 2px solid $color__text-main;
				}
			}
		}
	}

	.panel {

		h2:first-of-type {
			margin-bottom: 1em;
		}
	}
}

/**
 * Password strength meter
 */
.woocommerce-password-strength {
	text-align: right;

	&.strong {
		color: $woocommerce__color-success;
	}

	&.short {
		color: $woocommerce__color-error;
	}

	&.bad {
		color: $woocommerce__color-error;
	}

	&.good {
		color: $woocommerce__color-info;
	}
}

/**
 * Forms
 */
.form-row {

	&.woocommerce-validated {

		input.input-text {
			box-shadow: inset 2px 0 0 $woocommerce__color-success;
		}
	}

	&.woocommerce-invalid {

		input.input-text {
			box-shadow: inset 2px 0 0 $woocommerce__color-error;
		}
	}
}

.required {
	color: #f00;
}

/**
 * Notices
 */
.woocommerce-notices-wrapper {
	margin-bottom: 30px;

	&:empty {
		margin: 0;
	}
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
	padding: 10px;
	background-color: #f0f3f5;
	clear: both;

	.button {
		margin-right: 15px;
	}
}

.demo_store {
	position: fixed;
	left: 0;
	bottom: 0;
	right: 0;
	margin: 0;
	padding: 1em;
	background-color: $woocommerce__color-info;
	z-index: 9999;
}

@media screen and (min-width: 48em) {

	/**
	 * Header cart
	 */
	.site-header-cart {

		.widget_shopping_cart {
			position: absolute;
			top: 100%;
			width: 100%;
			z-index: 999999;
			left: -999em;
			display: block;
			box-shadow: 0 5px 15px 3px rgba(0, 0, 0, 0.07);

			.woocommerce-mini-cart__empty-message {
				margin: 0;
			}
		}

		&:hover,
		&.focus {

			.widget_shopping_cart {
				left: auto;
				right: 0;
				display: block;
			}
		}
	}
}

.woocommerce-breadcrumb {
	margin-bottom: 30px;

	a {
		color: #716f6f;
	}
}

/* My account */
.page.woocommerce-account {
	article {
		padding: 0;
	}

	&.logged-in {
		.entry-content > .woocommerce {
			@include media-min-992 {
				display: grid;
				grid-template-columns: 1fr 3fr;
				grid-gap: 60px;
			}		
		}
	}

	.u-columns.col2-set {
		@include media-min-992 {
			display: grid;
			grid-template-columns: 1fr 1fr;
			grid-gap: 60px;
		}			
	}

	.woocommerce-Input--text {
		display: block;
		width: 100%;
	}

	.woocommerce-form-login__submit {
		display: block;
		margin-top: 30px;
	}

	.woocommerce-MyAccount-navigation {
		ul {
			list-style: none;
			padding: 0;
			margin: 0;

			li {
				padding-bottom: 10px;
				margin-bottom: 10px;
				border-bottom: 1px solid #ebebeb;
				font-weight: 600;

				a {
					color: #1d1d1f;
					&:hover {
						color: $color__accent;
					}
				}

				&:last-of-type {
					border-bottom: 0;
				}
			}
		}
	}
}