:host {
  /**
   * @prop --background: Background of the menu
   *
   * @prop --min-width: Minimum width of the menu
   * @prop --width: Width of the menu
   * @prop --max-width: Maximum width of the menu
   *
   * @prop --min-height: Minimum height of the menu
   * @prop --height: Height of the menu
   * @prop --max-height: Maximum height of the menu
   */
  --width: 304px;
  --min-width: auto;
  --max-width: auto;
  --height: 100%;
  --min-height: auto;
  --max-height: auto;
  --background: var(--ion-background-color, #fff);
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: none;
  position: absolute;
  contain: strict;
}

:host(.show-menu) {
  display: block;
}

.menu-inner {
  transform: translateX(-9999px);
  display: flex;
  position: absolute;
  flex-direction: column;
  justify-content: space-between;
  width: var(--width);
  min-width: var(--min-width);
  max-width: var(--max-width);
  height: var(--height);
  min-height: var(--min-height);
  max-height: var(--max-height);
  background: var(--background);
  contain: strict;
}

:host(.menu-side-start) .menu-inner {
  --ion-safe-area-right: 0px;
  top: 0;
  bottom: 0;
}
@supports (inset-inline-start: 0) {
  :host(.menu-side-start) .menu-inner {
    inset-inline-start: 0;
    inset-inline-end: auto;
  }
}
@supports not (inset-inline-start: 0) {
  :host(.menu-side-start) .menu-inner {
    left: 0;
    right: auto;
  }
  :host-context([dir=rtl]):host(.menu-side-start) .menu-inner, :host-context([dir=rtl]).menu-side-start .menu-inner {
    left: unset;
    right: unset;
    left: auto;
    right: 0;
  }
  @supports selector(:dir(rtl)) {
    :host(.menu-side-start) .menu-inner:dir(rtl) {
      left: unset;
      right: unset;
      left: auto;
      right: 0;
    }
  }
}

:host(.menu-side-end) .menu-inner {
  --ion-safe-area-left: 0px;
  top: 0;
  bottom: 0;
}
@supports (inset-inline-start: 0) {
  :host(.menu-side-end) .menu-inner {
    inset-inline-start: auto;
    inset-inline-end: 0;
  }
}
@supports not (inset-inline-start: 0) {
  :host(.menu-side-end) .menu-inner {
    left: auto;
    right: 0;
  }
  :host-context([dir=rtl]):host(.menu-side-end) .menu-inner, :host-context([dir=rtl]).menu-side-end .menu-inner {
    left: unset;
    right: unset;
    left: 0;
    right: auto;
  }
  @supports selector(:dir(rtl)) {
    :host(.menu-side-end) .menu-inner:dir(rtl) {
      left: unset;
      right: unset;
      left: 0;
      right: auto;
    }
  }
}

ion-backdrop {
  display: none;
  opacity: 0.01;
  z-index: -1;
}

@media (max-width: 340px) {
  .menu-inner {
    --width: 264px;
  }
}
:host(.menu-type-reveal) {
  z-index: 0;
}

:host(.menu-type-reveal.show-menu) .menu-inner {
  transform: translate3d(0,  0,  0);
}

:host(.menu-type-overlay) {
  z-index: 1000;
}

:host(.menu-type-overlay) .show-backdrop {
  display: block;
  cursor: pointer;
}

:host(.menu-pane-visible) {
  width: var(--width);
  min-width: var(--min-width);
  max-width: var(--max-width);
}

:host(.menu-pane-visible) .menu-inner {
  left: 0;
  right: 0;
  width: auto;
  /* stylelint-disable declaration-no-important */
  transform: none !important;
  box-shadow: none !important;
}

:host(.menu-pane-visible) ion-backdrop {
  display: hidden !important;
  /* stylelint-enable declaration-no-important */
}

:host(.menu-type-push) {
  z-index: 1000;
}

:host(.menu-type-push) .show-backdrop {
  display: block;
}