/*!
 * jQuery QueryBuilder 2.1.0
 * Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
 * Licensed under MIT (http://opensource.org/licenses/MIT)
 */

.query-builder .rules-group-container, .query-builder .rule-container, .query-builder .rule-placeholder {
  position: relative;
  margin: 4px 0;
  border-radius: 5px;
  padding: 5px;
  border: 1px solid #EEE;
  background: rgba(255, 255, 255, 0.9);
}

.query-builder .rule-container .rule-filter-container,
.query-builder .rule-container .rule-operator-container,
.query-builder .rule-container .rule-value-container, .query-builder .error-container, .query-builder .drag-handle {
  display: inline-block;
  margin: 0 5px 0 0;
  vertical-align: middle;
}

.query-builder .rules-group-container {
  padding: 10px;
  padding-bottom: 6px;
  border: 1px solid #DCC896;
  background: rgba(250, 240, 210, 0.5);
}
.query-builder .rules-group-container .rules-group-header {
  margin-bottom: 10px;
}
.query-builder .rules-group-container .rules-group-header input[name$=_cond] {
  display: none;
}
.query-builder .rules-group-container .rules-list {
  list-style: none;
  padding: 0 0 0 15px;
  margin: 0;
}
.query-builder .rule-container .rule-value-container {
  border-left: 1px solid #ddd;
  padding-left: 5px;
}
.query-builder .rule-container .rule-value-container label {
  margin-bottom: 0;
  font-weight: normal;
}
.query-builder .rule-container .rule-value-container label.block {
  display: block;
}
.query-builder .rule-container select, .query-builder .rule-container input[type=text], .query-builder .rule-container input[type=number] {
  padding: 1px;
}
.query-builder .error-container {
  display: none;
  cursor: help;
  color: #F00;
}
.query-builder .has-error {
  background-color: #FDD;
  border-color: #F99;
}
.query-builder .has-error .error-container {
  display: inline-block !important;
}
.query-builder .rules-list > *:before, .query-builder .rules-list > *:after {
  content: '';
  position: absolute;
  left: -10px;
  width: 10px;
  height: calc(50% + 4px);
  border-color: #CCC;
  border-style: solid;
}
.query-builder .rules-list > *:before {
  top: -4px;
  border-width: 0 0 2px 2px;
}
.query-builder .rules-list > *:after {
  top: 50%;
  border-width: 0 0 0 2px;
}
.query-builder .rules-list > *:first-child:before {
  top: -12px;
  height: calc(50% + 14px);
}
.query-builder .rules-list > *:last-child:before {
  border-radius: 0 0 0 4px;
}
.query-builder .rules-list > *:last-child:after {
  display: none;
}

.query-builder .error-container + .tooltip .tooltip-inner {
  color: #F99 !important;
}

.query-builder p.filter-description {
  margin: 5px 0 0 0;
  background: #D9EDF7;
  border: 1px solid #BCE8F1;
  color: #31708F;
  border-radius: 5px;
  padding: 2.5px 5px;
  font-size: 0.8em;
}

.query-builder .drag-handle {
  cursor: move;
  vertical-align: middle;
  margin-left: 5px;
}
.query-builder .dragged {
  opacity: 0.5;
}
.query-builder .rule-placeholder {
  border: 1px dashed #BBB;
  opacity: 0.7;
}
