/*
  Dependency chain: every Root Pages topbar -> universal Jobs discovery link ->
  desktop, mobile, and enlarged-text navigation without route-specific styling.
*/

.topbar {
  flex-wrap: wrap;
}

.topbar > nav {
  flex-wrap: wrap;
  min-width: 0;
}

.nav {
  gap: 0.45rem 1rem;
}

.jobs-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.18rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  text-decoration-color: rgba(255, 215, 160, 0.55);
}

.jobs-primary-link:hover,
.jobs-primary-link:focus-visible,
.jobs-primary-link[aria-current="page"] {
  color: #ffd7a0;
}

@media (max-width: 520px) {
  .nav-context {
    max-width: 100%;
    white-space: normal;
  }

  .nav-context span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .topbar > nav {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

@media (min-width: 381px) and (max-width: 520px) and (min-height: 421px) {
  .topbar .nav-menu {
    position: static;
  }

  .topbar .nav-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    min-width: 0;
    max-height: calc(100vh - 100% - 1rem);
    max-height: calc(100dvh - 100% - 1rem);
    overflow-y: auto;
  }
}

@media (max-width: 380px), (max-height: 420px) {
  .topbar {
    position: relative;
    top: auto;
  }

  .topbar .nav-menu-panel {
    position: static;
    width: 100%;
    min-width: 0;
    max-height: none;
    margin-top: 0.5rem;
    overflow-y: visible;
  }
}

@media (max-width: 380px) {
  .topbar .nav-menu {
    width: 100%;
  }
}
