/* --- Universal variation radio swatches --- */
.sf-variation-radio-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 radio-swatch-enabled attributes */
form.variations_form select[name^="attribute_pa_"] {
  visibility: hidden;
}

/* Vertical list – one row per option */
.sf-variation-radio-swatches__list {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-bottom: 0px;
}

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

/* ---- radio swatch row (label) ---- */
.sf-variation-radio-swatch {
  display: flex!important;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
}

/* Hide the native radio input – visual indicator handles appearance */
.sf-variation-radio-swatch input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ---- Custom radio circle ---- */
.sf-variation-radio-swatch__indicator {
  display:inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #c8c3bc;
  position: relative;
  transition: border-color 0.15s ease;
}

/* Inner dot – hidden by default */
.sf-variation-radio-swatch__indicator::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme-palette-color-2, #b59469);
  transition: transform 0.15s ease;
}

/* ---- Term name ---- */
.sf-variation-radio-swatch__name {
  flex: 1;
  font-weight: 600;
  color: #1e1a14;
  font-size: 0.9em;
  line-height: 1.2;
  transition: color 0.15s ease;
}

/* ---- Description (right side) ---- */
.sf-variation-radio-swatch__desc {
  flex-shrink: 0;
  color: #878686;
  font-size: 0.9em;
  line-height: 1.2;
  text-align: right;
}
@media screen and (max-width: 480px) {
  .sf-variation-radio-swatch__desc {
    font-size: 0.7em;
  }
}

/* ---- Active state ---- */
.sf-variation-radio-swatch.is-active .sf-variation-radio-swatch__indicator {
  border-color: var(--theme-palette-color-2, #b59469);
}
.sf-variation-radio-swatch.is-active .sf-variation-radio-swatch__indicator::after {
  transform: translate(-50%, -50%) scale(1);
}
.sf-variation-radio-swatch.is-active .sf-variation-radio-swatch__name {
  color: var(--theme-palette-color-2, #b59469);
}

/* ---- Hidden (unavailable) state ---- */
.sf-variation-radio-swatch.sf-hidden {
  display: none !important;
}

/* ---- Disabled state ---- */
.sf-variation-radio-swatch.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sf-variation-radio-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%
  );
}
