@import "theme-colour";

@widget-active-color: #1E90FF;
@widget-hover-color: #87CEFA;
@widget-active-background: #ecf7ff;
@row-border-color: #aaa;
@row-border-active-color: #888;
@widget-placeholder-color: #aaa;

/**
 * Caption
 */
.component-caption {
  color: #F5F5F5;
  position: absolute;
  top: -1.45em;
  left: 1.1em;
  background-color: @widget-hover-color;
  line-height: 1.5;
  opacity: 0;
  z-index: 50;
  visibility: hidden;
  display: inline-block;
  padding: .15em .4em;
  white-space: nowrap;
}

// row caption
.component-caption--row {
  left: -5px;
  background-color: @row-border-color;
  box-shadow: 0 0 4px @row-border-color;
  top: -1.85em;
}

.btn-caption {
  background: transparent;
  border: 0
}

.btn-caption:hover {
  color: #333;
}

.row-builder {
  position: relative;
}

/**
 * Caption for Row element
 */
.row-element.component-element--hover .component-element--selected .component-caption {
  opacity: 0;
  z-index: auto;
}

.row-element.component-element--hover > .component-caption {
  opacity: 1;
  z-index: 52;
  transition: opacity .3s ease;
  transition-delay: .2s;
  visibility: visible;
}

/**
 * Caption for component
 */

.component-element--selected:hover > .widget-wrapper > .component-caption {
  background-color: @widget-active-color;
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease;
}

.row.row-builder {
  margin-left: 0;
  margin-right: 0;
}

.row-element {
  border: 1px transparent solid;
  border-left: #eee 5px solid;
  position: relative;

}

/**
 * Component
 */
.component-element{
  display: block;
  border: 1px transparent solid;
  margin: .3em 0;
  padding: 1px;
}

/**
 * Container
 */
.container-element,
.form-element,
.modal-element {
  box-shadow: 1px 1px 4px #ccc;
  display: block;
  border: 1px dashed;
  border-color: #9292a4;
}

.form-element {
  border-width: 2px;
}

/**
 * Modal
 */
.modal-element {
  box-shadow: -15px 15px 0px -8px lightgrey;
  margin-bottom: 10px;
}

.component-element--hover {
  border-color: @widget-hover-color;
  transition: opacity .3s ease;
}

.row-element.component-element--hover {
  border: 1px solid @row-border-active-color;
  border-left: @row-border-active-color 5px solid;
  transition: border .3s ease;
  transition-delay: .2s;
}

.component-element--selected {
  border: 1px solid @widget-active-color;
  background-color: @widget-active-background;
  transition: opacity .3s ease;
}

.move-row-action {
  font-size: large;
  color: inherit;
  cursor: pointer;

  &:hover {
    color: black;
  }
}

.widget-content > .row {
  margin-left: -15px;
  margin-right: -15px;
}

.widget-label-horizontal {
  padding-top: 7px;
  margin-bottom: 0;
  text-align: right;
}

.widget-content {
  overflow-x: hidden;
  min-height: 25px;
  // prevent weird behavior when drag/dropping a widget on itself
  // see https://bonitasoft.atlassian.net/browse/BS-16037
  pointer-events: none;
}

/** improve wysiwyg in editor */
.widget-content .form-horizontal .form-group {
  margin-bottom: 0;
}

.component-selected {
  .shadow-on-focus();
  border: 2px #555555 solid;
}

.widget-placeholder {
  margin: 0.3em 0;
  min-height: 2.5em;
}

.widget-placeholder.widget-placeholder::before {
  content: attr(data-col);
  .text-center();
  color: #cccccc;
  font-family: 'Helvetica';
  font-size: 18px;
  font-weight: 600;
  position: relative;
  position: absolute;
  border-radius: 5px;
  top: 0;
  bottom: 0;
  left: 15px;
  right: 15px;
  border: 2px dashed transparent;
  background-color: #eee;
  z-index: 0;
  line-height: 2em;
}

.bo-dropzone-hover.widget-placeholder::before {
  background-color: #ddd;
  border-color: #999;
  color: @widget-placeholder-color;
  left: 15px;
  right: 15px;
}

.tab-body {
  margin-top: 10px;
}

.btn-tab {
  background: transparent;
  border: 0;
  padding: 1px 2px;
}

.tab-title {
  margin: 0 5px;
}

.Component-marker {
  position: absolute;
  z-index: 99;
  right: 18px;
  top: 6px;
  color: @widget-placeholder-color;
  background-color: transparent;
}

.component-element--selected .Component-marker {
  color: @widget-active-color;
}

.error {
  .modal-element{
    border-color: @btn-bonita-primary-bg;
  }
}

.error-icon, .ng-scope .error-icon {
  color: @btn-bonita-primary-bg;
}
