/* Match Spectra's frontend border-box sizing inside the iframed editor. */
.editor-styles-wrapper .ma-figma-authored-painted-surface {
  box-sizing: border-box;
}

.ma-figma-authored-content-frame {
  box-sizing: border-box;
}

.ma-figma-has-shape-divider {
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.ma-figma-has-shape-divider > .ma-figma-content-container {
  position: relative;
  z-index: 1;
}

/* Gutenberg wraps every child block; remove the divider's wrapper from flex flow too. */
.editor-styles-wrapper
  .ma-figma-has-shape-divider
  .block-editor-block-list__block:has(.ma-figma-shape-divider) {
  left: 0;
  margin: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 0;
}

.editor-styles-wrapper
  .ma-figma-has-shape-divider
  .block-editor-block-list__block:has(.ma-figma-shape-divider-bottom) {
  bottom: 0;
  top: auto;
}

.editor-styles-wrapper
  .ma-figma-has-shape-divider
  .block-editor-block-list__block:has(.ma-figma-content-container) {
  position: relative;
  z-index: 1;
}

.ma-figma-shape-divider {
  left: 0;
  line-height: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  pointer-events: none;
  position: absolute;
  width: 100% !important;
  z-index: 0;
}

.ma-figma-shape-divider-top {
  top: 0;
}

.ma-figma-shape-divider-bottom {
  bottom: 0;
}

.ma-figma-shape-divider img {
  display: block;
  height: auto;
  width: 100%;
}
