@mixin horizontal-list( $margin, $ignore-first-last : 'false' ) {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  list-style-type: none;
  @if $margin != 0 and $ignore-first-last == 'false' {
    > li:not(:last-child) {
      padding-right: $margin;
    }
    > li:not(:first-child) {
      padding-left: $margin;
    }
  }
  @if $ignore-first-last == 'true' {
    li {
      padding-right: $margin;
      padding-left: $margin;
    }
  }
}

@mixin soft-box-shadow( $inverted : 'false' ) {
  @if $inverted == 'false' {
    -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  @if $inverted == 'true' {
    -webkit-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.07);
    -moz-box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.07);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.07);
  }
}

@mixin button() {
  font-size: .8em;
  font-weight: 600;
  padding: 8px 12px;
  transition: all .15s ease-in-out;
  text-align: center;
  vertical-align: middle;
  border: 1px solid transparent;
  border-radius: 3px;
  text-transform: uppercase;
  cursor: pointer;
  line-height: normal;
  font-family: inherit;
  &:hover {
    text-decoration: none;
    opacity: .9;
  }
}

@mixin button-secondary( $hover: 'true', $color: $gray-color ) {
  border: 1px solid;
  background-color: transparent;
  font-weight: 600;
  color: $color;
  &:hover {
    background: transparent;
  }
}

@mixin button-primary( $hover: 'true', $color: $button_color ) {
  background-color: $color;
  color: #fff;
  @if ($hover == 'true') {
    &:hover {
      text-decoration: none;
      background-color: $color;
      color: #fff;
      opacity: .9;
    }
  }
}

@mixin cart-widget() {
  .widget_shopping_cart {
	color: var(--nv-text-color);
	.cart_list li.mini_cart_item {
	  padding: $spacing-sm 0;
	  border-bottom: $muted-border;
	  display: grid;
	  grid-template-columns: repeat(12, 1fr);
	  align-items: baseline;
	  font-size: .85em;
	  position: relative;
	  margin: 0;

	  &:last-child {
		border: none;
	  }

	  > *:not(.remove) {
		padding-left: 60px;
	  }

	  img {
		position: absolute;
		left: 30px;
		width: 60px;
		top: 50%;
		transform: translateY(-50%);
		margin-left: 0;
	  }

	  > a {
		padding: 0;
		grid-column: span 11;
		grid-row-start: 1;
		grid-column-end: -1;
		color: $body-color;
		text-align: left;
		font-weight: normal;
		&:hover {
		  text-decoration: underline;
		}
		&:not(.remove){
		  margin-left: $spacing-sm;
		}
	  }

	  a.remove {
		grid-column: 1;
		padding: 0;
		top: 50%;
		transform: translateY(-20px);
		text-align: center;
		&:hover {
		  text-decoration: none;
		}
	  }

	  span.quantity {
		grid-row-start: 4;
		grid-column-start: span 11;
		grid-column-end: -1;
		text-align: left;
		margin-left: $spacing-sm;
	  }

	  dl.variation {
		margin-left: $spacing-sm;
		border: none;
		grid-row-start: 3;
		grid-column-start: 2;
		grid-column-end: span 9;
		text-align: right;

		dt::before {
		  width: 100%;
		  content: "\A";
		  white-space: pre-wrap;
		  display: block;
		  height: 0;
		}

		dt {
		  margin-left: auto;
		}

		dt, dd {
		  line-height: 1.2em;
		  margin-bottom: 3px;
		}
	  }
  	}
  }

  .woocommerce.widget_shopping_cart .total {
    border-top: $muted-border;
    margin: 0;
    text-align: left;
	padding-top: $spacing-sm;
	padding-bottom: $spacing-sm;
	strong{
	  font-weight: normal;
	}
  }
  .woocommerce-mini-cart__buttons {
	  display: grid;
	  grid-template-columns: 8fr 1fr 8fr;
	  margin-bottom: 0;

	  a {
		padding-top: 16px!important;
		padding-bottom: 16px!important;
		align-self: center;
		margin: 0!important;

		&:first-child {
			grid-column-start: 1;
	    }

	    &:nth-child(2) {
	      grid-column-start: 3;
	    }

	    &:nth-child(3) {
	      grid-column: span 3;
	      text-align: center;
	      margin-top: $spacing-xs;
	    }
	  }
  }
}
