/* Menu module, phones and tablets: up to 991px (the tablets and phones of a Bootstrap 3 theme). The
   module links it after menu.css.

   A theme that wants it on wider screens (say, the burger up to 1049px, or a "width" menu with a
   title folding up to 1199px) copies the rules into its own stylesheet inside its own media query,
   with "html " before every selector: the module's stylesheets come after the theme's, and the
   prefix lets the copy win over menu.css as this file does by coming last. For a "width" menu only
   the last two rules are needed.

   --dmenu-narrow: 1 tells menu.js that the menus are in their phone mode (the burger and the
   drawer). The burger, then as many items as fit in one line; the ones that do not fit wrap into
   a hidden second line (they are in the drawer anyway). No panels and no separators here. */
@media (max-width: 991px) {
  .dmenu {
    --dmenu-narrow: 1;
  }

  .dmenu-burger {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--dm-bar-text);
    cursor: pointer;
  }

  .dmenu-burger:hover,
  .dmenu-burger:focus {
    background: var(--dm-bar-hover);
    outline: none;
  }

  .dmenu-burger span,
  .dmenu-burger span::before,
  .dmenu-burger span::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
  }

  .dmenu-burger span {
    position: relative;
  }

  .dmenu-burger span::before,
  .dmenu-burger span::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .dmenu-burger span::before {
    top: -6px;
  }

  .dmenu-burger span::after {
    top: 6px;
  }

  .dmenu-bar {
    flex-wrap: wrap;
    height: 44px;
    overflow: hidden;
    padding: 0;
  }

  .dmenu-top-link {
    height: 44px;
    padding: 0 10px;
    border-radius: 0;
    font-size: 13px;
    letter-spacing: 0.5px;
  }

  .dmenu-top-link .dmenu-chevron,
  .dmenu-panel {
    display: none !important;
  }

  .dmenu-top + .dmenu-top {
    border-left: 0;
  }

  /* "Button with a drop-down panel" menus: not on phones - the main menu's drawer has it all; one
     with a title stays, with its button (menu.css) */
  .dmenu--dropdown:not(.dmenu--titled) {
    display: none;
  }

  /* A menu with a title folding all its items ("width"): all but the kept ones go into the button */
  .dmenu--fold-width .dmenu-top:not(.is-kept) {
    display: none;
  }

  .dmenu--fold-width > .dmenu-more {
    display: block;
  }
}

@media (max-width: 399px) {
  .dmenu-top-link {
    padding: 0 6px;
    font-size: 12px;
    letter-spacing: 0.3px;
  }

  .dmenu-burger {
    width: 42px;
  }
}
