/**
 * Cart widget
 */
.elementor-widget-wp-widget-woocommerce_widget_cart,
.elementor-widget-wp-widget-woocommerce_shopping_cart,
.widget_shopping_cart {
	ul {
		margin: 0;
		
		li {
			position: relative;
			display: block;

			a:not(.remove) {
				padding-right: 15px;
			}
			
			.quantity {
				display: block;
			}
			
			/* Remove item overlay */
			.blockOverlay {
				margin: 0 0 10px 0 !important;
				background-color: rgba(255, 255, 255, 0.5) !important;
				opacity: 0.6 !important;
			}

			& + li {
				margin-top: 30px !important;

				a.remove {
					top: 27px;
				}
			}
		}
	}
	
	a.remove {
		position: absolute;
		right: 3px;
		top: -4px;
		left: auto;
		font-size: 18px;
		line-height: 1;
		opacity: 1;
	}
	
	.button {
		width: 100%;
	}
	
	.wcppec-cart-widget-button {
		margin-top: 10px;
		width: 100%;
		
		img {
			margin-left: auto;
			margin-right: auto;
			display: block;
		}
	}
	
	.woocommerce-mini-cart__buttons {
		display: flex;
		flex-direction: column;
		margin-bottom: 0;
		
		a {
			order: 2;
			
			&.checkout {
				order: 1;
			}
		}
		
		.checkout {
			color: $wc-white-color;
			background: $wc-green-color;
			text-transform: capitalize;
			
			&:hover {
				background: lighten($wc-green-color, 20%);
			}

		}
		
		.wc-forward:not(.checkout) {
			font-size: 14px;
			text-transform: none;
			background: transparent;
			border: none;
		}
	}
	
	.woocommerce-mini-cart__total {
		position: relative;
		padding-top: 15px;
		margin-top: 15px;
		margin-bottom: 15px;
		
		&:after {
			content: '';
			width: calc(100% + 40px);
			position: absolute;
			top: 0;
			left: -20px;
			height: 1px;
			border-top: 1px solid $wc-border-color;
		}
		
		> strong {
			margin-right: 27px;
		}
		
		.amount {
			font-size: 20px;
		}
	}
	
	@extend %product-list-widget;
}

// Header cart
.header-cart {
	position: relative;
	display: inline-block;
	padding-left: 20px;
	
	&__content {
		position: absolute;
		top: 100%;
		right: 0;
		font-size: 14px;
		z-index: 999;
		margin-top: 15px;
		opacity: 0;
		transition: .3s ease;
		visibility: hidden;

		&.show {
			opacity: 1;
			visibility: visible;
		}
	}
	
	.woocommerce.widget_shopping_cart {
		min-width: 275px;
		border: none;
		background-color: $wc-widget-cart-header-bg-color;
		box-shadow: 0 7px 18px 0 $wc-widget-cart-header-box-shadow-color;
		padding: 20px;

		li {
			.quantity{
				font-size: 14px;

				> *{
					font-size: 14px;
				}
			}

			+ li {
				margin-top: 5px;
			}
		}
	}
	
	.product_list_widget {
		max-height: 150px;
		min-height: 150px;
		overflow-x: hidden;
		overflow-y: auto;
		text-align: left;
		
		/* Custom scroll bar styles */
		&::-webkit-scrollbar {
			width: 6px;
		}
		
		/* Track */
		&::-webkit-scrollbar-track {
			-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.13);
			-webkit-border-radius: 10px;
			border-radius: 10px;
		}
		
		/* Handle */
		&::-webkit-scrollbar-thumb {
			-webkit-border-radius: 10px;
			border-radius: 10px;
			background: rgba(161, 162, 164, 0.5);
		}
		&::-webkit-scrollbar-thumb:window-inactive {
			background: rgba(161, 162, 164, 0.4);
		}
	}
	
	.woocommerce-mini-cart__total{
		text-align: left;
	}
	
	.widgettitle {
		font-size: 20px;
		line-height: 1.5;
		margin-top: 0;
	}
	
	&__link-wrap {
		line-height: 18px;
	}

	&__link {
		font-size: 16px;

		&-icon {
			font-size: 16px;
			&:before {
				content: $wc-widget-cart-header-icon;
				@extend %icon-font-default;
			}
		}

		&-count{
			display: inline-block;
			vertical-align: middle;
			text-align: center;
			width: 22px;
			height: 22px;
			line-height: 22px;
			font-size: 10px;
			border-radius: 50%;

			margin-left: 2px;
		}
	}	
}

body.woocommerce-cart .header-cart__link-wrap:not(.header_cart_dd_active) a {
	cursor: default;
}
