/* Purity Rating Filter Widget
 * Uses Blocksy ct-filter-* classes. CSS here fills the gap where Blocksy only
 * styles <a> wrappers, but our widget uses <label> instead.
 */

/* ── Expandable heading ──────────────────────────────────────────────────── */
.widget_blaze_purity_filter .widget-title {
  display: flex;
  justify-content: space-between;
}

/* ── Label layout (mirrors Blocksy's .ct-filter-item-inner a rules) ─────── */
.purity-filter-widget .ct-filter-item-inner label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}

/* ── Count badge (mirrors Blocksy's a > .ct-filter-count) ───────────────── */
.purity-filter-widget .ct-filter-item-inner label > .ct-filter-count {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  min-width: 30px;
  height: 22px;
  padding: 0 5px;
  margin-inline-start: auto;
  border-radius: 50px;
  border: 1px solid var(--theme-border-color);
  transition:
    color .12s cubic-bezier(0.455, 0.03, 0.515, 0.955),
    background .12s cubic-bezier(0.455, 0.03, 0.515, 0.955),
    border-color .12s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

/* Hover state */
.purity-filter-widget .ct-filter-item-inner label:hover > .ct-filter-count {
  color: #fff;
  background: var(--theme-link-hover-color);
  border-color: var(--theme-link-hover-color);
}

/* Checked / active state */
.purity-filter-widget .ct-filter-item.active .ct-filter-item-inner label > .ct-filter-count,
.purity-filter-widget .ct-filter-item-inner label:has(.ct-checkbox:checked) > .ct-filter-count {
  color: #fff;
  background: var(--theme-link-hover-color);
  border-color: var(--theme-link-hover-color);
}

/* Active label bold (mirrors Blocksy's a.active .ct-filter-label) */
.purity-filter-widget .ct-filter-item.active .ct-filter-label,
.purity-filter-widget .ct-filter-item-inner label:has(.ct-checkbox:checked) .ct-filter-label {
  font-weight: 600;
}

/* ── Dot row ─────────────────────────────────────────────────────────────── */
.purity-filter-widget .anm-purity-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.purity-filter-widget .anm-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  display: inline-block;
}

.purity-filter-widget .anm-dot-filled {
  background: #16a34a;
}

/* ── Loading state while fetch is in-flight ─────────────────────────────── */
body.purity-filter-loading ul.products,
body.purity-filter-loading .products {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s;
}
