//*******************************************************************
//
// Base Input Styles
//
//*******************************************************************

label {
  font: bold 14px/16px $sans-serif;
  margin-bottom: 3px;

  &.required {
    margin-left: -9px;

    abbr {
      border: none;
      color: $pink;
    }
  }
}

input[type="password"],
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"] {
  border: 1px solid rgb(170,170,170);
  border-radius: 3px;
  box-shadow: 0 1px 0 0 rgba(255,255,255, 0.75), inset 0 0 3px 0 rgba(0,0,0, 0.2);
  @include box-sizing(border-box);
  font: normal 12px/14px $sans-serif;
  height: 35px;
  @include linear-gradient(rgb(246,246,246), rgb(253,253,253));
  margin: 0px;
  padding: 5px 8px;
  width: 100%;
}

textarea,
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"] {
  &:focus {
    border-color: $pink;
    box-shadow: inset 0 0 3px 0 rgba(0,0,0, 0.2), 0 0 5px 0 $pink;
    color: rgb(55,55,55);
    @include linear-gradient(rgb(246,246,246), rgb(253,253,253));
    outline: none;
  }
}

input[type="submit"] {
  @include button($pink);
  font: 300 24px $sans-serif;
  margin: 30px 0 10px 0;
  padding: 10px;
  width: 100%;
}

textarea {
  border: 1px solid rgb(170,170,170);
  border-radius: 3px;
  box-shadow: 0 1px 0 0 rgba(255,255,255, 0.75), inset 0 0 3px 0 rgba(0,0,0, 0.2);
  @include box-sizing(border-box);
  color: rgb(55,55,55);
  @include linear-gradient(rgb(246,246,246), rgb(253,253,253));
  font: normal 12px/14px $sans-serif;
  margin: 0px;
  padding: 10px 8px;
  resize: vertical;
  width: 100%;
} 


form {
  span.error {
    color: #D12F19;
    display: inline-block;
  }

  input + span.error {
    padding-top: 0.5em;
  }

  select + span.error {
    padding-left: 0.5em;
  }
}


//*******************************************************************
//
// Shared form styles:
//
//*******************************************************************


section.user-form,
section.project-form,
section.invitation-form,
section.chapter-form,
section.session-form,
section.password-reset-form {
  background: rgb(240,240,240);
  border: 1px solid rgb(200,200,200);
  border-radius: 4px;
  margin-right: 1em;
  margin-left: 1em;
  padding: 2.5em;
  max-width: grid-width(6);
  min-width: grid-width(6);

  h1 {
    border-bottom: 1px solid rgb(200,200,200);
    font: 300 28px $sans-serif;
    margin-bottom: 40px;
    padding-bottom: 10px;
  }

  form {
    margin: 0 auto;
    max-width: grid-width(6);
    width: 100%;
  }

  div.input {
    margin: 0 0 20px 0;
    
    &.half-width {
      max-width: grid-width(3);
      width: 100%;
    }  
  }

  div.chars_left {
    margin-top: -15px;
    margin-bottom: 15px;
    font-size: 0.8em;
  }

  label {
    &.boolean {
      display: inline-block;
    }
  }

  select {
    margin: 0px;
    vertical-align: baseline;
  }

  input.boolean {
    margin-right: 10px;
  }

  .hint {
    font-size: 0.8em;
    line-height: 1.4;
    margin-top: .5em;
    display: block;
    font-style: italic;
  }
}

//*******************************************************************
//
// Shared form styles: Sessions, Password Resets
//
//*******************************************************************

section.session-form,
section.password-reset-form {
  h1 {
    margin-bottom: 10px;
  }

  ul {
    @extend .clearfix;

    li {
      list-style: none;
      float: right;
      margin-left: 10px;

      a {
        font-size: 0.8em;
        color: $lighter-base-font-color;
        text-decoration: none;

        &:hover {
          color: $pink;
          text-decoration: underline;
        }
      }
    }
  }
  
  p {
    font-size: 0.8em;
  }
  
}

/**********************************************/
/*               Responsiveness               */
/**********************************************/

@media (max-width:37.5em) {
  section.user-form,
  section.project-form,
  section.invitation-form,
  section.chapter-form,
  section.session-form,
  section.password-reset-form {
    min-width: 0px;
    
    div.input {    
      &.half-width {
        max-width: none;
      }
    } 
  }
}

@media (max-width:$mobile-standard) {
  section.user-form,
  section.project-form,
  section.invitation-form,
  section.chapter-form,
  section.session-form,
  section.password-reset-form {
    padding: 1.25em;
  }

}

@media (max-width:$mobile-small) {
  section.user-form,
  section.project-form,
  section.invitation-form,
  section.chapter-form,
  section.session-form,
  section.password-reset-form {
    max-width: 250px;
  }
}
