@import "properties-panel/properties";
@import "./align.less";

* {
  box-sizing: border-box;
}

body,
html {

  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

  font-size: 12px;

  height: 100%;
  max-height: 100%;
  padding: 0;
  margin: 0;
}

.editor-button {
  display: inline-block;
  background: var(--palette-background-color);
  border: solid 1px var(--palette-border-color);
  border-radius: 2px;
  padding: 6px;
  cursor: pointer;
}

.editor-button:hover {
  color: #4d90ff
}

.editor-button.disabled {
  opacity: 0.3;
}

.edit-domainModel {
  position: absolute;
  left: 68px + 20px;
  top: 20px;
  box-sizing: border-box;
  z-index: 20010;
}

.domainEditor {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 20000;
  display: none;
  padding: 60px 20px 20px (68px + 20px);

  &.open {
    display: block;
  }

  .close {
    float: right;
  }

  textarea {
    display: block;
    width: 50%;
    height: 80%;
    padding: 20px;
    box-sizing: border-box;
    font-family: monospace;
    font-size: 12px;
    resize: none;
  }
}



a:link {
  text-decoration: none;
}

// stereotyp icon + longer text


.djs-context-pad .entry {

  &.icon-stereotyp {
    // background: url('ifml-js/resources/icons/Stereotyp.svg');
    // background-size: 100%;
    // background-position: center center;
    // background-repeat: no-repeat;
    line-height: 22px;
    text-align: left;
    width: auto;
    white-space: nowrap;
    padding-right: 5px;

    &::before {
      margin-right: 3px;
    }
  }

  .iconText {
    font-size: 10px;
    line-height: 22px;
    vertical-align: bottom;
    display: inline;
  }
}

.djs-context-pad .entry .content {
  position: relative;
  width: 100%;
  height: 100%;

  >.message {
    width: 100%;
    height: 100%;
    text-align: center;
    display: table;

    font-size: 16px;
    color: #111;

    .note {
      vertical-align: middle;
      text-align: center;
      display: table-cell;
    }

    &.error {
      .details {
        max-width: 500px;
        font-size: 12px;
        margin: 20px auto;
        text-align: left;
        color: #BD2828;
      }

      pre {
        border: solid 1px #BD2828;
        background: #fefafa;
        padding: 10px;
        color: #BD2828;
      }
    }
  }

  &:not(.with-error) .error,
  &.with-error .intro,
  &.with-diagram .intro {
    display: none;
  }

  .canvas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .canvas,
  .properties-panel-parent {
    display: none;
  }

  &.with-diagram {

    .canvas,
    .properties-panel-parent {
      display: block;
    }
  }
}


.buttons {
  position: fixed;
  bottom: 20px;
  left: 20px;

  padding: 0;
  margin: 0;
  list-style: none;

  >li {
    display: inline-block;
    margin-right: 10px;

    >a {
      background: #DDD;
      border: solid 1px #666;
      display: inline-block;
      padding: 5px;
    }
  }

  a {
    opacity: 0.3;
  }

  a.active {
    opacity: 1.0;
  }
}

.properties-panel-parent {
  .overlay();
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 260px;
  z-index: 10;
  border-left: 1px solid #ccc;
  overflow: auto;

  &:empty {
    display: none;
  }

  >.djs-properties-panel {
    padding-bottom: 70px;
    min-height: 100%;
  }
}


[data-popup="align-elements"] .djs-popup-body {
  display: flex;
}

[data-popup="align-elements"] .djs-popup-body [data-group]+[data-group] {
  border-left: 1px solid var(--popup-border-color);
}

[data-popup="align-elements"] [data-group="align"] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

[data-popup="align-elements"] .djs-popup-body .entry {
  padding: 6px 8px;
}

[data-popup="align-elements"] .djs-popup-body .entry img {
  display: block;

  height: 20px;
  width: 20px;
}

[data-popup="align-elements"] .bjs-align-elements-menu-entry {
  display: inline-block;
}