@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@include respond-to-up($ntrn_breakpoint) {
  .ntrn {
    height: $desktop_loader-menu-height;
  }
  .ntrn__menu > li > ul {
    display: none;
  }
  .ntrn__loaded {
    height: auto;
  }
  .ntrn__loaded .ntrn__menu > li > ul {
    display: flex;
  }
}

.ntrn__spinner {
  position: absolute;
  top: calc(50% + 10px);
  left: calc(50% + 10px);

  &:before,
  &:after {
    content: "";
    top: -20px;
    left: -20px;
    width: 16px;
    height: 16px;
    position: absolute;
    border: 2px solid $mobile_spinner_colour;
    border-bottom-color: transparent;
    border-top-color: transparent;
    border-radius: 100%;
    animation: rotate 1s 0s linear infinite;

    @include respond-to-up($ntrn_breakpoint) {
      height: 20px;
      width: 20px;
      border: 2px solid $spinner_colour;
      border-bottom-color: transparent;
      border-top-color: transparent;
      border-radius: 100%;
    }
  }

  &:after {
    display: inline-block;
    top: -16px;
    left: -16px;
    width: 8px;
    height: 8px;
    animation-duration: .5s;
    border-color: $mobile_spinner_colour rbga($mobile_spinner_colour, 0);
    animation-direction: reverse;

    @include respond-to-up($ntrn_breakpoint) {
      width: 12px;
      height: 12px;
      border-color: $spinner_colour $spinner_colour;
    }
  }

  + .ntrn__menu {
    opacity: 0;
    visibility: hidden;
  }
  + .ntrn__toggle-inner {
    opacity: 0;
    visibility: hidden;
  }

  &.ntrn__loaded {
    opacity: 0;
    visibility: hidden;

    + .ntrn__menu {
      opacity: 1;
      visibility: visible;
    }

    + .ntrn__toggle-inner {
      opacity: 1;
      visibility: visible;
    }
  }
}
