header {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: subgrid;
  height: var(--header-height);
  background-color: rgb(from var(--mb) r g b / 0.40);
  backdrop-filter: blur(10px); z-index: 20;
}

.header-contents-container {
  grid-column: full-pad-start / full-pad-end;
  display: grid;
  grid-template-columns: auto 0 1fr;
  grid-template-areas: "left middle right";
  align-items: center;
  column-gap: var(--semibreve);
}

@media only screen and (min-width: 640px) {
  .header-contents-container.dashboard {
    grid-template-columns: 240px 1fr auto;
  }
}

.header-logo-container {
  grid-area: left;
  margin: 0 -8px;
  padding: 4px 8px;
  border-radius: var(--quaver);
  width: clamp(9.375rem, 4.9528rem + 11.7925vw, 12.5rem);
  display: flex;
  align-items: center;

  &:has(>.logo-link:hover) {
    background-color: rgb(from var(--mb) r g b / 0.2);
  }
  &:has(>.logo-link:active) {
    background-color: rgb(from var(--mb) r g b / 0.4);
  }
}

.logo-link {
  display: flex;
  justify-content: center;
  background: none;
  &:hover {
    background: none;
  }
}

.logo {
  object-fit: contain;
}

/* breadcrumb links */
.header-middle-breadcrumb-container {
  overflow-x: scroll;
  padding: var(--crotchet) 0;
}

.header-middle-breadcrumb-ul {
  display: none;
  align-items: center;
  gap: var(--crotchet);
  list-style: none;
  margin: auto 0;
}

@media (min-width: 640px) {
  .header-middle-breadcrumb-ul {
    display: flex;
  }
}

.header-breadcrumb-divider {
  color: var(--shw);
}

.header-breadcrumb-icon {
  flex-shrink: 0;
  color: var(--bg);
  height: 20px;
  width: 20px;
}

/* right nav */
.header-right-nav {
  grid-area: right;
  display: flex;
  flex-direction: row;
  justify-content: end;
}

.header-right-nav-ul {
  display: flex;
  flex-direction: row;
  justify-content: end;
  align-items: center;
  padding: 0;
  list-style: none;
  gap: var(--crotchet);
}

.header-text-link,
.header-breadcrumb-link {
  color: var(--shw);
  text-decoration: none;
  padding: var(--semiquaver) var(--quaver);
  border-radius: var(--quaver);
  white-space: nowrap;

  &:hover {
    background-color: rgb(from var(--mb) r g b / 0.2);
  }

  &:active {
    background-color: rgb(from var(--mb) r g b / 0.4);
    color: var(--shw);
  }
}

.account-button,
.home-button {
  background: none;
  height: 32px;
  width: 32px;
  border: none;
  border-radius: var(--quaver);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  &:hover {
    background-color: rgb(from var(--mb) r g b / 0.2);
  }
  &:active {
    background-color: rgb(from var(--mb) r g b / 0.4);
  }
  & > svg {
    color: var(--shw);
  }
}

/* hide hamburger */
@media (min-width: 640px) {
  .hamburger-wrapper {
    display: none;
  }
}

/* show hamburger */
@media (max-width: 640px) {
  .header-right-nav-ul {
    display: none;
  }
}
