/* EVOE Variation Swatches - Modern minimal design */

.evoe-swatches {
  margin: 14px 0;
  background: transparent;
  border: 0;
}

.evoe-swatches__label {
  display: inline-block;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: inherit;
  opacity: 0.85;
  margin: 0 0 10px 0;
  text-transform: capitalize;
}

.evoe-swatches__select-wrap[aria-hidden="true"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.evoe-swatches__list {
  display: none;
}

.evoe-swatches--enhanced .evoe-swatches__list {
  display: flex;
}

.evoe-swatches--enhanced .evoe-swatches__select-wrap,
.evoe-swatches--enhanced .evoe-swatches__select,
.evoe-swatches--enhanced .evoe-swatches__select select {
  display: none !important;
}

.evoe-swatches__list {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.evoe-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.evoe-swatch:hover {
  border-color: rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.35);
}

.evoe-swatch:focus-visible {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.evoe-swatch.is-selected,
.evoe-swatch[aria-pressed="true"] {
  border-color: rgba(0, 0, 0, 0.85);
  background: #111;
  color: #fff;
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.55);
}

.evoe-swatch.is-disabled,
.evoe-swatch[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.evoe-swatch--text {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evoe-swatch--color {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.evoe-swatch--color .evoe-swatch__color {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.evoe-swatch--color:hover {
  transform: translateY(-1px) scale(1.06);
  background: transparent;
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.4);
}

.evoe-swatch--color.is-selected,
.evoe-swatch--color[aria-pressed="true"] {
  background: transparent;
  color: inherit;
  border-color: #111;
  box-shadow:
    0 0 0 2px #fff inset,
    0 0 0 2px #111;
}

.evoe-swatch--image {
  width: 52px;
  height: 52px;
  min-width: 52px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.evoe-swatch--image img,
.evoe-swatch--image .evoe-swatch__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.evoe-swatch--image:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(0, 0, 0, 0.35);
  background: transparent;
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.4);
}

.evoe-swatch--image.is-selected,
.evoe-swatch--image[aria-pressed="true"] {
  background: transparent;
  color: inherit;
  border-color: #111;
  box-shadow:
    0 0 0 2px #fff inset,
    0 0 0 2px #111;
}

.evoe-swatch[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 9px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  text-transform: none;
}

/* Remove WooCommerce default variations table boxy look */
form.variations_form.evoe-has-swatches table.variations,
form.wc-block-add-to-cart-form.evoe-has-swatches table.variations,
form.cart.evoe-has-swatches table.variations {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

form.variations_form.evoe-has-swatches table.variations td,
form.variations_form.evoe-has-swatches table.variations th,
form.wc-block-add-to-cart-form.evoe-has-swatches table.variations td,
form.wc-block-add-to-cart-form.evoe-has-swatches table.variations th,
form.cart.evoe-has-swatches table.variations td,
form.cart.evoe-has-swatches table.variations th {
  background: transparent !important;
  border: 0 !important;
  padding: 6px 12px 6px 0 !important;
  vertical-align: middle !important;
  box-shadow: none !important;
}

form.variations_form.evoe-has-swatches table.variations label,
form.wc-block-add-to-cart-form.evoe-has-swatches table.variations label,
form.cart.evoe-has-swatches table.variations label {
  font-weight: 600;
  font-size: 13px;
  margin: 0;
}

@media (max-width: 480px) {
  .evoe-swatches__list {
    gap: 8px;
  }

  .evoe-swatch {
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    font-size: 12px;
  }

  .evoe-swatch--color {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
  }

  .evoe-swatch--image {
    width: 46px;
    height: 46px;
    min-width: 46px;
    padding: 0;
  }
}
