@import '../../../scss/styles.scss';

.template-default {
  min-height: 100vh;
  display: grid;
  position: relative;
  grid-template-columns: 0 auto;
  transition: grid-template-columns var(--nav-trans-time) linear;
  isolation: isolate;
  @media (prefers-reduced-motion) {
    transition: none;
  }

  &--nav-open {
    width: 100%;
    grid-template-columns: var(--nav-width) auto;

    .template-default {
      &__nav-overlay {
        transition: opacity var(--nav-trans-time) linear;
      }
    }
  }
  [dir='rtl']
  &__nav-toggler-wrapper {
    left: unset;
    right: 0;
  }

  &__nav-toggler-wrapper {
    position: fixed;
    z-index: var(--z-modal);
    top: 0;
    left: 0;
    height: var(--app-header-height);
    width: var(--gutter-h);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &__wrap {
    min-width: 0;
    width: 100%;
    flex-grow: 1;
    position: relative;
    background-color: var(--theme-bg);
    &:before {
      content: '';
      display: block;
      position: absolute;
      inset: 0;
      background-color: inherit;
      opacity: 0;
      z-index: var(--z-status);
      visibility: hidden;
      transition: all var(--nav-trans-time) linear;
    }
  }

  @include mid-break {
    &__nav-toggler-wrapper {
      .hamburger {
        left: unset;
      }
    }
  }

  @include small-break {
    &--nav-open {
      .template-default__wrap {
        &:before {
          opacity: 0.7;
          visibility: visible;
        }
      }
    }

    &__nav-toggler-wrapper {
      width: unset;
      justify-content: unset;

      .hamburger {
        display: none;
      }
    }

    .template-default {
      &__wrap {
        min-width: 100vw;
      }
    }
  }
}
