/* swatch lives in its own file for reusability of the swatch in swatch-input and dropdown */
.swatch {
  --swatch--size: var(--swatch-input--size, 1.5rem);

  display: block;
  width: var(--swatch--size);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--swatch--background);
  background-position: var(--swatch-focal-point, initial);
  background-size: cover;
  background-origin: border-box;
  border: 0;
  border-radius: 0;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 24 25' fill='none'%3E%3Cpath d='M17.9456 3.49651C22.2424 5.17986 24.0055 8.81914 23.9522 12.6001C24.7277 20.7698 15.9476 28.6242 6.61286 22.6419C6.54541 22.4755 6.52585 22.3423 6.54175 22.2387C-3.58899 17.2384 -1.00666 3.91096 7.83123 1.47679C10.9673 0.183037 14.6324 0.461691 17.9456 3.49651Z' fill='%23A7917B'/%3E%3C/svg%3E");
}

.swatch--square {
  --swatch--border-radius: var(--swatch-input--border-radius, 0.2rem);
}

.swatch--unavailable {
  border-style: dashed;
  border-color: rgba(var(--color-foreground), 0.5);
}

.swatch-tooltip {
  position: absolute;
  white-space: nowrap;
  left: 50%;
  top: -2.075rem;
  translate: -50% 0;
  opacity: 0;
  font-family: var(--bs-body-font);
  text-transform: none;
  padding: 0.375rem 0.5rem;
  
  &::before {
    translate: 0.25rem 0.25rem;
  }
  &:after {
    background-color: var(--neutral-100);
  }

  &:hover {
    translate: -50% 0;
  }
}
