:host {
  /**
   * @prop --size: Size of the checkbox icon
   *
   * @prop --background: Background of the checkbox icon
   * @prop --background-checked: Background of the checkbox icon when checked
   *
   * @prop --border-color: Border color of the checkbox icon
   * @prop --border-radius: Border radius of the checkbox icon
   * @prop --border-width: Border width of the checkbox icon
   * @prop --border-style: Border style of the checkbox icon
   * @prop --border-color-checked: Border color of the checkbox icon when checked
   *
   * @prop --transition: Transition of the checkbox icon
   *
   * @prop --checkmark-color: Color of the checkbox checkmark when checked
   * @prop --checkmark-width: Stroke width of the checkbox checkmark
   */
  --background-checked: var(--ion-color-primary, #3880ff);
  --border-color-checked: var(--ion-color-primary, #3880ff);
  --checkmark-color: var(--ion-color-primary-contrast, #fff);
  --checkmark-width: 1;
  --transition: none;
  display: inline-block;
  position: relative;
  user-select: none;
  z-index: 2;
}

:host(.ion-color) {
  --background-checked: var(--ion-color-base);
  --border-color-checked: var(--ion-color-base);
  --checkmark-color: var(--ion-color-contrast);
}

button {
  left: 0;
  top: 0;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  outline: none;
}
[dir=rtl] button, :host-context([dir=rtl]) button {
  left: unset;
  right: unset;
  right: 0;
}

button::-moz-focus-inner {
  border: 0;
}

.checkbox-icon {
  border-radius: var(--border-radius);
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transition: var(--transition);
  border-width: var(--border-width);
  border-style: var(--border-style);
  border-color: var(--border-color);
  background: var(--background);
  box-sizing: border-box;
}

.checkbox-icon path {
  fill: none;
  stroke: var(--checkmark-color);
  stroke-width: var(--checkmark-width);
  opacity: 0;
}

:host(.checkbox-checked) .checkbox-icon,
:host(.checkbox-indeterminate) .checkbox-icon {
  border-color: var(--border-color-checked);
  background: var(--background-checked);
}

:host(.checkbox-checked) .checkbox-icon path,
:host(.checkbox-indeterminate) .checkbox-icon path {
  opacity: 1;
}

:host(.checkbox-disabled) {
  pointer-events: none;
}

:host {
  --border-radius: 50%;
  --border-width: 1px;
  --border-style: solid;
  --border-color: rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);
  --background: var(--ion-item-background, var(--ion-background-color, #fff));
  --size: 26px;
  width: var(--size);
  height: var(--size);
}

:host(.checkbox-disabled) {
  opacity: 0.3;
}

:host(.in-item) {
  margin-left: 0;
  margin-right: 8px;
  margin-top: 10px;
  margin-bottom: 9px;
  display: block;
  position: static;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  :host(.in-item) {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: 0;
    margin-inline-start: 0;
    -webkit-margin-end: 8px;
    margin-inline-end: 8px;
  }
}

:host(.in-item[slot=start]) {
  margin-left: 2px;
  margin-right: 16px;
  margin-top: 8px;
  margin-bottom: 8px;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  :host(.in-item[slot=start]) {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: 2px;
    margin-inline-start: 2px;
    -webkit-margin-end: 16px;
    margin-inline-end: 16px;
  }
}