/* =Forms
-------------------------------------------------------------- */

/* =Contacts form styling
-------------------------------------------------------------- */

tr.contacts-error {
  background: $alert-warning-bg;
  li {
    padding: 0;
  }
  +tr td {
    border-top: none;
    padding-top: 0;
    background: $alert-warning-bg;
  }
}

/* =Party selection widget
-------------------------------------------------------------- */

#select-party {
  #add-party {
    padding: 6px 18px;
    .glyphicon {
      opacity: 0.5;
      padding-right: 8px;
    }
  }
}

.select2-container {
  color: $input-color;
  .party-type {
    font-size: 12px;
    opacity: 0.8;
  }
}

/* =Project translation select dropdown
-------------------------------------------------------------- */

.langs-select {
  overflow: hidden;
  height: 34px;
  position: relative;
  margin-right: 30px;
  margin-bottom: 0;
  select {
    color: #fff;
    padding: 4px;
    padding-right: 25px;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: unset;
    -webkit-box-shadow: unset;
    @media (max-width: $screen-sm-max) {
      font-size: 11px;
    }
    > option {
      background: #fff;
      padding: 6px;
      color: $gray-dark;
    }
  }
  &:after {
    font-family: 'Glyphicons Halflings';
    font-size: 9px;
    content:"\e252";
    color: #fff;
    padding: 12px 8px;
    position: absolute;
    right: 10px;
    top: 0;
    z-index: 1;
    text-align: center;
    width: 10%;
    height: 100%;
    pointer-events: none;
    box-sizing: border-box;
  }
}

/* =Required field label
-------------------------------------------------------------- */

label.required:after { // show asterisk
  content: "*";
  color: $brand-danger;
  font-style: normal;
  padding: 0 3px;
}

/* =Parsley client-side validation
-------------------------------------------------------------- */

.form-group.has-error {
  background-color: $alert-warning-bg;
  padding: 10px;
}

.has-success input,
.has-success select,
.has-success textarea {
  background: url('/static/img/checkmark.png') calc(100% - 8px) 50% no-repeat;
  padding-right: 36px;
}

.has-error input,
.has-error select,
.has-error textarea {
  border: 1px solid $brand-danger;
  background: #fff url('/static/img/cross.png')  calc(100% - 8px) 50% no-repeat;
  padding-right: 36px;
}

.input-group-btn:last-child > .btn {
  background: $btn-default-bg;
  border: 1px solid $input-border;
}

.has-error .input-group-btn .btn,
.has-warning .input-group-btn .btn {
  color: $state-danger-text;
  border-color: $state-danger-text;
  background-color: $state-danger-bg;
}

.has-success select,
.has-error select {
  background-position: calc(100% - 20px) 50%;
}

.has-error #select2-party-select-container { // select party
  background: #fff url('/static/img/cross.png')  right 50% no-repeat;
  padding-right: 36px;
}

.parsley-errors-list {
  opacity: 0;
  transition: all .3s ease-in;
  -o-transition: all .3s ease-in;
  -moz-transition: all .3s ease-in;
  -webkit-transition: all .3s ease-in;
}

.parsley-errors-list.filled {
  opacity: 1;
}

.parsley-errors-list, .errorlist {
  margin: 2px 0 3px;
  padding: 0;
}

ul.parsley-errors-list, ul.errorlist {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none !important;
  li {
    background-color: $alert-warning-bg;
    color: $alert-danger-text;
    padding: 2px 8px;
    display: list-item;
    list-style-type: disc;
    list-style-position: inside;
  }
}

.well ul.parsley-errors-list li, .well ul.errorlist li {
  background-color: transparent
}


/* =Exceptions
-------------------------------------------------------------- */

textarea.form-control {
  max-height: 80px;
}

.file-well {
  padding: 10px 0 10px 10px;
  word-break: break-all;
}

.s3-buckets {
  width: 94%;
  max-width: 94%;
}

.file-input, #id_select_file-file { // browse for file
  margin: 14px 0;
  height: 34px;
  padding: 0;
  cursor: pointer;
  max-width: 100%;
}

.file-remove {
  white-space: nowrap;
}

.spacing-lg { // for radio or checkboxes needing more space between items
  margin-top: 10px;
  li {
    margin-left: 30px;
    margin-bottom: 24px;
    label {
      font-weight: 600;
    }
    small {
      margin-top: 8px;
      font-weight: 300;
      display: block;
    }
  }
}

.spacing-md {
  margin-top: 15px;
  li {
    margin-left: 15px;
    margin-bottom: 15px;
    label {
      font-size: 16px;
      font-weight: 600;
    }
    small {
      margin-top: 6px;
      font-weight: 300;
      display: block;
    }
  }
}

.input-group-addon {
  background: $body-bg;
}
