/* Promote the target's containing block to the `.demo-elements` wrapper
   (outside the scroll container) so scrolling can push it to overflow and
   trigger fallbacks. Position-try options are evaluated against the
   inset-modified containing block, not the scrollport. See
   https://github.com/oddbird/css-anchor-positioning/issues/279. */
#position-try-tactics-combined .scroll-container {
  position: static;
}

/* Clip the target at the wrapper (which tightly bounds the scroll container) so
   a target whose anchor has scrolled out of view doesn't float over other
   content. The wrapper is the target's containing block, so this does not
   affect where fallbacks are evaluated. */
#position-try-tactics-combined .demo-elements {
  overflow: clip;
}

#my-anchor-try-tactics-combined {
  anchor-name: --my-anchor-try-tactics-combined;
  top: 5em;
  position: relative;
}

#my-target-try-tactics-combined {
  position: absolute;
  position-anchor: --my-anchor-try-tactics-combined;
  bottom: anchor(top);
  left: anchor(right);
  position-try:
    flip-block flip-inline,
    flip-inline --bottom-left-combined;
}

@position-try --bottom-left-combined {
  top: anchor(bottom);
  left: anchor(left);
  bottom: revert;
}
