/*
 * P-ENG-259: the product page's colour swatch picker (Variant options display "Color swatches"), after Verane's.
 * sf's radio-swatch style puts a span.swatch-dot (inline colour or image) in each label of an option that has
 * swatches; product-swatch-picker.js gives a value with no swatch a dashed .swatch-dot--empty. The value's name stays
 * for screen readers and shows as the label's title on hover. Loaded by snippets/product-swatch-picker.liquid only
 * when the picker is on. The selectors outrank the theme's own `input[type='radio'] + label` rules.
 *
 * Shape: the swatch has the corners of the theme's own option tags. The label rule sets no radius, so the theme's
 * `.product-form__input input[type='radio'] + label` rule (section-main-product.css) gives the swatch the radius it
 * gives a Size tag, and the dot, the sold-out strike and the chosen ring (an outline) follow the label. The label is a
 * 3.2rem square, so a pill's radius draws a circle, never an oval. The card and filter dots stay round.
 */
.product-form__input input[type='radio'] + label.swatch-label {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  width: 3.2rem;
  height: 3.2rem;
  margin: 0.9rem 1rem 0.4rem 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  opacity: 1;
  cursor: pointer;
}
.product-form__input input[type='radio'] + label.swatch-label .label__text {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  color: transparent;
}
.product-form__input .swatch-dot {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(var(--color-foreground), 0.2);
  border-radius: inherit;
  background-color: transparent;
  background-origin: border-box;
  background-position: center;
  background-size: cover;
}
.product-form__input .swatch-dot--empty {
  border: 1px dashed rgba(var(--color-foreground), 0.5);
}
/* chosen: a ring in the foreground colour, a small gap outside the dot. Luna, Kiddy and Aroma fill a chosen Tag
   with the foreground colour, and their section-main-product.css loads again after this file (the quick view's
   modal links it), so the chosen rule keeps the background transparent itself. */
.product-form__input input[type='radio']:checked + label.swatch-label {
  border: 0;
  background: transparent;
  outline: 0.1rem solid rgb(var(--color-foreground));
  outline-offset: 0.2rem;
}
@media (hover: hover) {
  .product-form__input input[type='radio']:not(:checked) + label.swatch-label:hover {
    border: 0;
    outline: 0.1rem solid rgba(var(--color-foreground), 0.4);
    outline-offset: 0.2rem;
  }
}
/* sold out: dim and strike, still choosable */
.product-form__input input[type='radio']:disabled + label.swatch-label,
.product-form__input input[type='radio'].disabled + label.swatch-label {
  opacity: 1;
  border: 0;
  background: transparent;
}
.product-form__input input[type='radio']:disabled + label.swatch-label .swatch-dot,
.product-form__input input[type='radio'].disabled + label.swatch-label .swatch-dot {
  opacity: 0.45;
}
.product-form__input input[type='radio']:disabled + label.swatch-label::before,
.product-form__input input[type='radio'].disabled + label.swatch-label::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(to right bottom, transparent calc(50% - 1px), rgb(var(--color-foreground)), transparent calc(50% + 1px));
}
