.dark-layout .form-control[type=file]::-webkit-file-upload-button {
  background-color: #283046;
}
.dark-layout .form-control[type=file]::file-selector-button {
  background-color: #283046;
}

/* ─────────────────────────────────────────────────────────────────────────
 * Navbar search autocomplete
 *
 * core.css gives .search-list a border-radius but no overflow clipping and no
 * shadow, so on a white page the panel had no visible edge at all and the last
 * row painted square over the rounded bottom corners.
 *
 * dark-layout.css has NO rule for this dropdown, so it inherited
 * `background: #fff` from core.css and rendered white-on-dark. Fixed below
 * using the same surface, shadow and hover values the theme's own
 * .dropdown-menu uses, so it sits consistently with the rest of the navbar.
 * ──────────────────────────────────────────────────────────────────────── */

.navbar-container .search-input .search-list.search-list-main {
  /* Clip children to the radius — without this the last row's background
     squares off the bottom corners. */
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid rgba(34, 41, 47, 0.05);
  /* Two layers: a wide soft ambient shadow to lift it off the page, plus a
     tighter one to define the edge against white. */
  box-shadow:
    0 8px 28px rgba(34, 41, 47, 0.14),
    0 2px 6px rgba(34, 41, 47, 0.08);
}

/* PerfectScrollbar scrolls the same element we're clipping, so let it. */
.navbar-container .search-input .search-list.search-list-main.ps {
  overflow: hidden !important;
}

/* Section subheads ("Knowledge Base", "Servers", …) read as labels, not rows.
   Brand purple via the CSS variable rather than a literal, so they follow the
   theme if the primary is ever changed. #7189CC is the same in dark mode, so
   one rule covers both. */
.navbar-container .search-input .search-list .section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgb(var(--bs-primary-rgb, 113, 137, 204));
}

/* The subhead row is a label, not a result: no hover highlight, no pointer,
   and it keeps the left padding the <a> used to provide. */
.navbar-container .search-input .search-list li.lh-search-group {
  padding: 0 1rem;
  cursor: default;
}
.navbar-container .search-input .search-list li.lh-search-group:hover {
  background: transparent;
}

.navbar-container .search-input .search-list li a small {
  line-height: 1.2;
}

/* The "no results" row isn't selectable, so it shouldn't look clickable. */
.navbar-container .search-input .search-list li.lh-no-results a {
  cursor: default;
}
.navbar-container .search-input .search-list li.lh-no-results:hover {
  background: transparent;
}

/* ── dark mode ── */

.dark-layout .navbar-container .search-input .search-list.search-list-main {
  background: #283046;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
}

.dark-layout .navbar-container .search-input .search-list li a {
  color: #d0d2d6;
}

.dark-layout .navbar-container .search-input .search-list li a small {
  color: #676d7d !important;
}

.dark-layout .navbar-container .search-input .search-list li.auto-suggestion:hover,
.dark-layout .navbar-container .search-input .search-list li.auto-suggestion.current_item {
  background: rgba(113, 137, 204, 0.12);
}

.dark-layout .navbar-container .search-input .search-list li.lh-no-results:hover {
  background: transparent;
}
