.auto-foreign-name-header,
.auto-foreign-name-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
}

[data-auto-translate-scope] .auto-foreign-name-header {
  justify-content: space-between;
}

.auto-foreign-name-header > label[for] {
  margin: 0;
  font: inherit;
  color: inherit;
}

label.auto-foreign-name-toggle,
.auto-foreign-name-header label.auto-foreign-name-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.auto-foreign-name-field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.auto-foreign-name-toggle > input[data-auto-translate-toggle] {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.auto-foreign-name-toggle > .auto-foreign-name-track {
  display: inline-block;
  flex: 0 0 32px;
  box-sizing: border-box;
  width: 32px;
  height: 18px;
  padding: 2px;
  border-radius: 999px;
  background: #cbd5e1;
}

.auto-foreign-name-track::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.auto-foreign-name-toggle > input:checked + .auto-foreign-name-track {
  background: #176aab;
}

.auto-foreign-name-toggle > input:checked + .auto-foreign-name-track::after {
  margin-inline-start: 14px;
}

.auto-foreign-name-toggle > input:focus-visible + .auto-foreign-name-track {
  outline: 2px solid #176aab;
  outline-offset: 3px;
}

.auto-foreign-name-toggle:has(> input:disabled) {
  cursor: default;
  opacity: .55;
}
