/* ================================
   Simple Color Swatches (SCS) CSS
   Clean reset + premium interactions
   + hover ring animation (scale-out)
   ================================ */

/* If you still use the wrap/select version anywhere */
.scs-wrap select {
  position: absolute !important;
  left: -9999px !important;
}

/* Swatches container */
.scs-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

/* Shortcode wrapper safety (prevents theme overlays from blocking clicks) */
.scs-shortcode,
.scs-shortcode .scs-swatches {
  position: relative;
  z-index: 5;
}

/* --------------------------------
   Swatch button (hard reset)
   -------------------------------- */
.scs-swatch {
  /* hard reset to beat theme button styles */
  appearance: none;
  -webkit-appearance: none;
  background-image: none !important;
  box-shadow: none;
  outline: none !important;

  display: inline-block;
  box-sizing: border-box;

  width: var(--scs-size, 22px);
  height: var(--scs-size, 22px);
  min-width: var(--scs-size, 22px);
  min-height: var(--scs-size, 22px);

  padding: 0 !important;
  margin: 0;

  border: none !important;
  border-radius: 50% !important;

  background: var(--scs-color) !important;
  background-color: var(--scs-color) !important;

  cursor: pointer;
  pointer-events: auto !important;

  position: relative;
  z-index: 10;

  /* remove inherited typography effects */
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;

  /* motion */
  transform: translateZ(0);
  transition: transform 140ms cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

/* Hover pop */
.scs-swatch:hover:not(:disabled) {
  transform: scale(1.06);
}

/* Press */
.scs-swatch:active:not(:disabled) {
  transform: scale(0.98);
}

/* --------------------------------
   Hover ring (animated scale-out)
   -------------------------------- */
.scs-swatch::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: scale(0.6);
  transition:
    transform 180ms cubic-bezier(.2,.8,.2,1),
    opacity 140ms ease;
  pointer-events: none;
}

/* Hover → ring grows outward */
.scs-swatch:hover:not(:disabled)::after {
  opacity: 1;
  transform: scale(1);
}

/* Selected: keep ring visible + stronger */
.scs-swatch.is-selected::after {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(0, 0, 0, 0.9);
}

/* Selected: inner spacing ring */
.scs-swatch.is-selected {
  box-shadow: 0 0 0 3px #fff; /* spacing (change if bg isn't white) */
}

/* Disabled */
.scs-swatch:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Accessible focus ring (clean) */
.scs-swatch:focus {
  outline: none !important;
}

/* Focus-visible uses the same ring but darker */
.scs-swatch:focus-visible::after {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(33, 33, 33, 0.9);
}

/* Optional labels */
.scs-swatch-label {
  font-size: 12px;
  margin-left: 6px;
  margin-right: 10px;
  vertical-align: middle;
}

/* If you ever use span/link swatches */
.scs-swatch--static,
.scs-swatch--link {
  display: inline-block;
}


/* Image fade helper for variation switching (force wins over theme) */
img.scs-img-fade {
  transition: opacity 220ms ease !important;
  opacity: 1 !important;
}
img.scs-img-fade.is-fading {
  opacity: 0 !important;
}

select[name="attribute_pa_barva"] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.scs-swatch.is-disabled {
  opacity: 0.25;
  filter: grayscale(100%);
  cursor: not-allowed;
}