/****************************************************************************
 *                                 Headings                                *
 ****************************************************************************/

.formbar-form h1.page {
  font-size: 30px;
  margin-top: 5px;
}

.formbar-form h2.section {
  font-size: 28px;
}

.formbar-form h3.section {
  font-size: 22px;
  margin-bottom: 5px;
}

.formbar-form h4.section {
  font-size: 18px;
}

.formbar-form fieldset {
  margin-top: 15px;
}

.formbar-form fieldset legend {
  margin-bottom: 10px;
}

.formbar-form fieldset fieldset legend {
  margin-bottom: 7px;
}

.formbar-form fieldset fieldset fieldset legend {
  margin-bottom: 4px;
}

/****************************************************************************
 *                                   Form                                   *
 ****************************************************************************/

button {
  margin-right: 15px;
}

.button-pane {
  margin: 10px 0px;
}

.button-pane div.formbar-conditional {
    width: auto;
    float: left;
}


/****************************************************************************
 *                                  Fields                                  *
 ****************************************************************************/

/************
 *  Labels  *
 ************/

label span.label-content {
  display: block;
}

label.left {
    display: block;
    margin-top: 0.5em;
    margin-right: -20px;
}

label.left.radio {
    padding-left: 0px;
}

label.right {
    display: block;
    margin-top: 0.5em;
    margin-left: -20px;
}
label.top {
    padding: 0;
}
label.checkbox, label.radio {
    margin-top: 0.1em;
    margin-bottom: 0;
}

label span.indent {
  float: left;
}

label span.indent.indent-sm {
  width: 30px;
}

label span.indent.indent-md {
  width: 50px;
}

label span.indent.indent-lg {
  width: 70px;
}

label span.label-content.indent-empty {
  margin-left: 0;
}

label span.label-content.indent-sm {
  margin-left: 36px;
}

label span.label-content.indent-md {
  margin-left: 56px;
}

label span.label-content.indent-lg {
  margin-left: 76px;
}

label span.label-content.indent-empty {
  margin-left: 0;
}

label span.indent-symbol, label span.indent-number {
  font-size: 70%;
  letter-spacing: 1.5px;
  padding-left: 4px;
}

label span.indent-bordered {
  position: static;
  top: -2px;
  border-top: 1px solid;
  border-left: 1px solid;
}

label span.indent-number:not(.indent-borderd) {
  position: static;
  top: -2px;
}

label.control-label.background {
	background-color: #F6F6F6;
}

label.control-label.background span.indent-number:not(.indent-borderd) {
  padding-left: 4px;
}

label sup {
  letter-spacing: 1.5px;
}

/********************
 *  Field elements  *
 ********************/

// Set width for text input fields
.form-group.indent-sm input[type="text"], .form-group.indent-sm textarea {
    width: calc(100% - 36px);
}
.form-group.indent-md input[type="text"], .form-group.indent-md textarea {
    width: calc(100% - 56px);
}
.form-group.indent-lg input[type="text"], .form-group.indent-lg textarea {
    width: calc(100% - 76px);
}

.formbar-conditional.active {
    opacity: 1.0;
    transition: 1s;
}

.formbar-conditional.inactive {
    opacity: 0.6;
    transition: 1s;
}

.form-group.inactive input {
    cursor: not-allowed;
}

div.radiomatrix:hover {
    background-color: #f5f5f5;
}

.radiomatrixlabel {
  font-size: smaller;
}

.formbar-form textarea {
  height: auto !important;
}

select[multiple], textarea {
  /* Reset heigt of the field elements which have been modified by the
   * border-box modell */
  height: auto !important;
}

div.readonlyfield {
  border-radius: 3px 3px 3px 3px;
  background-color: #e0e0e0;
  padding: 8px;
  margin-bottom: 10px;
  min-height: 14px;
}

/***************
 *  Helptexts  *
 ***************/

.text-generic {
  padding: 0.5em;
}

.text-help {
  position: relative;
  top: 3px;
  font-size: 0.8em;
  color: #707070;
}

.text-error, .help-block {
  position: relative;
  font-size: 0.8em;
  margin-bottom: 0px;
}

.tooltip{
  font-size: 0.9em;
  font-weight: 200;
}

.tooltip-inner{
  max-width:600px;
}

// Give info sign another color to show that it is an independent function
.glyphicon-info-sign{
  color: #707070;
}

/****************************************************************************
 *                              Outline/Affix                               *
 ****************************************************************************/

.formbar-outline {
  margin-top: 10px;
}

.formbar-page {
  display: none;
}

.active {
  display: block;
}

// Media depended affix CSS.
@media(max-width:767px){
  .formbar-outline.affix {
    position: static;
    width: 100%;
    top: 0;
    z-index:10;
  }
}

@media(min-width:768px){
  .formbar-outline.affix {
    position: fixed;
    top: 0;
    z-index:10;
    width: 157.5px;
  }
}
@media(min-width:992px){
  .formbar-outline.affix {
    width: 212.5px;
  }
}
@media(min-width:1200px){
  .formbar-outline.affix {
    width: 262.5px;
  }
}

a.list-group-item.selected {
    background-color: #f5f5f5 !important;
}

.affix{
    position: static;
}

/****************************************************************************
 *                                   Misc                                   *
 ****************************************************************************/

.formbar-form table td {
  vertical-align: middle;
}

.formbar-form table td input {
  margin-bottom: 0px;
}

.formbar-form table td div.readonlyfield {
  margin-bottom: 0px;
}

// used for the formbar editor
.formbar-preview-window {
    margin-top: 5px;
    padding: 5px;
    background-color: #ffd9d9;
}

.formbar-new-value {
    background: #edff76;
}

.formbar-del-value {
    text-decoration: line-through;
}

/* Bootstrap overwrites */
.formbar-conditional .list-group-item {
    border-top-width: 1px !important;
}

label.checkbox-header {
    margin-top: 12px;
    margin-bottom: 0px;
}

/*****************************************************************************
*                                  Fileupload                                *
*****************************************************************************/

#file-container {
    width:100%;
    display:-webkit-flex;
    display:flex;
}

#file-upload {
    width:50%;
}

#file-preview {
    border: dashed 1px;
    border-color: gray;
    width:50%;
    margin-left: 5px;
}

#file-preview p {
    padding: 5px;
}
