/******************************************************************
Site Name:
Author:

Stylesheet: Responsive WooCommerce Styles - Mixins

******************************************************************/

@mixin darkorlighttextshadow($a, $opacity: 0.8) {
	@if lightness($a) >= 65% {
		@include text_shadow(0, -1px, 0, rgba(0, 0, 0, $opacity));
	}
	@else {
		@include text_shadow(0, 1px, 0, rgba(255, 255, 255, $opacity));
	}
}

/**
 * Objects
 */
@mixin menu() {
	@include clearfix();

	li {
		display: inline-block;
	}
}

@mixin mediaright() {
	@include clearfix();

	img {
		float: right;
		height: auto;
	}
}

@mixin medialeft() {
	@include clearfix();

	img {
		float: right;
		height: auto;
	}
}

@mixin ir() {
	display: block;
	text-indent: -9999px;
	position: relative;
	height: 1em;
	width: 1em;
}

@mixin icon( $glyph: '\e001' ) {
	font-family: 'WooCommerce';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	margin: 0;
	text-indent: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	text-align: center;
	content: $glyph;
}

@mixin icon_dashicons( $glyph: '\f333' ) {
	font-family: 'Dashicons';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	margin: 0;
	text-indent: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	text-align: center;
	content: $glyph;
}

@mixin iconbefore( $glyph: '\e001' ) {
	font-family: 'WooCommerce';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	margin-right: 0.618em;
	content: $glyph;
	text-decoration: none;
}

@mixin iconbeforedashicons( $glyph: '\f333' ) {
	font-family: 'Dashicons';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	content: $glyph;
	text-decoration: none;
}

@mixin iconafter( $glyph: '\e001' ) {
	font-family: 'WooCommerce';
	speak: none;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	margin-left: 0.618em;
	content: $glyph;
	text-decoration: none;
}

@mixin loader() {
	&::before {
		height: 1em;
		width: 1em;
		display: block;
		position: absolute;
		top: 50%;
		left: 50%;
		margin-left: -0.5em;
		margin-top: -0.5em;
		content: '';
		animation: spin 1s ease-in-out infinite;
		background: url('#{$plugins-path}woocommerce/assets/images/icons/loader.svg') center center;
		background-size: cover;
		line-height: 1;
		text-align: center;
		font-size: 2em;
		color: rgba(#000, 0.75);
	}
}

@mixin inversebuttoncolors {
	background-color: transparent !important;
	color: var(--button--color-text-hover) !important;

	&:hover {
		background-color: var(--button--color-background) !important;
		color: var(--button--color-text) !important;
		text-decoration: none !important;
	}
}
