.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.custom-select {
  position: relative;
  display: inline-block;
  min-width: 8rem;
  color: var(--paper, var(--ink, #f1eddf));
  font: inherit;
}

.custom-select-button {
  width: 100%;
  min-height: 31px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--ink-4, var(--line, #35443c));
  border-radius: 6px;
  background: var(--ink-2, var(--surface, #19221f));
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.watch-label {
  flex-wrap: wrap;
}

.watch-hidden-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

#watch-source + .custom-select {
  min-width: 7.5rem;
}

#watch-run + .custom-select {
  width: min(15rem, 30vw);
}

#watch-pace + .custom-select {
  min-width: 5.5rem;
}

.custom-select-button::after {
  position: absolute;
  top: 50%;
  right: 10px;
  content: "▾";
  transform: translateY(-50%);
  color: var(--muted, #b8bcb2);
  pointer-events: none;
}

.custom-select-button:focus-visible {
  outline: 2px solid var(--gold-bright, var(--accent, #d5c78b));
  outline-offset: 2px;
}

.custom-select-button:disabled {
  opacity: .5;
  cursor: default;
}

.custom-select-list {
  position: absolute;
  z-index: 100;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-width: min(28rem, 85vw);
  max-height: 18rem;
  margin: 0;
  padding: 4px;
  overflow: auto;
  border: 1px solid var(--ink-4, var(--line, #35443c));
  border-radius: 6px;
  background: var(--ink-2, var(--surface, #19221f));
  box-shadow: 0 10px 28px rgb(0 0 0 / 42%);
  list-style: none;
}

.custom-select-option {
  padding: 7px 9px;
  border-radius: 4px;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.custom-select-option[aria-selected="true"] {
  background: rgb(213 199 139 / 16%);
  color: var(--gold-bright, var(--accent, #d5c78b));
}

.custom-select-option.focused,
.custom-select-option:hover {
  background: rgb(114 185 177 / 18%);
}

@media (max-width: 650px) {
  .custom-select-button {
    min-height: 44px;
    font-size: 16px;
  }
}
