/* ==========================================================================
   Checkbox control (Figma: default / hover / checked)
   ========================================================================== */

.pf-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-12);
  cursor: pointer;
}

.pf-checkbox input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pf-checkbox__icon {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid #B9B9B9;
  border-radius: 4px;
  background: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pf-checkbox:hover .pf-checkbox__icon {
  background: #E3E3E3;
  border-color: #B9B9B9;
}

.pf-checkbox:hover input[type="checkbox"]:checked + .pf-checkbox__icon {
  background: #171717;
  border-color: #171717;
}

.pf-checkbox input[type="checkbox"]:checked + .pf-checkbox__icon {
  border-color: #171717;
  background: #171717;
}

.pf-checkbox input[type="checkbox"]:checked + .pf-checkbox__icon::after {
  content: "";
  width: 11px;
  height: 7px;
  background: url("../../../assets/icons/icon-checkbox-checked.svg") center / contain no-repeat;
}

.pf-checkbox input[type="checkbox"]:focus-visible + .pf-checkbox__icon {
  outline: 2px solid rgba(239, 119, 61, 0.35);
  outline-offset: 2px;
}

.pf-checkbox__text {
  flex: 1;
  min-width: 0;
  user-select: none;
}

/* Standalone checkbox inputs (filter options, compare toggle, etc.) */
input[type="checkbox"].pf-control-checkbox,
.category-filter__option > input[type="checkbox"].category-filter__checkbox {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #B9B9B9;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

input[type="checkbox"].pf-control-checkbox:hover,
.category-filter__option:hover > input[type="checkbox"].category-filter__checkbox:not(:checked) {
  background: #E3E3E3;
  border-color: #B9B9B9;
}

input[type="checkbox"].pf-control-checkbox:checked,
.category-filter__option > input[type="checkbox"].category-filter__checkbox:checked {
  border-color: #171717;
  background-color: #171717;
  background-image: url("../../../assets/icons/icon-checkbox-checked.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 7px;
}

input[type="checkbox"].pf-control-checkbox:focus-visible,
.category-filter__option > input[type="checkbox"].category-filter__checkbox:focus-visible {
  outline: 2px solid rgba(239, 119, 61, 0.35);
  outline-offset: 2px;
}
