/* Search options (plan step 16C.6, owner's pick C1). A quiet round icon at
   the end of the filter row; the panel sits under the row in the page flow
   because the row scrolls sideways and would clip a popup. */
.search-options-btn {
  margin-left: auto;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 50%;
  background: #F1F5F9;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-options-btn svg circle {
  fill: #F1F5F9;
}

.search-options-btn:hover,
.search-options-btn[aria-expanded="true"] {
  background: #E2E8F0;
}

.search-options-btn:hover svg circle,
.search-options-btn[aria-expanded="true"] svg circle {
  fill: #E2E8F0;
}

/* Off is the unusual state, so the icon shows it with a small blue dot. */
.search-options-btn.is-off {
  position: relative;
}

.search-options-btn.is-off::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1DA1F2;
  box-shadow: 0 0 0 2px #fff;
}

.search-options-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.search-options-panel {
  margin: 0 16px 12px;
  padding: 6px 0;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  background: #fff;
}

.search-options-title {
  margin: 0;
  padding: 8px 16px 4px;
  font-size: 13px;
  color: var(--muted, #64748B);
}

.search-options-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
}

.search-options-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-options-label {
  font-size: 15px;
  color: var(--text, #0F172A);
}

.search-options-help {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted, #64748B);
}

.search-switch {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
}

.search-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.search-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #CBD5E1;
  transition: background 0.15s ease;
  pointer-events: none;
}

.search-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.search-switch input:checked + .search-switch-track {
  background: #1DA1F2;
}

.search-switch input:checked + .search-switch-track::after {
  transform: translateX(18px);
}

.search-switch input:focus-visible + .search-switch-track {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

#view-search.search-entry-mode .search-options-panel,
#view-search.search-suggest-mode .search-options-panel {
  display: none;
}
