.pink-button {
  margin: 0;
  border: 0;
  color: white;
  display: inline-block;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  font-weight: bold;
  @include cachet();
  border-radius: 3px;
  line-height: 1.33;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  &:hover {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    border: 0;
    background-position: 0;
  }
}

input, textarea {
  &.error {
    border: 1px solid red !important;
  }
}

#edit-preview {
  display: none;
}

.form-wrapper {
  margin-bottom: 25px;
  margin-top: 25px;
}

.field--type-list-integer {
  legend {
    border: none;
    margin: 0;
    padding: 7px 0;
  }

  .fieldset-legend {
    color: #000000;
    text-transform: none;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
  }

  label {
    font-weight: normal;
  }

  input {
    margin-right: 10px
  }

  .form-item {
    margin: 0 0 7px;
  }
}

.form-tel.error {
  border-color: $red-dark;
}

.form-control {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #636466;
  vertical-align: middle;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) 0 0 #000;
  -o-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) 0 0 #000;
  -ms-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) 0 0 #000;
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) 0 0 #000;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) 0 0 #000;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  -moz-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  -ms-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

[data-drupal-selector="edit-login"] {
  float: left;
  margin-bottom: 0 !important;
}

[data-drupal-selector="edit-cancel"],
[data-drupal-selector="edit-submit"],
[data-drupal-selector="edit-login"],
[data-drupal-selector="edit-registration"] {
  @extend .pink-button;
  padding: 13px 25px;
  font-size: 16px !important;
  margin-bottom: 20px;
  text-transform: capitalize;
}

[data-drupal-selector="edit-login-actions"] {
  margin-top: 20px !important;
}

[data-drupal-selector="edit-reset-password"] {
  background: none !important;
  border: none;
  font-size: 16px !important;
  box-shadow: none;
  text-transform: inherit;
  font-weight: normal;
  color: #0089d0 !important;
  padding: 0;
  margin-top: 12px;
  margin-left: 10px;
  float: left;
  &:hover {
    text-decoration: underline;
  }
}

label {
  @include cachet();
}

.fieldset-legend {
  @include cachet();
  color: $purple;
  font-weight: bold;
  text-transform: uppercase;
}

.status-message {
  position: relative;
  z-index: 100;
  margin-bottom: 30px;
  li {
    list-style-type: none;
  }
  .path-node &,
  .path-frontpage &,
  .node--type-program-subcategory & {
    margin-bottom: 0;
  }
  p, ul {
    padding: 15px;
    border-radius: 4px;
    font-weight: normal;
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
    em {
      color: $blue !important;
    }
  }
  .status-message__alert {
    p, ul {
      color: #a94442;
      background-color: #f2dede;
      border: 1px solid #ebccd1;
      @include cachet();
    }
  }
  .path-account & {
    @extend .container;
    margin: 30px auto 0 !important;
    max-width: 100%;
    @media (min-width: 768px) {
      width: 750px;
    }
    @media (min-width: 992px) {
      width: 970px;
    }
    @media (min-width: 1200px) {
      width: 1170px;
    }
  }

}

#ajax-ccc-account-login-form {
  [data-drupal-selector="edit-login"] {
    padding: 13px 25px;
    font-size: 16px !important;
    line-height: normal;
  }
  .edit-login-actions {
    padding-bottom: 30px;
    margin-bottom: 0;
  }

}

.openy-ccc-login-form,
.openy-ccc-registration-form {
  @include cachet();
}

#edit-intro-text {
  font-size: 16px;
  line-height: 1.6em;
  color: #636466;
  @include cachet();
  font-weight: 400;
  font-style: normal;
  margin-bottom: .7em;
}

.branch {
  @include clearfix;
  .form-item {
    width: 50%;
    float: left;
    @include breakpoint(0 $mobile-landscape) {
      width: 100%;
      float: none;
    }
  }
}

.edit-login-actions,
.edit-registration-actions {
  position: relative;
  a {
    float: left;
    margin-right: 4px;
  }
  @include breakpoint(0 $mobile-landscape) {
    width: 100%;
    float: none;
  }
  .ajax-progress {
    left: 215px;
    top: 15px;
    margin-top: -4px !important;
  }
}

.edit-registration-actions {
  margin-bottom: 30px !important;
  .fieldset-wrapper {
    border-top: 1px solid #ccc;
    padding-top: 20px;
    a.btn {
      margin-right: 3px !important;
      @extend .pink-button;
      padding: 13px 25px !important;
      background-color: black !important;
      font-size: 16px !important;
      margin-bottom: 10px;
      text-transform: capitalize;
      &:hover {
        color: white !important;
      }
    }
  }
}

legend {
  border-bottom: none;
  margin-bottom: 0;
}

//Register form

.openy-ccc-registration-form {
  @include clearfix;
  .fieldset-wrapper {
    @include clearfix;
    margin: 0 -10px;
  }
  [data-drupal-selector="edit-branch"] {
    width: 100% !important;
    .fieldset-wrapper {
      legend {
        display: none;
      }
    }
  }
}

[data-drupal-selector="edit-actions"] {
  position: relative;
  .ajax-progress {
    left: 164px !important;
    top: 0;
    margin-top: -4px !important;
  }
}

[data-drupal-selector="edit-branch"],
[data-drupal-selector="edit-emergency-info"] {
  .fieldset-wrapper {
    @include clearfix;
    margin: 0;
  }
}

[data-drupal-selector="edit-personal-info"] {
  .form-item {
    padding-left: 10px;
    padding-right: 10px;
    width: 33.33333333%;
    float: left;
    &.form-item-address {
      width: 66.66666667%;
    }
  }
}

[data-drupal-selector="edit-birth-info"] {
  .form-item {
    padding-left: 10px;
    padding-right: 10px;
    width: 25%;
    float: left;
  }
}

[data-drupal-selector="edit-parent-information"],
[data-drupal-selector="edit-contact-info"] {
  .form-item {
    padding-left: 10px;
    padding-right: 10px;
    width: 50%;
    float: left;
    @include breakpoint (0 767px) {
      width: 100%;
      float: none;
    }

  }
}

[data-drupal-selector="edit-passwords"] {
  div.password-confirm,
  .password-strength,
  .password-suggestions {
    display: none !important;
  }
  .form-item {
    margin-bottom: 0;
    .form-item {
      padding-left: 10px;
      padding-right: 10px;
      width: 50%;
      float: left;
      @include breakpoint (0 767px) {
        width: 100%;
        float: none;
      }
    }
  }
}

[data-drupal-selector="edit-parent-information"] {
  .fieldset-wrapper {
    margin: 0 -10px !important;
  }
}

[data-drupal-selector="edit-emergency-info"] {
  fieldset {
    margin-top: 0;
    .form-item {
      padding-left: 10px;
      padding-right: 10px;
      width: 50%;
      float: left;
    }
  }
}

[data-drupal-selector="edit-emergency-contact"] {
  .fieldset-wrapper {
    margin: 0 -10px;
    .form-item {
      width: 100%;
    }
  }
}

.openy-ccc-remind-password {
  .status-message {
    clear: both;
  }
}

.contact-form {
  legend {
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: 700;
    color: #636466;
    font-size: 14px;
    span {
      color: #636466;
      text-transform: capitalize;
    }
  }
  [data-drupal-selector="edit-name"] {
    margin-top: 0;
    margin-bottom: 5px;
    @include clearfix;
    .form-item {
      width: 50%;
      float: left;
      &:first-child {
        padding-right: 10px;
      }
      &:last-child {
        padding-left: 10px;
      }
      label {
        display: none;
      }
      .description {
        color: #898a8c;
        font-size: 13px;
        font-weight: bold;
        margin-top: 2px;
      }
    }
  }
}

.form-actions {
  margin: 0;
}

.form-item {
  margin: 0 0 15px 0;
}

.openy-schedules-search-form {
  .form-wrapper {
    margin-top: 0;
  }
}

.calc-block-form {

  .membership-details {
    display: none;
  }

  .checkout-info {
    width: 100%;
    border: none;
    box-shadow: none;
  }
  table {
    color: #636466;
    th, td {
      color: #636466 !important;
    }
  }
  .calc-checkout-col {
    .form-item {
      text-align: left;
      color: #636466 !important;
      &.form-item-coupon-code {
        label {
          margin-left: 5px;
        }
      }
      &.form-item-agreement {
        text-align: left;
        label {
          white-space: pre-wrap;
        }
      }
    }
  }

  .ajax-progress {
    position: static;
    margin-top: 30px;
  }
  .complete-registration {
    text-transform: uppercase;
    color: white;
  }
  .field-mbrshp-description {
    min-height: 50px;
  }
  .js-webform-radios {
    .js-form-type-membership-subtype-radio {
      margin: 0 0 20px 0 !important;

      input {
        display: inline-block;
        width: 5%;
        vertical-align: top;
        margin-top: 13px;
      }
      .form-element-wrapper {
        display: inline-block !important;
        width: 90% !important;
        h4 {
          margin-bottom: 0;
        }
        .price-month {
          margin: 0;
        }
      }
    }
  }
  [data-drupal-selector="edit-location"] {
    .form-item-location {
      margin-bottom: 0px;
      line-height: 2;
    }
  }
}

#membership-calc-wrapper {
  .selected-membership {
    .form-radio {
      display: inline-block;
      vertical-align: top;
      margin-top: 11px;
      margin-right: 5px;
    }
    .form-element-wrapper {
      display: inline-block;
      width: 90%;
    }
    .js-webform-radios .js-form-item {
      @include breakpoint (0 $tablet) {
        margin: 0 20px 10px 20px;
      }

      label {
        padding-bottom: 20px;
      }
    }
  }
}

.webform-button--submit {
  padding: 13px 25px;
  font-size: 16px !important;
  border-radius: 3px;
  @include cachet();
  font-weight: bold;
  text-transform: capitalize;
}

.webform-submission-form {
  margin: 30px 0;

  fieldset {
    .fieldset-wrapper .fieldgroup {
      margin: 0;
      label {
        display: none;
      }
    }
  }

  #edit-name--wrapper {
    #edit-name--wrapper {
      > div {
        float: left;
        width: 49%;
        &:first-child {
          margin-right: 2%;
        }
      }
    }
  }
  #edit-address--wrapper {
    #edit-address--wrapper {
      .form-item-address-country,
      .form-item-address-city,
      .form-item-address-state-province,
      .form-item-address-postal-code {
        float: left;
        width: 49%;
      }
      .form-item-address-city,
      .form-item-address-postal-code {
        margin-right: 2%;
      }
    }
  }
  #edit-date-of-birth {
    > div {
      width: 32%;
      float: left;
      &:nth-of-type(2) {
        margin: 0 2%;
      }
    }
  }
  [data-drupal-selector="edit-attach-resume-upload"],
  [data-drupal-selector="edit-attach-application-upload"] {
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    padding: 6px 12px;
    font-size: 14px;
    margin-bottom: 5px;
  }
}

// Popup form items

.branch-popup .ui-dialog-content .form-item-branch {
  @include breakpoint (0 $tablet) {
    width: 100%;
  }
}

// Schedules form items

#schedules-search-form-wrapper {
  .js-form-type-select.form-item-time {
    margin-right: 15px;
  }
  .js-form-type-checkbox {
    margin-top: 35px;
  }
  .form-item-display input {
    display: inline-block;
  }
  @include breakpoint (0 $desktop) {
    .js-form-type-select {
      width: 125px !important;
    }
  }
  @include breakpoint (0 $tablet-start) {
    .js-form-type-select {
      width: 110px !important;
    }
  }
  @include breakpoint (0 $tablet) {
    .js-form-item {
      width: 100% !important;
    }
    .filters-container .container {
      padding: 0;
    }
  }
  .js-form-item-date {
    @include breakpoint (0 $tablet-start) {
      clear: left;
    }
  }
  .form-item.js-form-item-display {
    @include breakpoint ($tablet $tablet-start) {
      clear: none;
      float: left;
      margin-top: 46px;
    }
  }
}

.captcha {
  margin-left: 0;
}

// Password reset form

[data-drupal-selector="openy-ccc-reset-password-form"] {
  [data-drupal-selector="edit-birth-info"] {
    margin-top: 15px;
    .fieldset-wrapper {
      margin: 10px -10px;
    }
  }
}

#ajax-ccc-account-remind-password-form {
  .openy-ccc-remind-password {
    [data-drupal-selector="edit-actions"] {
      .ajax-progress {
        left: 205px !important;
        top: 14px !important;
      }
    }
  }
}

.openy-ccc-add-program-to-cart-continue-form {
  padding-top: 10px;
}

#ajax-ccc-account-cart-checkout-form {
  [data-drupal-selector="edit-submit"] {
    &.form-disabled {
      background-color: #9c1f7b;
      &:hover {
        background-color: #9c1f7b;
      }
    }
  }
}

// Contact

.webform-submission-contact-add-form {
  .form-item {
    &.js-form-item-name {
      padding: 0 15px 0 0;
      float: left;
      width: 50%;
      label {
        display: block;
      }
    }

    &.js-form-item-email {
      padding: 0 0 0 15px;
      float: left;
      width: 50%;
      label {
        display: block;
      }
    }
    &.js-form-item-subject {
     clear: left;
    }
    &.form-item-area-of-interest,
    &.form-item-branch,
    &.form-item-phone {
      float: left;
      width: 50%;
    }
    @include breakpoint (0 $tablet) {
      width: 100% !important;
      padding: 0 !important;
    }
  }
}

// Use CSS/SVG image for required mark.
// @see https://www.drupal.org/node/2152217
// @see https://www.drupal.org/node/2274631
.form-required:after {
  background-image: url(../img/required.svg);
  background-size: 10px 7px;
  content:"";
  display: inline-block;
  line-height:1;
  height: 7px;
  width: 10px;
  vertical-align: text-top;
}
