/* Shared navigation correction for every 1858 theme. */
/* Reserve the fixed header's height so every page can reach its full top. */
body[data-design] .app {
  padding-top: 66px !important;
}

.site-header-bar {
  padding-right: 116px;
}

.site-header-brand {
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.site-header-brand > span:last-child {
  min-width: 0;
}

.topnav {
  right: 12px;
}

.menu-toggle-btn {
  min-height: 40px;
  gap: 8px;
  padding: 9px 14px;
}

.nav-drawer {
  max-height: calc(100vh - 82px);
  max-height: calc(100dvh - 82px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-drawer .nav-drawer-edition-link {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(240, 210, 143, 0.82);
  border-radius: 8px;
  background: #d5ab5d;
  color: #241a0c;
  font: 800 12px/1.35 ui-monospace, monospace;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
}

.nav-drawer .nav-drawer-edition-link:hover,
.nav-drawer .nav-drawer-edition-link:focus-visible {
  background: #eadcad;
  color: #241a0c;
  outline: none;
}

@media (max-width: 800px) {
  body[data-design] .app {
    padding-top: 60px !important;
  }

  .site-header-bar {
    height: 60px;
    gap: 7px;
    padding: 0 104px 0 10px;
  }

  .site-header-mark {
    width: 34px;
    height: 34px;
  }

  .site-header-brand strong {
    font-size: 14px;
  }

  .site-header-brand small {
    display: block;
  }

  .site-header-brand {
    gap: 7px;
  }

  .topnav {
    top: 10px;
    right: 8px;
  }

  .menu-toggle-btn {
    min-height: 38px;
    gap: 7px;
    padding: 8px 11px;
    font-size: 11px;
  }

  .nav-drawer {
    top: 64px;
    left: 8px;
    right: 8px;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
  }

  .nav-drawer::before {
    padding: 9px 14px 6px;
  }

  .nav-drawer label,
  .nav-drawer .theme-toggle {
    min-height: 43px;
    padding: 0 14px;
    font-size: 11.5px;
  }

  .nav-drawer .nav-drawer-edition-link {
    min-height: 48px;
    margin: 8px;
    padding: 10px 12px;
    font-size: 11.5px;
  }
}

@media (max-width: 380px) {
  .site-header-bar {
    padding-right: 98px;
  }

  .site-header-mark {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .site-header-brand strong {
    font-size: 13px;
  }

  .menu-toggle-btn {
    padding: 7px 9px;
    font-size: 10.5px;
  }
}
