/**
 * Convert a pixels given value into rem
 * 
 * @param pixels - Value in pixels to be converted (i.e. px)
 * @param context (optional) - Baseline value
 */
/**
 * Convert a font size to a dynamic font size.
 * Fonts that participate in Dynamic Type should use
 * dynamic font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param unit (optional) - The unit to convert to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a maximum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a minimum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * maximum and minimum font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * A heuristic that applies CSS to tablet
 * viewports.
 *
 * Usage:
 * @include tablet-viewport() {
 *   :host {
 *     background-color: green;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to mobile
 * viewports (i.e. phones, not tablets).
 *
 * Usage:
 * @include mobile-viewport() {
 *   :host {
 *     background-color: blue;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to tablet
 * viewports.
 *
 * Usage:
 * @include tablet-viewport() {
 *   :host {
 *     background-color: green;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to mobile
 * viewports (i.e. phones, not tablets).
 *
 * Usage:
 * @include mobile-viewport() {
 *   :host {
 *     background-color: blue;
 *   }
 * }
 */
:host {
  /**
   * @prop --color: Color of the radio
   * @prop --color-checked: Color of the checked radio
   * @prop --border-radius: Border radius of the radio
   * @prop --inner-border-radius: Border radius of the inner checked radio
   */
  --inner-border-radius: 50%;
  display: inline-block;
  position: relative;
  max-width: 100%;
  min-height: inherit;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

input {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  -webkit-appearance: none;
  -moz-appearance: none;
}

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

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

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

:host(:focus) {
  outline: none;
}

:host(.in-item) {
  flex: 1 1 0;
  width: 100%;
  height: 100%;
}

/**
 * Radio can be slotted
 * in components such as item and
 * toolbar which is why we do not
 * limit the below behavior to just ion-item.
 */
:host([slot=start]),
:host([slot=end]) {
  flex: initial;
  width: auto;
}

.radio-wrapper {
  display: flex;
  position: relative;
  flex-grow: 1;
  align-items: center;
  justify-content: space-between;
  height: inherit;
  min-height: inherit;
  cursor: inherit;
}

/**
 * If no label text is placed into the slot
 * then the element should be hidden otherwise
 * there will be additional margins added.
 */
.label-text-wrapper-hidden {
  display: none;
}

.native-wrapper {
  display: flex;
  align-items: center;
}

:host(.radio-justify-space-between) .radio-wrapper {
  justify-content: space-between;
}

:host(.radio-justify-start) .radio-wrapper {
  justify-content: start;
}

:host(.radio-justify-end) .radio-wrapper {
  justify-content: end;
}

:host(.radio-alignment-start) .radio-wrapper {
  align-items: start;
}

:host(.radio-alignment-center) .radio-wrapper {
  align-items: center;
}

:host(.radio-justify-space-between),
:host(.radio-justify-start),
:host(.radio-justify-end),
:host(.radio-alignment-start),
:host(.radio-alignment-center) {
  display: block;
}

.label-text-wrapper {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/**
 * Label is on the left of the radio in LTR and
 * on the right in RTL.
 */
:host(.radio-label-placement-start) .radio-wrapper {
  flex-direction: row;
}

/**
 * Label is on the right of the radio in LTR and
 * on the left in RTL.
 */
:host(.radio-label-placement-end) .radio-wrapper {
  flex-direction: row-reverse;
}

/**
 * Label is on the left of the radio in LTR and
 * on the right in RTL. Label also has a fixed width.
 */
:host(.radio-label-placement-fixed) .label-text-wrapper {
  flex: 0 0 100px;
  width: 100px;
  min-width: 100px;
}

/**
 * Label is on top of the radio.
 */
:host(.radio-label-placement-stacked) .radio-wrapper {
  flex-direction: column;
}

:host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper {
  transform-origin: left top;
}
:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper, :host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-start .label-text-wrapper {
  transform-origin: right top;
}

@supports selector(:dir(rtl)) {
  :host(.radio-label-placement-stacked.radio-alignment-start:dir(rtl)) .label-text-wrapper {
    transform-origin: right top;
  }
}

:host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper {
  transform-origin: center top;
}
:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper, :host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-center .label-text-wrapper {
  transform-origin: calc(100% - center) top;
}

@supports selector(:dir(rtl)) {
  :host(.radio-label-placement-stacked.radio-alignment-center:dir(rtl)) .label-text-wrapper {
    transform-origin: calc(100% - center) top;
  }
}

:host {
  z-index: 2;
}

:host(.in-item) .label-text-wrapper {
  margin-top: 10px;
  margin-bottom: 10px;
}

:host(.in-item.radio-label-placement-stacked) .label-text-wrapper {
  margin-top: 10px;
  margin-bottom: 16px;
}

:host(.in-item.radio-label-placement-stacked) .native-wrapper {
  margin-bottom: 10px;
}

:host(.radio-label-placement-start) .label-text-wrapper {
  /**
   * The margin between the label and
   * the radio should be on the end
   * when the label sits at the start.
   */
  -webkit-margin-start: 0;
  margin-inline-start: 0;
  -webkit-margin-end: 16px;
  margin-inline-end: 16px;
}

/**
 * The margin between the label and
 * the radio should be on the start
 * when the label sits at the end.
 */
:host(.radio-label-placement-end) .label-text-wrapper {
  -webkit-margin-start: 16px;
  margin-inline-start: 16px;
  -webkit-margin-end: 0;
  margin-inline-end: 0;
}

:host(.radio-label-placement-fixed) .label-text-wrapper {
  /**
   * The margin between the label and
   * the radio should be on the end
   * when the label sits at the start.
   */
  -webkit-margin-start: 0;
  margin-inline-start: 0;
  -webkit-margin-end: 16px;
  margin-inline-end: 16px;
}

:host(.radio-label-placement-stacked) .label-text-wrapper {
  transform: scale(0.75);
  /**
   * The margin between the label and
   * the radio should be on the bottom
   * when the label sits on top.
   */
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 16px;
  /**
   * Label text should not extend
   * beyond the bounds of the radio.
   */
  max-width: calc(100% / 0.75);
}

/**
 * Convert a pixels given value into rem
 * 
 * @param pixels - Value in pixels to be converted (i.e. px)
 * @param context (optional) - Baseline value
 */
/**
 * Convert a font size to a dynamic font size.
 * Fonts that participate in Dynamic Type should use
 * dynamic font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param unit (optional) - The unit to convert to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a maximum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a minimum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * maximum and minimum font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * A heuristic that applies CSS to tablet
 * viewports.
 *
 * Usage:
 * @include tablet-viewport() {
 *   :host {
 *     background-color: green;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to mobile
 * viewports (i.e. phones, not tablets).
 *
 * Usage:
 * @include mobile-viewport() {
 *   :host {
 *     background-color: blue;
 *   }
 * }
 */
/**
 * Convert a pixels given value into rem
 * 
 * @param pixels - Value in pixels to be converted (i.e. px)
 * @param context (optional) - Baseline value
 */
/**
 * Convert a font size to a dynamic font size.
 * Fonts that participate in Dynamic Type should use
 * dynamic font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param unit (optional) - The unit to convert to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a maximum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * a minimum font size.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * Convert a font size to a dynamic font size but impose
 * maximum and minimum font sizes.
 * @param size - The initial font size including the unit (i.e. px or pt)
 * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
 * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
 * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
 * convert to a unit other than $baselineUnit.
 */
/**
 * A heuristic that applies CSS to tablet
 * viewports.
 *
 * Usage:
 * @include tablet-viewport() {
 *   :host {
 *     background-color: green;
 *   }
 * }
 */
/**
 * A heuristic that applies CSS to mobile
 * viewports (i.e. phones, not tablets).
 *
 * Usage:
 * @include mobile-viewport() {
 *   :host {
 *     background-color: blue;
 *   }
 * }
 */
:host {
  --color-checked: var(--ion-color-primary, #0054e9);
}

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

.item-radio.item-ios ion-label {
  -webkit-margin-start: 0;
  margin-inline-start: 0;
}

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

:host(.radio-checked) .radio-inner {
  transform: rotate(45deg);
  border-width: 0.125rem;
  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: var(--inner-border-radius);
  top: -8px;
  display: block;
  position: absolute;
  width: 36px;
  height: 36px;
  background: var(--ion-color-primary-tint, #1a65eb);
  content: "";
  opacity: 0.2;
}
:host(.ion-focused) .radio-icon::after {
  inset-inline-start: -9px;
}

.native-wrapper .radio-icon {
  width: 0.9375rem;
  height: 1.5rem;
}