/* Sections have no ID of their own, so this module supplies one. Positioning it
   against the section rather than the row puts the jump target on the section's
   top edge, outside the 10vw padding in theme-overrides.css. */

.dnd-section:has(.fl_section_anchor) {
  position: relative;
}

.fl_section_anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.fl_section_anchor:focus {
  outline: none;
}

/* Keep the row it sits in from adding height of its own. */

.dnd-module:has(> .hs_cos_wrapper > .fl_section_anchor),
.hs_cos_wrapper:has(> .fl_section_anchor) {
  margin: 0;
  padding: 0;
}

/* Editor-only badge, so the module can be selected and its ID read at a glance. */

.fl_section_anchor_hint {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  border-radius: 3px;
  background: hsl(0deg 0% 0% / 70%);
  padding: 0.125rem 0.5rem;
  pointer-events: auto;
  color: white;
  font-size: 0.75rem;
  font-family: monospace;
  line-height: 1.6;
  white-space: nowrap;
}

/* Browsers without :has() cannot make the section a containing block, and an
   absolute anchor would escape to the page. Fall back to a static 0-height
   marker: the link still works, it just lands inside the section's padding. */

@supports not selector(:has(*)) {
  .fl_section_anchor {
    position: static;
  }
}
