@charset "utf-8";

/******************************************************************/
/** Header-Nav-Mobile-Friendly CSS                               **/
/** https://github.com/adamschricker/header-nav-mobile-friendly  **/
/**                                                              **/
/** Please contact if you have ideas or issues.                  **/
/******************************************************************/

:root {
  --color-border: #aaa;
  --color-text: #333;
}

/************/
/** HEADER **/
/************/
header {
  align-items: center;
  border-bottom: thin solid var(--color-border);
  display: flex;
  padding: 1rem;
}

header a {
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

header > a:first-child {
  flex: 1;
  font-size: 2rem;
  padding-right: 1rem;
  white-space: normal;
}

header > nav {
  flex: 1;
}

header > nav > button {
  display: none;
}

header > nav > ul {
  display: flex;
  justify-content: space-evenly;
  margin: 0;
  padding: 0;
}

header > nav > ul > li {
  list-style: none;
  margin: 0;
  padding: 0 0.25rem;
}

header > nav > ul > li > a {
  border: thin solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

header.mobile > nav {
  flex: 0;
  order: -1;
}

header.mobile > nav > button {
  background-color: transparent;
  border: thin solid var(--color-border);
  border-radius: 0.5rem;
  cursor: pointer;
  display: block;
  margin: 0 0.5rem 0 0;
  padding: 0.5rem;
}

header.mobile > nav > button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

header.mobile > nav > ul {
  background-color: #eee;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  justify-content: flex-start;
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: fixed;
  top: 0;
  transition: width 0.3s ease-in-out;
  width: 0;
  z-index: 99;
}

header.mobile > nav > ul > li {
  border-bottom: thin solid var(--color-border);
  margin: 0;
  padding: 0;
  width: 100%;
}

header.mobile > nav > ul > li > a {
  border: none;
  display: block;
  padding: 1rem;
}

header.mobile.open > div.overlay {
  background-color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 98;
}

header.mobile.open > nav > ul {
  border-right: thin solid var(--color-border);
  width: 300px;
}
