form,
.form {

  &.blue {
    background: #e5f5fa;
    padding: 40px;

    @include tablet {
      padding: 20px;
    }

    @include mobile {
      padding: 15px;
    }
  }

  .form-group {
    display: table;
    width: 100%;
    margin-bottom: 20px;

    @include tablet {
      margin-bottom: 15px;
    }

    @include mobile {
      clear: both;
      margin-bottom: 10px;
    }

    .form-control {
      @include font-size(18px);

      @include mobile {
        @include font-size-mobile(16px);
      }
    }

    label {
      float: left;
      margin-bottom: 0px;
      padding: 0px;

      @include mobile {
        line-height: 19px;
      }
    }

    button {
      margin-top: 10px;
    }

    button,
    input,
    .select {
      min-width: 240px;
      max-width: 300px;
      clear: both;
      display: block;
      float: left;

      @include tablet {
        width: 100%;
      }
    }

    .form-type-radio,
    .form-type-checkbox,
    .radio,
    .checkbox {
      margin: 10px 20px 10px 0;

      @include mobile {
        margin: 5px 10px 5px 0;
      }

      label {
        line-height: 25px;

        @include mobile {
          line-height: 12px;
        }
      }
    }

    .error-summary {
      display: none;
    }

    .error {
      color: color('form', 'error');
      border-color: color('form', 'error');
      clear: both;

      &:focus {
        color: initial;
      }

      label span {
        color: color('form', 'error');
      }

      input {
        border-color: color('form', 'error');
      }
    }
  }

  .error {
    color: color('form', 'error');
  }

  .error-general {
    color: color('form', 'error');
    display:none;
  }

  .field-message {
    float: right;
    @include font-size(14px);
  }

  .form-caption {
    margin-bottom: 30px;
  }

}

label {
  color: color('form', 'label');
  @include font-size(18px);
  line-height: (32/18);
  padding-right: 10px;
  font-weight: normal;

  @include mobile {
    @include font-size-mobile(16px);
  }

  &.required {
    &:after {
      content: '*';
      color: #ff0000;
      @include font-size(18px);
      padding-left: 2px;
    }
  }

  &.error {
    margin-top: 5px;
  }
}

input,
textarea {
  border: none;
  box-shadow: none;
  -webkit-appearance: none;
  resize: vertical;
}

legend {
  border: none;
  @include font-size(18px);
  font-weight: bold;
  margin-bottom: 10px;
}


input[type='text'],
input[type='email'],
input[type='number'],
input[type='search'],
input[type='password'],
input[type='date']{
  height: 50px;
  line-height: 1.5em;
  border-radius: 0;
  padding: 5px 10px;
  border: 1px solid color('form', 'border');
  @include font-size(16px);

  @include mobile {
    height: 30px;
    padding: 5px 10px;
  }

  &.error {
    border-color: #ff0000;

    &:focus {
      box-shadow: none;
      border-color: color('form', 'border');
    }
  }
}

input[type='date'] {
  &::-webkit-calendar-picker-indicator{
    display: none;
  }

  ::-webkit-input-placeholder{
    visibility: hidden !important;
  }
}

textarea {
  border: 1px solid color('form', 'border');
  border-radius: 0;
  resize: none;
  padding: 8px;
}

.date {

  position: relative;

  input {
    padding-right: 40px;
  }

  .input-group-addon {
    background: white;
    height: 50px;
    border: none;
    line-height: 50px;
    padding: 0px;
    position: absolute;
    right: 30px;
    top: 0px;

    @include mobile {
      height: 28px;
      line-height: 30px;
    }

    i {
      color: #009ed7;
      @include font-size(18px);
    }
  }
}

.datepicker > div {
  display: block;
}

.form-select,
.select {
  display: inline-block;
  width: auto;
  background: white;
  margin: 0px !important;


  ul {
    position: absolute;
    border-top: 0;
    min-width: 50px;
    background-color: white;
    width: 100%;

  }

  li {
    position: relative;

    &:before {
      display: none;
    }

    span {
      width: 100%;
      height: 50px;
      line-height: 50px;
      color: color('form', 'label');
      border: 1px solid color('form', 'border');
      @include box-shadow(0px,1px,1px,#cccccc);
      padding: 0px 20px;
      display: block;
      left: 0;
      margin: 0;
      top: 0;
      cursor: pointer;
      @include font-size(16px);
      color: #333333;
      text-align: left;

      @include mobile {
        @include font-size-mobile(16px);
        height: 30px;
        line-height: 30px;
        padding: 0px 10px;
      }

    }

    ul {

      border: solid 1px color('form', 'border');
      border-top: none;
      margin: 0px;

      span {
        border-top: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        border: none;
        box-shadow: none;
      }

      li {
        &:hover {
          background-color: color('form', 'hover');
        }
      }

    }

    i {
       float: right;
       padding-left: 10px;
       @include font-size(18px);
       color: #009ed7;

       @include mobile {
         @include font-size-mobile(16px);
       }
    }

  }

}

.form-type-radio,
.radio {

  margin: 10px 20px 10px 0;
  display: inline-block;

  .trans-element-radio {
    border: solid 1px #b0b0b0;
    width: 25px;
    height: 25px;
    line-height: 25px;
    border-radius: 100%;
    display: inline-block;
    float: left;
    vertical-align: middle;
    margin-right: 10px;
    cursor: pointer;
    text-align: center;
    @include font-size(18px);
    color: #009ed7;
    background: white;

    @include mobile {
      width: 12px;
      height: 12px;
      line-height: 12px;
    }

    &.checked {
      &:before {
        content: ' ';
        width: 13px;
        height: 13px;
        display: inline-block;
        background: #009ed7;
        border-radius: 100%;
        top: 6px;
        left: 6px;

        @include mobile {
          width: 6px;
          height: 6px;
          top: 3px;
          left: 3px;
        }
      }
    }
  }

  label {
    min-height: 12px;
    padding-left: 10px;
    line-height: 25px;

    @include mobile {
      line-height: 12px;
    }
  }
}

.form-type-checkbox,
.checkbox {

  margin: 10px 20px 10px 0;
  display: inline-block;

  &:before {
    content: '';
    border: solid 1px #b0b0b0;
    background: white;
    width: 25px;
    height: 25px;
    line-height: 25px;
    display: inline-block;
    float: left;
    vertical-align: middle;
    margin-right: 10px;
    cursor: pointer;
    text-align: center;
    @include font-size(18px);
    color: #009ed7;

    @include mobile {
      width: 12px;
      height: 12px;
      line-height: 12px;
      @include font-size-mobile(9px);
    }

  }

  &.checked {
    &:before {
      font-family: 'ionicons';
      content: '\f122';
    }
  }

  label {
    min-height: 12px;
    line-height: 25px;

    @include mobile {
      line-height: 12px;
    }
  }
}

.form-radios,
.form-checkboxes {
  clear: both;
}

#contact-form {

  input.error {
    border-color: color('form', 'error');
  }
}

.form .form-group {

  .webform-datepicker {
    input[type=image]{
      width: 40px;
      height: 40px;
      min-width: 40px;
      min-height: 40px;
      float:left;
      display: inline;
      clear: none;
      margin: 5px;
    }

    .form-item-submitted-date-day {
      clear: both;
    }

    .form-item-submitted-date-day,
    .form-item-submitted-date-month,
    .form-item-submitted-date-year {
      float: left;

      .select {
        min-width: 60px;
      }
    }
  }
}
