/* Universal variation swatches */

/* Disabled state */
.sf-disabled-swatches {
  opacity: 0.5;
  pointer-events: none;
}

.sf-variation-swatches {
  width:100%;
  margin: 0;
  order:1;
}
.reset_variations {

  position:absolute;
  bottom:1px;
  right:0;


  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:1px;
  margin:0;
  order:2;
}
.reset_variations::before {
  content: "x";
  font-size:0.9em;
  color:inherit;
  margin-right:5px;
}

/* Prevent flash of default Woo select for swatch-enabled attributes */
form.variations_form select[name^="attribute_pa_"] {
  visibility: hidden;
}

.sf-variation-swatches__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom:10px;
}

.sf-variation-swatches a {
  text-decoration: none;
  color: inherit;
  cursor:pointer;
  font-size:0.9em;
}
.sf-variation-swatches a:hover {
  color:var(--theme-palette-color-2);
}

/* swatch button */
.sf-variation-swatch {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  padding: 0;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.sf-variation-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.sf-variation-swatch.is-active {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.sf-variation-swatch.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sf-variation-swatch.is-disabled::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 4px;
  background: linear-gradient(
    45deg,
    transparent 47%,
    rgba(0, 0, 0, 0.45) 48%,
    rgba(0, 0, 0, 0.45) 52%,
    transparent 53%
  );
}
