// ============================================================================
// :: Menu
// ============================================================================
/**
 * This menu is used as the main navigation and changes along the browser width.
 */

// ============================================================================
// :: Root
// ============================================================================
.o-menu {
  position: relative;

  box-shadow: $box-shadow-base;
  background-color: $background-color-white;

  @include respond-to($breakpoint-tablet-default) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 1000;

    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom);
  }

  /* Prevent iOS Safari landscape cut-off */
  @media (orientation: landscape) and (max-width: $breakpoint-tablet-default) {
    height: auto;
    min-height: 56px;
  }

  @include respond-at($breakpoint-tablet-default) {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
  }
}

// ============================================================================
// :: Elements
// ============================================================================
.o-menu__container {
  display: flex;

  @include respond-at($breakpoint-tablet-default) {
    display: block;
  }
}

.o-menu__logo {
  display: flex;
  justify-content: center;
  align-items: center;

  @include respond-at($breakpoint-tablet-default) {
    height: $header-height-desktop;
  }
}

.o-menu__list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 0;
  width: 100%;

  list-style-type: none;

  @include respond-at($breakpoint-tablet-default) {
    display: block;
    width: auto;
  }
}

.o-menu__item {
  position: relative;
  z-index: $z-index-floor + 1;

  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;

  .a-menu-item {
    height: 100%;

    @include respond-to($breakpoint-tablet-default) {
      padding: 1rem 0;
    }
  }

  &:focus {
    outline: 0.2rem solid $primary-color-base;
    outline-offset: -0.2rem;
  }
}

.o-menu__main-action {
  position: relative;
  top: -1.4rem;
  z-index: $z-index-floor;

  padding: 0;

  @include respond-at($breakpoint-tablet-default) {
    top: 0;
  }

  &::before {
    content: "";

    position: absolute;
    top: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: $z-index-pit;

    width: calc(100% + 1.3rem);
    height: calc(100%);

    background-image: url("/assets/general/img/navigation/btn-bg.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    @include respond-at($breakpoint-tablet-default) {
      content: none;
    }
  }
}
