/* Style rules for Api4 Explorer */

#bootstrap-theme.api4-explorer-page .panel-heading {
  height: 50px;
}
#bootstrap-theme.api4-explorer-page .panel-body {
  min-height: calc( 100% - 50px);
}
#bootstrap-theme.api4-explorer-page .explorer-params-panel .panel-heading {
  padding-top: 12px;
}
#bootstrap-theme.api4-explorer-page .explorer-params-panel .panel-heading button {
  position: relative;
  top: -5px;
}
#bootstrap-theme .explorer-params-panel .panel-heading .form-inline > .select2-container {
  max-width: 25% !important;
}
#bootstrap-theme .api4-explorer-row > .panel {
  margin: 10px;
  min-height: 500px;
}
/* Fix weird shorditch style */
#bootstrap-theme.api4-explorer-page .api4-explorer-row .panel .panel-heading {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  margin-bottom: 0;
}
#bootstrap-theme .panel-heading li > a {
  background-color: #f1f1f18c;
}
#bootstrap-theme.api4-explorer-page .explorer-code-panel pre {
  min-height: 3.3em;
  word-break: break-all;
  white-space: pre-wrap;
}
#bootstrap-theme.api4-explorer-page .explorer-code-panel .panel-heading>.nav li a {
  text-transform: uppercase;
}

#bootstrap-theme.api4-explorer-page .explorer-params-panel > .panel-body > div.api4-input {
  margin-bottom: 10px;
}

#bootstrap-theme.api4-explorer-page .explorer-help-panel .panel-body {
  word-break: break-word;
}

/* because each help p is in a div, this undoes bootstrap removing margin from last-child */
#bootstrap-theme.api4-explorer-page .explorer-help-panel .panel-body p {
  margin-bottom: 10px;
}

#bootstrap-theme.api4-explorer-page form label {
  text-transform: capitalize;
}

#bootstrap-theme.api4-explorer-page fieldset {
  padding: 6px;
  border: 1px solid lightgrey;
  margin-bottom: 10px;
  position: relative;
}

#bootstrap-theme.api4-explorer-page fieldset legend {
  font-size: 13px;
  margin: 0;
  width: auto;
  border: 0 none;
  padding: 2px 5px;
  text-transform: capitalize;
}
#bootstrap-theme.api4-explorer-page crm-api4-clause > .btn-group {
  position: absolute;
  right: 0;
  top: 0;
}
#bootstrap-theme.api4-explorer-page crm-api4-clause > .btn-group .btn {
  border: 0 none;
}

#bootstrap-theme.api4-explorer-page fieldset div.api4-input {
  margin-bottom: 10px;
}

#bootstrap-theme.api4-explorer-page fieldset div.api4-input.ui-sortable-helper {
  background-color: rgba(255, 255, 255, .9);
}

#bootstrap-theme.api4-explorer-page fieldset div.api4-input.ui-sortable-helper {
  background-color: rgba(255, 255, 255, .9);
}

#bootstrap-theme.api4-explorer-page .api4-clause-fieldset fieldset {
  float: right;
  width: calc(100% - 58px);
  margin-top: -8px;
}

#bootstrap-theme.api4-explorer-page .api4-clause-fieldset.api4-sorting fieldset .api4-clause-group-sortable {
  min-height: 3.5em;
}

#bootstrap-theme.api4-explorer-page .api4-input-group {
  display: inline-block;
}

#bootstrap-theme.api4-explorer-page i.fa-arrows {
  cursor: move;
}

#bootstrap-theme.api4-explorer-page .api4-clause-badge {
  width: 55px;
  display: inline-block;
  cursor: move;
}
#bootstrap-theme.api4-explorer-page .api4-clause-badge .badge {
  opacity: .5;
  position: relative;
}
#bootstrap-theme.api4-explorer-page .api4-clause-badge .caret {
  margin: 0;
}
#bootstrap-theme.api4-explorer-page .api4-clause-badge .crm-i {
  display: none;
  padding: 0 6px;
}
#bootstrap-theme.api4-explorer-page .ui-sortable-helper .api4-clause-badge .badge span {
  display: none;
}
#bootstrap-theme.api4-explorer-page .ui-sortable-helper .api4-clause-badge .crm-i {
  display: inline-block;
}

#bootstrap-theme.api4-explorer-page .api4-operator,
#bootstrap-theme.api4-explorer-page .api4-sets-action,
#bootstrap-theme.api4-explorer-page .api4-sets-type,
#bootstrap-theme.api4-explorer-page .api4-chain-index,
#bootstrap-theme.api4-explorer-page .api4-chain-action {
  width: 90px;
}
#bootstrap-theme.api4-explorer-page .api4-sets-params,
#bootstrap-theme.api4-explorer-page .api4-chain-params {
  width: calc(100% - 390px);
}

#bootstrap-theme.api4-explorer-page .api4-add-where-group-menu {
  min-width: 80px;
  background-color: rgba(186, 225, 251, 0.94);
}
#bootstrap-theme.api4-explorer-page .api4-add-where-group-menu a {
  padding: 5px 10px;
}

#bootstrap-theme.api4-explorer-page .form-control.huge {
  width: 25em;
}

#bootstrap-theme.api4-explorer-page .form-control.twenty {
  width: 20em;
}

#bootstrap-theme.api4-explorer-page .form-control.api4-index {
  width: 8em;
}

/* Another weird shoreditch fix */
#bootstrap-theme .form-inline div.checkbox {
  margin-right: 1em;
}
#bootstrap-theme .form-inline div.checkbox label input[type=checkbox] {
  margin: 0;
}

/**
 * Shims so the UI isn't completely broken when a Bootstrap theme is not installed
 */
#bootstrap-theme.api4-explorer-page * {
  box-sizing: border-box;
}
.api4-explorer-page.panel {
  border: 1px solid grey;
  background-color: white;
}
.api4-explorer-page.panel-heading {
  padding: 10px 20px;
  color: #464354;
  background-color: #f3f6f7;
}
