/* ---------- Navbar input ---------- */
#nav-search {
  position: relative;
  flex: 0 1 400px;
  min-width: 0;
}

#nav-search input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: inherit;
  font: inherit;
  font-size: 14px;
  outline: none;
}

#nav-search input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ---------- Results dropdown ---------- */
#pf-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(400px, 92vw);
  max-height: 50vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 6px;
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 14px;
  line-height: 1.45;
}

#pf-results .pf-meta {
  padding: 6px 10px;
  font-size: 12px;
  color: #6b7280;
}

#pf-results .pf-empty {
  padding: 12px 10px;
  color: #6b7280;
}

#pf-results button.pf-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#pf-results button.pf-item:hover,
#pf-results button.pf-item.pf-active {
  background: #f3f4f6;
}

#pf-results button.pf-item b {
  padding: 0 1px;
  background: transparent;
  border-radius: 2px;
  font-weight: 600;
}

#pf-results .pf-section {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

#pf-results .pf-page {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

#pf-results .pf-loading {
  padding: 8px 10px;
  font-size: 12px;
  color: #6b7280;
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  /* Search gets its own full-width row under the logo / login row */
  nav .helpdesk-container {
    flex-wrap: wrap;
    row-gap: 12px;
  }

  #nav-search {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    margin: 0;
  }

  #nav-search input {
    height: 44px;
    font-size: 16px;
  }

  /* Dropdown sits right under the input, same width, no hard-coded offsets */
  #pf-results {
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: auto;
    transform: none;
    max-height: 55vh;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* Finger-sized rows */
  #pf-results button.pf-item {
    min-height: 44px;
    padding: 12px;
    font-size: 15px;
  }
}