:host {
  /**
   * @prop --color: Color of the radio
   * @prop --color-checked: Color of the checked radio
   */
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  user-select: none;
  z-index: 2;
}

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

.radio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  contain: layout size style;
}

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;
}

.radio-icon,
.radio-inner {
  box-sizing: border-box;
}

:host {
  --color-checked: var(--ion-color-primary, #3880ff);
  width: 15px;
  height: 24px;
}

:host(.ion-color.radio-checked) .radio-inner {
  border-color: var(--ion-color-base);
}

.item-radio.item-ios ion-label {
  margin-left: 0;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  .item-radio.item-ios ion-label {
    margin-left: unset;
    -webkit-margin-start: 0;
    margin-inline-start: 0;
  }
}

.radio-inner {
  width: 33%;
  height: 50%;
}

:host(.radio-checked) .radio-inner {
  transform: rotate(45deg);
  border-width: 2px;
  border-top-width: 0;
  border-left-width: 0;
  border-style: solid;
  border-color: var(--color-checked);
}

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

:host(.ion-focused) .radio-icon::after {
  border-radius: 50%;
  left: -9px;
  top: -8px;
  display: block;
  position: absolute;
  width: 36px;
  height: 36px;
  background: var(--ion-color-primary-tint, #4c8dff);
  content: "";
  opacity: 0.2;
}
:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after, :host-context([dir=rtl]).ion-focused .radio-icon::after {
  left: unset;
  right: unset;
  right: -9px;
}

:host(.in-item) {
  margin-left: 8px;
  margin-right: 11px;
  margin-top: 8px;
  margin-bottom: 8px;
  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: 8px;
    margin-inline-start: 8px;
    -webkit-margin-end: 11px;
    margin-inline-end: 11px;
  }
}

:host(.in-item[slot=start]) {
  margin-left: 3px;
  margin-right: 21px;
  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: 3px;
    margin-inline-start: 3px;
    -webkit-margin-end: 21px;
    margin-inline-end: 21px;
  }
}