@import "../../../../Build/node_modules/mmenu-light/src/mmenu-light";


:root {
  /** Height for menu items. */
  --mm-spn-item-height: 3rem;

  /** Indent for menu items. */
  --mm-spn-item-indent: 1.5rem;

  /** Line height for menu items. */
  --mm-spn-line-height: 3rem;

  /** Panel offset. */
  --mm-spn-panel-offset: 30%;
}


#{$mmprfx} {
  //  Light theme
  &#{$mmprfx}--light {
    background: #e3f3f4;
  }

  li:before {
    color: $primary;
    opacity: 1;
  }

  li:after {
    border-top-color: $dark-border-subtle;
  }

  &.mm-spn--navbar.mm-spn--main:after,
  &.mm-spn--navbar:after {
    background-color: $primary;
    opacity: inherit;
    color: $white;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
  }

  &.mm-spn--navbar:before {
    color: $secondary;
    opacity: inherit;
    z-index: 1;
  }

  &.mm-spn--navbar ul:before {
    content: none;
  }

  a:not(:last-child):after {
    content: none;
  }

  .current > .nav-link,
  .active > .nav-link {
    color: $primary;
  }
}


.mm-ocd--open {
  background: rgb(0, 77, 77, .8);
}


.mm-ocd__backdrop {
  background: transparent;
}




/** Selector for the root */
$mb_root: ':root';

/** Selector for the button. */
$mb_module: '.mburger';

$__opened: '.mm-ocd-opened';

/** Selector for the button with the "collapse" effect. */
$mb_module_collapse: '#{$mb_module}--collapse';

/** Selector for the button when the menu is opened. */
$mb_module_cross: '#{$__opened} #{$mb_module}';

/** Selector for the button with the "collapse" effect when the menu is opened. */
$mb_module_collapse_cross: '#{$__opened} #{$mb_module_collapse}';

/** Timeout before starting the animation, ensures the animation starts after the menu is fully opened. */
$mb_animate_timeout: 0.2s;

/** Whether or not to include the CSS for the "collapse" animation. */
$mb_fx_collapse: true;

#{$mb_root} {
  /** Size for the button. */
  --mb-button-size: 2.5rem;

  /** Width for the bars, relative to the button. */
  --mb-bar-width: 1;

  /** Height for the bars.*/
  --mb-bar-height: 2px;

  /** Distance between bars (approximately). */
  --mb-bar-spacing: 9px;

  /** Timeout before starting the animation, ensures the animation starts after the menu is fully opened. */
  --mb-animate-timeout: #{$mb_animate_timeout};
}


#{$mb_module} {
  //	Overridable values
  background: transparent;
  border: none;
  border-radius: 0;
  color: inherit;
  z-index: 1;
  //	Button
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  height: var(--mb-button-size);
  padding: 0 0 0 var(--mb-button-size);
  margin: 0;
  line-height: var(--mb-button-size);
  vertical-align: middle;
  appearance: none;
  outline: none;
  cursor: pointer;

  //	Hamburger
  b {
    display: block;
    position: absolute;
    left: calc(var(--mb-button-size) * ((1 - var(--mb-bar-width)) / 2));
    width: calc(var(--mb-button-size) * var(--mb-bar-width));
    height: var(--mb-bar-height);
    background: currentColor;
    color: inherit;
    opacity: 1;

    //	Bar 1
    &:nth-of-type(1) {
      bottom: calc(50% + var(--mb-bar-spacing));
      transition: bottom 0.2s ease, transform 0.2s ease, width 0.2s ease;
    }

    //	Bar 2
    &:nth-of-type(2) {
      top: calc(50% - (var(--mb-bar-height) / 2));
      transition: opacity 0.2s ease;
    }

    //	Bar 3
    &:nth-of-type(3) {
      top: calc(50% + var(--mb-bar-spacing));
      transition: top 0.2s ease, transform 0.2s ease, width 0.2s ease;
    }
  }
}


//	Cross
#{$mb_module_cross} {
  b {
    &:nth-of-type(1) {
      bottom: calc(50% - (var(--mb-bar-height) / 2));
      transform: rotate(45deg);
    }

    &:nth-of-type(2) {
      opacity: 0;
    }

    &:nth-of-type(3) {
      top: calc(50% - (var(--mb-bar-height) / 2));
      transform: rotate(-45deg);
    }
  }
}


//	Hamburger
#{$mb_module_collapse} {
  b {
    &:nth-of-type(1) {
      transition: bottom 0.2s ease, margin 0.2s ease,
      transform 0.2s ease;
      transition-delay: 0.2s, 0s, 0s;
    }

    &:nth-of-type(2) {
      transition: top 0.2s ease, opacity 0s ease;
      transition-delay: 0.3s, 0.3s;
    }

    &:nth-of-type(3) {
      transition: top 0.2s ease, transform 0.2s ease;
    }
  }
}


//	Cross

#{$mb_module_collapse_cross} {
  b {
    &:nth-of-type(1) {
      bottom: calc(
              50% - var(--mb-bar-spacing) - var(--mb-bar-height)
      );
      margin-bottom: calc(
              var(--mb-bar-spacing) + (var(--mb-bar-height) / 2)
      );
      transform: rotate(45deg);
      transition-delay: calc(var(--mb-animate-timeout) + 0.1s),
      calc(var(--mb-animate-timeout) + 0.3s),
      calc(var(--mb-animate-timeout) + 0.3s);
    }

    &:nth-of-type(2) {
      top: calc(50% + var(--mb-bar-spacing));
      opacity: 0;
      transition-delay: calc(var(--mb-animate-timeout) + 0s),
      calc(var(--mb-animate-timeout) + 0.2s);
    }

    &:nth-of-type(3) {
      top: calc(50% - (var(--mb-bar-height) / 2));
      transform: rotate(-45deg);
      transition-delay: calc(var(--mb-animate-timeout) + 0.3s),
      calc(var(--mb-animate-timeout) + 0.3s);
    }
  }
}

