/**
 * 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;
 *   }
 * }
 */
/**
 * 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 --col-unit-size: The size of each Column unit.
   */
  --col-unit-size: calc(
    (100% - (var(--ion-grid-columns, 12) - 1) * var(--ion-grid-gap, 0px)) / var(--ion-grid-columns, 12)
  );
  /**
   * @prop --ion-grid-columns: The number of total Columns in the Grid
   * @prop --ion-grid-column-padding: Padding for the Column
   * @prop --ion-grid-column-padding-xs: Padding for the Column on xs screens and up
   * @prop --ion-grid-column-padding-sm: Padding for the Column on sm screens and up
   * @prop --ion-grid-column-padding-md: Padding for the Column on md screens and up
   * @prop --ion-grid-column-padding-lg: Padding for the Column on lg screens and up
   * @prop --ion-grid-column-padding-xl: Padding for the Column on xl screens and up
   */
  -webkit-padding-start: var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));
  padding-inline-start: var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));
  -webkit-padding-end: var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));
  padding-inline-end: var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));
  padding-top: var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));
  padding-bottom: var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  box-sizing: border-box;
  position: relative;
  flex: 1;
  min-height: 1px;
  overflow: auto;
}
@media (min-width: 576px) {
  :host {
    -webkit-padding-start: var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));
    padding-inline-start: var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));
    -webkit-padding-end: var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));
    padding-inline-end: var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));
    padding-top: var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));
    padding-bottom: var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));
  }
}
@media (min-width: 768px) {
  :host {
    -webkit-padding-start: var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));
    padding-inline-start: var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));
    -webkit-padding-end: var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));
    padding-inline-end: var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));
    padding-top: var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));
    padding-bottom: var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));
  }
}
@media (min-width: 992px) {
  :host {
    -webkit-padding-start: var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));
    padding-inline-start: var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));
    -webkit-padding-end: var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));
    padding-inline-end: var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));
    padding-top: var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));
    padding-bottom: var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));
  }
}
@media (min-width: 1200px) {
  :host {
    -webkit-padding-start: var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));
    padding-inline-start: var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));
    -webkit-padding-end: var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));
    padding-inline-end: var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));
    padding-top: var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));
    padding-bottom: var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));
  }
}

:host(.ion-grid-col-auto) {
  flex: 0 0 auto;
}

:host([class^=ion-grid-col--]),
:host([class*=" ion-grid-col--"]) {
  flex: 0 0 calc(var(--ion-grid-col-span) * var(--col-unit-size) + (var(--ion-grid-col-span) - 1) * var(--ion-grid-gap, 0px));
  max-width: calc(var(--ion-grid-col-span) * var(--col-unit-size) + (var(--ion-grid-col-span) - 1) * var(--ion-grid-gap, 0px));
}

:host([class^=ion-grid-offset-col--]),
:host([class*=" ion-grid-offset-col--"]) {
  --margin-calc: calc(
    var(--col-unit-size) * var(--ion-grid-col-margin) + (var(--ion-grid-gap, 0px) * var(--ion-grid-col-margin))
  );
  -webkit-margin-start: var(--margin-calc);
  margin-inline-start: var(--margin-calc);
  -webkit-margin-end: 0;
  margin-inline-end: 0;
}

/* 
 * While the number of columns can be customized, we generate
 * a default set of classes for 12 columns. In the future, this
 * will be configurable at build time as Ionic becomes more modular.
 * For now, 12 columns is a practical default. Developers who need
 * more columns can override or extend these styles as needed.
 */
:host(.ion-grid-col--1) {
  --ion-grid-col-span: 1;
}

:host(.ion-grid-order-col--1) {
  order: 1;
}

:host(.ion-grid-offset-col--1) {
  --ion-grid-col-margin: 1;
}

:host(.ion-grid-col--2) {
  --ion-grid-col-span: 2;
}

:host(.ion-grid-order-col--2) {
  order: 2;
}

:host(.ion-grid-offset-col--2) {
  --ion-grid-col-margin: 2;
}

:host(.ion-grid-col--3) {
  --ion-grid-col-span: 3;
}

:host(.ion-grid-order-col--3) {
  order: 3;
}

:host(.ion-grid-offset-col--3) {
  --ion-grid-col-margin: 3;
}

:host(.ion-grid-col--4) {
  --ion-grid-col-span: 4;
}

:host(.ion-grid-order-col--4) {
  order: 4;
}

:host(.ion-grid-offset-col--4) {
  --ion-grid-col-margin: 4;
}

:host(.ion-grid-col--5) {
  --ion-grid-col-span: 5;
}

:host(.ion-grid-order-col--5) {
  order: 5;
}

:host(.ion-grid-offset-col--5) {
  --ion-grid-col-margin: 5;
}

:host(.ion-grid-col--6) {
  --ion-grid-col-span: 6;
}

:host(.ion-grid-order-col--6) {
  order: 6;
}

:host(.ion-grid-offset-col--6) {
  --ion-grid-col-margin: 6;
}

:host(.ion-grid-col--7) {
  --ion-grid-col-span: 7;
}

:host(.ion-grid-order-col--7) {
  order: 7;
}

:host(.ion-grid-offset-col--7) {
  --ion-grid-col-margin: 7;
}

:host(.ion-grid-col--8) {
  --ion-grid-col-span: 8;
}

:host(.ion-grid-order-col--8) {
  order: 8;
}

:host(.ion-grid-offset-col--8) {
  --ion-grid-col-margin: 8;
}

:host(.ion-grid-col--9) {
  --ion-grid-col-span: 9;
}

:host(.ion-grid-order-col--9) {
  order: 9;
}

:host(.ion-grid-offset-col--9) {
  --ion-grid-col-margin: 9;
}

:host(.ion-grid-col--10) {
  --ion-grid-col-span: 10;
}

:host(.ion-grid-order-col--10) {
  order: 10;
}

:host(.ion-grid-offset-col--10) {
  --ion-grid-col-margin: 10;
}

:host(.ion-grid-col--11) {
  --ion-grid-col-span: 11;
}

:host(.ion-grid-order-col--11) {
  order: 11;
}

:host(.ion-grid-offset-col--11) {
  --ion-grid-col-margin: 11;
}

:host(.ion-grid-col--12) {
  --ion-grid-col-span: 12;
}

:host(.ion-grid-order-col--12) {
  order: 12;
}

:host(.ion-grid-offset-col--12) {
  --ion-grid-col-margin: 12;
}