// link in media manager
a.plugin_diagrams_create {
  display: flex;
  margin-bottom: 1em;
  gap: 0.25em;

  &:before {
    content: '';
    width: 1.2em;
    height: 1.2em;
    background-image: url("img/diagramsnet.svg");
    background-repeat: no-repeat;
  }
}

// in-page display
.diagrams-svg-wrapper {
  overflow: auto;
  width: fit-content;
  height: fit-content;

  // these match the standard dokuwiki template's img alignment
  &.media {
    margin: .2em 0;
  }

  &.medialeft {
    margin: .2em 1em .2em 0;
    display: inline-block;
  }

  &.mediaright {
    margin: .2em 0 .2em 1em;
    display: inline-block;
  }

  &.mediacenter {
    margin: .2em auto;
    display: block;
  }

  object {
    // fix for sometimes missing edges
    max-width: 99%;
  }
}

// prosemirror node view
.ProseMirror img.diagrams-svg {
  cursor: pointer;
}

// style for the editor itself (on top of everything)
#plugin__diagrams-editor {
  border: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

// buttons
.diagrams-svg-wrapper .diagrams-buttons .diagrams-btn {
    @media print {
      display: none;
    }

    font-size: 0.75em;

    svg {
      margin-right: 0.25em;
      position: relative;
      top: 0.2em;
    }
}