/* Checkbox and radio Styling */
input.selectify-radio[type="radio"],
input.selectify-checkbox[type="checkbox"] {
  all: unset;
  appearance: none !important;
  cursor: pointer;
  display: inline-block !important;
  vertical-align: top;
  position: relative !important;
  overflow: hidden !important;
  clip-path: circle(1.5rem at 50% 50%);
  border-radius: 12px !important;
  border: none !important;
  padding: 0 !important;
  height: 24px !important;
  width: 48px !important;
  box-sizing: border-box !important;
  transition: background 0.3s ease, border 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

html[dir="rtl"] input.selectify-radio[type="radio"],
html[dir="rtl"] input.selectify-checkbox[type="checkbox"] {
  margin-left: 8px!important;
}

/* Inner indicator styling */
input.selectify-radio[type="radio"]::before,
input.selectify-checkbox[type="checkbox"]::before {
  content: "";
  position: absolute;
  border: none !important;
  margin: 2px !important;
  width: calc(100% - 26px) !important;
  height: calc(100% - 4px) !important;
  border-radius: 50% !important;
  transition: transform 0.3s ease-in-out, background 0.3s ease, border 0.3s ease, color 0.3s ease, opacity 0.3s ease;
  transform: translateX(2px) !important;
  box-shadow: none !important;
}

/* Checked state */
input.selectify-radio[type="radio"]:checked::before,
input.selectify-checkbox[type="checkbox"]:checked::before {
  transform: translateX(20px) !important;
  box-shadow: none;
}

html[dir="rtl"] input.selectify-radio[type="radio"]::before,
html[dir="rtl"] input.selectify-checkbox[type="checkbox"]::before {
  transform: translateX(-2px) !important;
}

/* RTL Checked State */
html[dir="rtl"] input.selectify-radio[type="radio"]:checked::before,
html[dir="rtl"] input.selectify-checkbox[type="checkbox"]:checked::before {
  transform: translateX(-20px) !important;
}

/* Disabled state */
input.selectify-radio[type="radio"]:disabled,
input.selectify-checkbox[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* Focus state */
input.selectify-radio[type="radio"]:focus,
input.selectify-checkbox[type="checkbox"]:focus {
  outline: none;
  box-shadow: none;
}

/* Background styling */
input.selectify-radio[type="radio"]:focus:hover,
input.selectify-checkbox[type="checkbox"]:focus:hover,
input.selectify-radio[type="radio"],
input.selectify-checkbox[type="checkbox"] {
  background: var(--selectify-checkbox-bg);
}

/* Default inner circle styling */
input.selectify-radio[type="radio"]::before,
input.selectify-checkbox[type="checkbox"]::before {
  background: var(--selectify-checkbox-check-circle);
  box-shadow: none;
}

/* Checked state background */
input.selectify-radio[type="radio"]:checked,
input.selectify-checkbox[type="checkbox"]:checked {
  background: var(--selectify-checkbox-checked-bg);
  box-shadow: none;
}

input.selectify-radio[type="radio"]:checked:not(:disabled),
input.selectify-checkbox[type="checkbox"]:checked:not(:disabled) {
  background: var(--selectify-checkbox-checked-bg);
  box-shadow: none !important;
}

/* Disabled background */
input.selectify-radio[type="radio"]:disabled,
input.selectify-checkbox[type="checkbox"]:disabled {
  background: var(--selectify-checkbox-disabled-bg);
  box-shadow: none;
}

/* Disabled state inner circle */
input.selectify-radio[type="radio"]:disabled::before,
input.selectify-checkbox[type="checkbox"]:disabled::before {
  background: var(--selectify-checkbox-disabled-circle);
  box-shadow: none;
}

/* Checked state inner circle */
input.selectify-radio[type="radio"]:checked::before,
input.selectify-checkbox[type="checkbox"]:checked::before {
  background: var(--selectify-checkbox-checked-circle);
  box-shadow: none;
}
