/**
 * 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.
 */
/**
 * 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 --track-background: Background of the toggle track
   * @prop --track-background-checked: Background of the toggle track when checked
   * @prop --border-radius: Border radius of the toggle track
   *
   * @prop --handle-background: Background of the toggle handle
   * @prop --handle-background-checked: Background of the toggle handle when checked
   *
   * @prop --handle-border-radius: Border radius of the toggle handle
   * @prop --handle-box-shadow: Box shadow of the toggle handle
   * @prop --handle-height: Height of the toggle handle
   * @prop --handle-max-height: Maximum height of the toggle handle
   * @prop --handle-width: Width of the toggle handle
   * @prop --handle-spacing: Horizontal spacing around the toggle handle
   * @prop --handle-transition: Transition of the toggle handle
   */
  /* stylelint-disable-next-line declaration-no-important */
  box-sizing: content-box !important;
  display: inline-block;
  position: relative;
  max-width: 100%;
  cursor: pointer;
  user-select: none;
}

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

/**
 * Toggle 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;
}

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

/**
 * The native input must be hidden with display instead of visibility or
 * aria-hidden to avoid accessibility issues with nested interactive elements.
 */
input {
  display: none;
}

.toggle-wrapper {
  display: flex;
  position: relative;
  flex-grow: 1;
  align-items: center;
  justify-content: space-between;
  height: inherit;
  transition: background-color 15ms linear;
  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;
}

.toggle-bottom {
  display: flex;
  justify-content: space-between;
  white-space: normal;
}

/**
 * Error text should only be shown when .ion-invalid is
 * present on the checkbox. Otherwise the helper text should
 * be shown.
 */
.toggle-bottom .error-text {
  display: none;
}

.toggle-bottom .helper-text {
  display: block;
}

:host(.ion-touched.ion-invalid) .toggle-bottom .error-text {
  display: block;
}

:host(.ion-touched.ion-invalid) .toggle-bottom .helper-text {
  display: none;
}

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

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

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

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

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

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

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

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

.toggle-icon-wrapper {
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: var(--handle-transition);
  will-change: transform;
}

.toggle-icon {
  border-radius: var(--border-radius);
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--track-background);
  overflow: inherit;
}

:host(.toggle-checked) .toggle-icon {
  background: var(--track-background-checked);
}

.toggle-inner {
  border-radius: var(--handle-border-radius);
  position: absolute;
  left: var(--handle-spacing);
  width: var(--handle-width);
  height: var(--handle-height);
  max-height: var(--handle-max-height);
  transition: var(--handle-transition);
  background: var(--handle-background);
  box-shadow: var(--handle-box-shadow);
  contain: strict;
}

/**
 * We do not use the @ltr and @rtl mixins
 * here because ion-toggle uses the Shadow DOM
 * and WebKit does not support :host-context.
 */
:host(.toggle-ltr) .toggle-inner {
  left: var(--handle-spacing);
}

:host(.toggle-rtl) .toggle-inner {
  right: var(--handle-spacing);
}

:host(.toggle-ltr.toggle-checked) .toggle-icon-wrapper {
  transform: translate3d(calc(100% - var(--handle-width)), 0, 0);
}

:host(.toggle-rtl.toggle-checked) .toggle-icon-wrapper {
  transform: translate3d(calc(-100% + var(--handle-width)), 0, 0);
}

:host(.toggle-checked) .toggle-inner {
  background: var(--handle-background-checked);
}

:host(.toggle-ltr.toggle-checked) .toggle-inner {
  transform: translate3d(calc(var(--handle-spacing) * -2), 0, 0);
}

:host(.toggle-rtl.toggle-checked) .toggle-inner {
  transform: translate3d(calc(var(--handle-spacing) * 2), 0, 0);
}

:host {
  --track-background: var(--token-primitives-neutral-500, #a2a2a2);
  --track-background-checked: var(--ion-color-primary, var(--token-bg-primary-base-default, var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))));
  --border-radius: var(--token-border-radius-full, 999px);
  --focus-ring-color: var(--token-border-focus-default, var(--token-primitives-blue-400, #b5c0f7));
  --focus-ring-width: var(--token-border-size-050, var(--token-scale-050, 2px));
  --handle-background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
  --handle-background-checked: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
  --handle-border-radius: var(--token-border-radius-full, 999px);
  --handle-height: var(--token-scale-500, 20px);
  --handle-max-height: var(--token-scale-500, 20px);
  --handle-width: var(--token-scale-500, 20px);
  --handle-spacing: var(--token-space-050, var(--token-scale-050, 2px));
  --handle-transition: transform 300ms, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms,
    right 110ms ease-in-out 80ms;
  font-size: var(--token-font-size-350, 14px);
  font-weight: var(--token-font-weight-regular, 400);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-600, var(--token-scale-600, 24px));
  text-decoration: none;
  text-transform: none;
  z-index: 2;
}

.toggle-wrapper {
  align-items: center;
  min-height: var(--token-scale-1200, 48px);
}

.native-wrapper .toggle-icon {
  width: var(--token-scale-1100, 44px);
  height: var(--token-scale-600, 24px);
  /**
   * The handle box shadow should not
   * overflow outside of the track container.
   */
  overflow: hidden;
}

:host(.ion-color.toggle-checked) .toggle-icon {
  background: var(--ion-color-base);
}

.toggle-bottom {
  font-size: var(--token-font-size-350, 14px);
  font-weight: var(--token-font-weight-regular, 400);
  letter-spacing: var(--token-font-letter-spacing-0, 0%);
  line-height: var(--token-font-line-height-600, var(--token-scale-600, 24px));
  text-decoration: none;
  text-transform: none;
}

.toggle-bottom .error-text {
  color: var(--token-semantics-danger-900, var(--token-primitives-red-900, #991b1b));
}

.toggle-bottom .helper-text {
  color: var(--token-primitives-neutral-900, #4e4e4e);
}

:host(.ion-focused) .toggle-icon {
  outline: var(--focus-ring-width) var(--token-border-style-solid, solid) var(--focus-ring-color);
  outline-offset: var(--focus-ring-width);
}

:host(.ion-focused) {
  outline: none;
}

:host(.ion-activated) .toggle-icon {
  background: var(--token-bg-neutral-base-press, var(--token-primitives-neutral-700, #777777));
}

:host(.ion-activated.toggle-checked) .toggle-icon {
  background: var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)));
}

:host(.toggle-disabled) .toggle-icon::after {
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  background-color: var(--token-state-disabled, rgba(255, 255, 255, 0.6));
  content: "";
  pointer-events: none;
}

.toggle-inner {
  will-change: background-color, transform;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--token-text-default, var(--token-primitives-neutral-1200, #242424));
}

.toggle-inner .toggle-switch-icon {
  width: var(--token-scale-400, 16px);
  height: var(--token-scale-400, 16px);
}

/**
* Label is on the left of the input in LTR and
* on the right in RTL.
*/
:host .toggle-wrapper {
  justify-content: space-between;
}

:host .label-text-wrapper {
  /**
  * The margin between the label and
  * the input should be on the end
  * when the label sits at the start.
  */
  -webkit-margin-start: 0;
  margin-inline-start: 0;
  -webkit-margin-end: var(--token-space-400, var(--token-scale-400, 16px));
  margin-inline-end: var(--token-space-400, var(--token-scale-400, 16px));
  color: var(--token-text-default, var(--token-primitives-neutral-1200, #242424));
}

/**
* Label is on the right of the input in LTR and
* on the left in RTL.
*/
:host(.toggle-label-placement-end) .toggle-wrapper {
  justify-content: start;
}

/**
* The margin between the label and
* the input should be on the start
* when the label sits at the end.
*/
:host(.toggle-label-placement-end) .label-text-wrapper {
  -webkit-margin-start: var(--token-space-400, var(--token-scale-400, 16px));
  margin-inline-start: var(--token-space-400, var(--token-scale-400, 16px));
  -webkit-margin-end: 0;
  margin-inline-end: 0;
}