header {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100;
  background: var(--header-bg-color);
  backdrop-filter: blur(0.25em);
  box-shadow: var(--header-shadow);

  nav {
    display: flex;
  }
  nav.expandable-menu {
    display: none;
    &.visible {
      display: flex;
    }
  }

  form {
    width: auto;
    max-width: inherit;
  }

  a, button {
    font: inherit;
    font-weight: bold;
    color: black;
    cursor: pointer;

    display: flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    height: 4em;
    padding: 0 1em;
    min-width: 2em;
    background: transparent;
    border: none;
    transition: 0.15s ease-in all;

    &:hover {
      background: var(--header-link-hover-color);
      box-shadow: 0 0em 0.5em color(display-p3 0.135 0.494 0.26 / 0.25);
      color: black;
      text-decoration: none;
    }

    & > svg {
      height: 2em;
    }

    & > span {
      display: none;
    }
  }

  button {
    margin-right: 0;
  }
}

header #expandable-menu-link {
  display: none;
  &.visible {
    display: flex;
    flex-shrink: 0;
  }
}

header .expandable-menu {
  flex-direction: column;
  width: 100vw;

  a, button {
    width: 100%;
    & > svg {
      margin-right: 0.5em;
    }
    & > span {
      display: block;
    }
  }
}

@media screen and (min-width: 36em) {
  header {
    bottom: initial;
    top: 0;
  }

  header #expandable-menu-link.visible { display: none; }
  header nav.expandable-menu {
    display: flex;
    flex-direction: row;
    width: auto;

    a, button {
      width: auto;
    }
  }
  header a, button {
    & > span {
      display: block;
    }

    & > svg {
      display: none;
      height: 1.5em;
    }
  }
}

@media screen and (min-width: 48em) {

  header a, button {
    & > span {
      display: block;
    }

    & > svg {
      display: block;
      margin-right: 0.5em;
      height: 1.25em;
    }
  }
}
