@use "../../base/mixins";
@use "../../vars/variables";

.menu-main-mobile {
  position: relative;
  display: none;
  z-index: 100;

  @media screen and (max-width: variables.$bp-laptop) {
    display: block;
  }

  &__trigger {
    position: fixed;
    display: inline-flex;
    align-items: center;
    padding: 0;
    width: 1.75rem;
    height: 1.75rem;
    top: calc(var(--uc-navbar-height) / 2 - 0.625rem);
    right: 0.625rem;
    color: var(--uc-text-text-primary);
    z-index: 1205;
    opacity: 1;

    @media screen and (min-width: variables.$bp-laptop-plus) {
      display: none;
    }

    .line {
      position: absolute;
      width: 100%;
      height: 2px;
      background-color: var(--uc-text-text-primary);
      transition: transform 0.3s ease;
    }

    .line:nth-child(1) {
      top: 0.55rem;
      left: 0;
    }

    .line:nth-child(2) {
      bottom: 0.55rem;
      left: 0;
    }

    &.active .line:nth-child(1) {
      transform: rotate(45deg);
      -webkit-transform: rotate(45deg);
      left: 0;
      top: calc(50% - 1px);
    }

    &.active .line:nth-child(2) {
      transform: rotate(-45deg);
      -webkit-transform: rotate(-45deg);
      left: 0;
      bottom: 50%;
    }

    &--in-background {
      opacity: 0.2;
      cursor: default;
      pointer-events: none;
      transition: opacity 0.2s;
    }
  }

  &__top-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    display: flex;
    align-items: center;
    height: var(--uc-navbar-height);
    padding: 0.625rem;
    width: calc(100vw - 1.25rem);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 0.625rem;
    z-index: 1201;
    box-sizing: content-box;

    @media screen and (min-width: variables.$bp-laptop-plus) {
      display: none;
    }
  }

  &__body {
    position: fixed;
    top: calc(var(--uc-navbar-height) + 0.375rem);
    left: 0;
    height: calc(100vh - var(--uc-navbar-height));
    height: calc(100dvh - var(--uc-navbar-height));
    background: var(--uc-background);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    width: 100vw;
    z-index: var(--uc-vselect-z-index);
    padding-left: 0.625rem;
    padding-right: 0.625rem;
    transition: all 0.3s ease-in-out 0s;
    -webkit-transition: all 0.3s ease-in-out 0s;
    overflow-y: auto;

    @media screen and (min-width: variables.$bp-laptop-plus) {
      display: none;
    }
  }

  &__items {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 140%;
    padding-left: 0.625rem;
    padding-right: 1.875rem;
  }

  &__item {
    display: block;
    margin: 1.75rem auto;

    a {
      display: inline-block;
      width: 100%;
      @include mixins.heading-3;
    }
  }

  @include mixins.transition-opacity;
}
