/*
##############################################################################################
# header.css version 0.0.1
#  Copyright (C) 2026 Ian Millard, Sean Balfour
#  GPLv3
##############################################################################################
*/

:root {
  --header-height: 60px;
}

header {
  grid-column: 1 / -1;
  background: rgb(189,206,244);
  border-radius: 5px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  transition: background 0.3s;
  height: var(--header-height);
  z-index: 1100;
  position: relative;
}
body.dark header, [data-bs-theme="dark"] header {
  background: #26282c;
}

.container-xl header {
  margin-bottom: 20px;
}

.site-title {
  flex: 0 0 auto;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.site-title:hover {
  text-decoration: underline;
}

.nav-wrap {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav.site-nav--menu {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}
.site-nav.site-nav--menu .site-nav-link {
  width: 100%;
  padding: 8px 4px;
  box-sizing: border-box;
}
.site-nav.site-nav--menu #unitSystem,
.site-nav.site-nav--menu #themeToggle {
  margin-top: 8px;
}
.site-nav.site-nav--menu #unitSystem {
  width: 100%;
}

.site-nav-link {
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.site-nav-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.menu-btn {
  display: none;
  flex: 0 0 auto;
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
}
.menu-btn span {
  height: 3px;
  width: 100%;
  background: orange;
  border-radius: 2px;
  transition: 0.4s ease;
  transform-origin: center;
}
body.menu-open .menu-btn span:nth-child(1) {
  transform: rotate(45deg) translateY(9px);
}
body.menu-open .menu-btn span:nth-child(2) {
  opacity: 0;
}
body.menu-open .menu-btn span:nth-child(3) {
  transform: rotate(-45deg) translateY(-9px);
}

#unitSystem {
  font-family: inherit;
  font-size: 13px;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(128,128,128,0.4);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
#unitSystem option {
  background: rgb(204,218,246);
  color: #222;
}
body.dark #unitSystem option, [data-bs-theme="dark"] #unitSystem option {
  background: #2b2b2b;
  color: #f5f5f5;
}

#themeToggle {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.menu {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: rgb(189,206,244);
  border-radius: 5px;
  box-sizing: border-box;
}
body.dark .menu, [data-bs-theme="dark"] .menu {
  background: #26282c;
}
body.menu-open .menu {
  max-height: 500px;
}
.menu-inner {
  padding: 16px 20px;
  box-sizing: border-box;
}
}