.rbea-inspector-tab {
  .components-radio-control__option {
    display: inline-block;
    width: 50%;
    text-align: center;
  }
  .components-radio-control__option input:checked+label>div.responsive-blocks-editor-addons-design-panel-item{
    box-shadow: inset 0 0 0 1px #1e1e1e;
  }

  input[type="radio"] {
    display:none;
  }

  .responsive-blocks-editor-addons-design-panel-item {
    margin: 4px;
    padding: 4px;
  }
  .responsive-blocks-editor-addons-design-panel-item__svg {
    height: 53.248px;
    padding: 4px;

    svg {
      top: 0px;
      left: 0px;
      height: 100%;
      width: 100%;
      overflow: hidden;
      pointer-events: none;
      z-index: -1;
    }
  }
}

.wp-block[data-type="responsive-block-editor-addons/shape-divider"] {
  .has-fixed-toolbar & .block-editor-block-list__block-edit::before {
    display: none;
  }

  .wp-block-responsive-block-editor-addons-shape-divider {
    svg {
      bottom: 0;
      fill: currentColor;
      height: 100%;
      left: 0;
      position: absolute;
      width: 100%;
    }

    &.is-style-pointed {
      .wp-block-responsive-block-editor-addons-shape-divider__svg-wrapper
        .components-resizable-box__handle {
        left: calc(73.78% - 12px);
      }

      &.is-horizontally-flipped
        .wp-block-responsive-block-editor-addons-shape-divider__svg-wrapper
        .components-resizable-box__handle {
        left: calc(26.2% - 12px);
      }
    }
  }

  .wp-block-responsive-block-editor-addons-shape-divider__alt-wrapper.components-resizable-box__handle {
    left: 0;
    right: 0;
    width: 100%;

    &::after {
      background: theme(primary);
      border: 2px solid $white;
      border-radius: 50%;
      bottom: 4px;
      content: "";
      cursor: inherit;
      display: block;
      height: 16px;
      position: absolute;
      right: 4px;
      width: 16px;
    }
  }

  .wp-block-responsive-block-editor-addons-shape-divider__svg-wrapper::after,
  .wp-block-responsive-block-editor-addons-shape-divider__alt-wrapper::after {
    bottom: -2px;
    content: "";
    display: block;
    height: 3px;
    left: 0;
    opacity: 0;
    position: absolute;
    transition: opacity 100ms cubic-bezier(0.39, 0.575, 0.565, 1);
    width: 100%;
    z-index: 29;
  }

  .wp-block-responsive-block-editor-addons-shape-divider__svg-wrapper.is-resizing::after,
  .wp-block-responsive-block-editor-addons-shape-divider__alt-wrapper.is-resizing::after {
    background: theme(primary);
    opacity: 1;
  }

  .wp-block-responsive-block-editor-addons-shape-divider__svg-wrapper::after {
    left: 0;
    right: 0;
    width: 100%;
  }

  .components-resizable-box__handle {
    z-index: 30;
  }

  .wp-block-responsive-block-editor-addons-shape-divider.is-vertically-flipped
    .components-responsive-block-editor-addons-inline-color-picker {
    bottom: inherit;
    top: 20px;
  }
}

.editor-block-preview,
.block-editor-block-styles__item-preview {
  .wp-block-responsive-block-editor-addons-shape-divider {
    height: 100%;
    overflow: hidden;

    &__alt-wrapper {
      min-height: 50%;
    }

    &__svg-wrapper {
      min-height: 50%;
    }
  }

  //! Gutenberg 6.3+ introduced a new block style preview.
  .block-editor-block-preview__content[style*="transform:"] {
    .wp-block-responsive-block-editor-addons-shape-divider {
      height: 200px;

      &__alt-wrapper {
        min-height: 100px;
      }

      &__svg-wrapper {
        margin-bottom: -0.075em;
        margin-top: 0;
        min-height: 100px;
      }

      &.is-vertically-flipped &__svg-wrapper {
        margin-bottom: 0;
        margin-top: -0.075em;
      }
    }
  }
}

.rbea-shape-divider-control-container {
  .components-flex.components-h-stack.components-v-stack.components-radio-control__group-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;

    .components-radio-control__option {
      width: 100%;

      .responsive-blocks-editor-addons-design-panel-item__svg {
        width: 100%;
      }
    }
  }
}