/* ==============================
   CLEAN NEON SEARCH BAR
============================== */
.search-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
  z-index: 3; /* keep nav glow from overlapping the search visually */
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(17, 17, 17, 0.7);
  border: 1px solid var(--color-accent);
  border-radius: 50px;
  padding: 6px 12px;
  transition: var(--transition-base);
  box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
  backdrop-filter: blur(6px);
  max-width: 100%;
}

.search-container:hover,
.search-container:focus-within {
  box-shadow: var(--glow-pink);
  border-color: var(--color-accent-strong);
  transform: scale(1.02);
}

.search-bar {
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  width: clamp(180px, 22vw, 260px);
  padding: 6px;
  transition: width 0.3s ease;
}

.search-bar::placeholder {
  color: var(--color-text-dim);
  opacity: 0.8;
}

.search-bar:focus {
  width: clamp(220px, 26vw, 320px);
}

/* Keep navbar stable on smaller widths */
@media (max-width: 1200px) {
  .nav-links { justify-content: flex-start; }
  .search-bar { width: clamp(150px, 20vw, 220px); }
  .search-bar:focus { width: clamp(180px, 22vw, 260px); }
}

.search-button {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 8px;
  transition: var(--transition-base);
}

.search-button:hover {
  color: var(--color-accent-strong);
  text-shadow: var(--glow-purple);
  transform: scale(1.2);
}

/* Settings link */
.settings { margin-left: auto; white-space: nowrap; }

/* ---------------------------
   Scoped search select — neon themed
   (Append this to integrate the select visually into the pill)
   --------------------------- */

.search-container { position: relative; }

/* Position the native select inside the left of the pill */
.search-scope-native {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;

  /* remove default browser chrome */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* visual styling + blend with neon theme */
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.04));
  color: var(--color-accent, #ff7bff);
  border: 1px solid rgba(255,105,180,0.12);
  padding: 8px 30px 8px 12px; /* right padding leaves room for custom caret */
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 92px;
  line-height: 1;
  box-shadow: inset 0 2px 10px rgba(255,105,180,0.02);
  cursor: pointer;
}

/* Small neon caret drawn via data-URI SVG (pink) */
.search-scope-native {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' width='10' height='6'><path fill='%23ff6db3' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}

/* hide IE/Edge default dropdown arrow */
.search-scope-native::-ms-expand { display: none; }

/* focus/hover glow */
.search-scope-native:focus,
.search-scope-native:hover {
  outline: none;
  border-color: var(--color-accent-strong, #ff2db3);
  box-shadow: 0 0 20px rgba(255,45,179,0.12);
}

/* Make room for the select inside the input text area */
.search-bar {
  padding-left: calc(92px + 20px); /* adjust if you change select width */
}

/* when nav becomes narrow, reduce select size to avoid overflow */
@media (max-width: 900px) {
  .search-scope-native {
    min-width: 74px;
    padding: 6px 26px 6px 10px;
    font-size: 0.85rem;
  }
  .search-bar { padding-left: calc(74px + 16px); }
}

/* If you use JS to enable a custom icon control, hide the native select */
.search-form.custom-scope-enabled .search-scope-native { display: none; }