#membership-calc-wrapper {
  legend {
    border: none;
    color: inherit;
    font-size: 36px;
    margin-bottom: 30px;
  }
  .register-form-loader {
    margin-right: 3px !important;
    padding: 13px 25px !important;
    background-color: black !important;
    font-size: 16px !important;
    margin-bottom: 10px;
    text-transform: capitalize;
    line-height: normal;
    border-radius: 3px;
  }
  [data-drupal-selector="edit-reset-password"] {
    line-height: normal;
    font-weight: normal;
    margin-top: 4px;
  }
  [data-drupal-selector="edit-cancel"],
  [data-drupal-selector="edit-submit"] {
    line-height: 1.33;
    padding: 13px 25px;
  }
  .js-webform-radios {
    .js-form-item {
      padding: 0;
      margin: 0 0 10px 30px;
      label {
        font-weight: bold;
        display: inline-block;
        margin-top: 6px;
      }
    }
  }
  .membership-calc-embedded > legend {
    display: none;
  }
  .membership-calc-embedded legend {
    margin-bottom: 0;
    font-size: 21px;
  }
  .ymcali-ccc-registration-form {
    legend {
      margin-bottom: 0;
      margin-left: 10px;
      .fieldset-legend {
        font-size: 21px !important;
      }
    }
    [data-drupal-selector="edit-submit"],
    .captcha {
      margin-left: 10px;
    }
    [data-drupal-selector="edit-emergency-contact"] {
      .form-item-emergency-contact-name {
        padding-left: 0 !important;
      }
    }
    .js-form-item-emergency-phone {
      padding: 0 10px;
    }
    [data-drupal-selector="edit-parent-information"] {
      .form-item-parent-first-name {
        padding-left: 0 !important;
      }
    }
  }
  [data-drupal-selector="edit-emergency-info"] fieldset .form-item {
    padding-left: 10px !important;
    padding-right: 10px !important;
    width: 47%;
    float: left;
    margin: 0 0 0 20px !important;
    label {
      margin-top: 0;
    }
  }
  #ajax-ccc-add-family-member-form [data-drupal-selector="edit-emergency-info"] fieldset .form-item {
    margin: 0 0 0 0 !important;
  }
  #ajax-ccc-add-family-member-form [data-drupal-selector="edit-emergency-info"] fieldset .form-item-age-group {
    padding-left: 20px !important;
  }
  [data-drupal-selector="edit-add-member"] > .fieldset-wrapper {
    margin: 0 -15px;
  }
  .add-member-message {
    padding: 0 15px;
  }
  @media (max-width: 1199px) {
    .webform-options-display-four-columns .form-checkboxes {
      column-count: 2;
    }
  }
  @media (max-width: 991px) {
    .webform-options-display-four-columns .form-checkboxes {
      column-count: 2;
    }
  }
  @media (max-width: 767px) {
    .webform-options-display-four-columns .form-checkboxes {
      column-count: 1;
    }
    .openy-ccc-add-family-member-form {
      td {
        font-size: 12px;
        word-break: break-all;
      }
    }

  }
  @media (min-width: 768px) {
    [data-drupal-selector="edit-draft-form"] {
      .form-item-first-name {
        width: 49%;
        float: left;
      }
      .form-item-last-name {
        width: 48%;
        margin-left: 2%;
        display: inline-block;
      }
      .form-item-card-number {
        width: 49%;
        float: left;
      }
      .form-item-exp-month {
        width: 16%;
        display: inline-block;
        margin-left: 2%;
      }
      .form-item-exp-year {
        width: 17%;
        margin-left: 1%;
        display: inline-block;
      }
      .form-item-security-code {
        width: 12%;
        float: left;
        margin-left: 2%;
      }
    }
  }
  .i-accept {
    width: 30%;
    display: inline-block;
    vertical-align: top;
  }
  .initials {
    width: 35%;
    display: inline-block;
  }
  .signature {
    width: 49%;
    float: left;
  }
  .signature + .js-form-type-date {
    width: 49%;
    float: left;
    margin-left: 2%;
  }
  .js-form-type-checkbox.form-item-agreement {
    input {
      float: left;
      display: block;
    }
    label {
      margin-left: 25px;
      display: block;
    }
  }
  .billing-payment-info {
    .billing-info {
      .form-item-state {
        width: 49%;
        float: left;
      }
      .form-item-zip {
        width: 49%;
        float: left;
        margin-left: 2%;
      }
    }
  }
  .payment-info {
    .form-item-security-code {
      float: left;
      width: 32%;
    }
    .form-item-exp-month {
      float: left;
      width: 32%;
      margin-left: 2%;
    }
    .form-item-exp-year {
      float: left;
      width: 32%;
      margin-left: 2%;
      margin-top: 24px;
    }
  }
  .free-joining-fee {
    color: #5c2e91;
    font-weight: bold;
    font-size: 120%;
    margin-bottom: 5px;
  }
}

#ui-datepicker-div {
  z-index: 4000 !important;
}

#membership-page {
  position: relative;
  z-index: 901;
  color: #333;
  #block-openy-lily-content {
    .landing-header {
      &:first-of-type {
        background: url("../img/membership_b_bg_1.jpg") #f8f8f8 no-repeat center;
        background-size: cover;
        height: 599px;
        text-align: center;
        h2 {
          color: #fff;
          font-size: 48px;
          margin-bottom: 27px;
          margin-top: 90px;
        }
        .p1 {
          color: #ebebeb;
          font-size: 24px;
          line-height: 32px;
          margin: 0 0 30px 0;
        }
        .container {
          width: 100% !important;
        }
        .buttons-wrap {
          p {
            font-size: 16px;
            color: #fff;
            max-width: 250px;
            margin: 15px auto 0;
            opacity: 0.5;
          }
          a {
            &:hover,
            &:focus {
              text-decoration: none;
            }
            &.join-online-now {
              background-color: #9c1f7b;
              background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(0.7, #aa248e), to(rgba(171, 36, 144, 0)));
              background-image: -webkit-linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              background-image: -moz-linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              background-image: -o-linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              background-image: linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
              font-size: 20px;
              line-height: 32px;
              padding: 14px 50px;
              margin-bottom: 20px;
              min-width: 250px;
              width: auto;
              display: inline-block;
              color: #fff;
              @include cachet();
              border-radius: 4px;
              outline: 0 !important;
              position: relative;
              text-transform: uppercase;

            }
            &.try-the-y-toggle {
              background-color: #0d63ad;
              background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(0.7, #158acc), to(rgba(21, 138, 204, 0)));
              background-image: -webkit-linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              background-image: -moz-linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              background-image: -o-linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              background-image: linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
              font-size: 20px;
              line-height: 32px;
              padding: 14px 50px;
              margin-bottom: 20px;
              min-width: 250px;
              width: auto;
              display: inline-block;
              color: #fff;
              @include cachet();
              border-radius: 4px;
              outline: 0 !important;
              position: relative;
              text-transform: uppercase;
            }
          }

        }
        .bottom {
          margin-top: 90px;
          position: relative;
        }
        @include breakpoint (0 $tablet) {
          background-size: 100%;
          background-position: top;
          position: relative;
          height: auto;
          margin-bottom: 20px;
          h2 {
            font-size: 24px;
            display: block;
            margin: 12% 0 17%;
            text-align: center;
          }
          .p1 {
            color: #434334;
            font-size: 14px;
            line-height: 18px;
          }
          .buttons-wrap {
            a {
              padding: 6px 50px !important;
              margin-bottom: 10px !important;
            }
            p {
              font-size: 12px;
              opacity: 1;
              color: #434334;
              margin: 5px auto 10px;
            }
          }
          .bottom {
            margin-top: 15px;
            p {
              opacity: 1 !important;
              color: #434334 !important;
              font-size: 12px !important;
              max-width: 240px;
              margin: 0 auto;
            }
          }
        }
        @include breakpoint (0 580px) {
          h2 {
            margin: 9% 0 17%;
          }
        }
      }
    }
    .landing-content {
      @extend .row;
      > .paragraph {
        &:nth-of-type(1) {
          padding-bottom: 0;
          float: left;
          width: 67%;
          display: none;
          h2 {
            color: #000;
            margin-bottom: 40px;
            font-size: 30px;
            margin-left: 15px;
          }
          p {
            text-align: right;
            margin-right: 45px;
            color: #333;
          }
          @include breakpoint (0 $tablet) {
            width: 100%;
            float: none;
          }
        }
        &:nth-of-type(2) {
          float: right;
          width: 30%;
          display: none;
          margin-top: -130px;
          @include breakpoint (0 $tablet) {
            width: 100%;
            float: none;
            margin-top: 15px;
          }
        }
        &:nth-of-type(3) {
          text-align: center;
          h2 {
            color: black;
            margin-bottom: 20px;
          }
          p {
            font-size: 18px;
            line-height: 26px;
            margin-bottom: 27px;
          }
          @include breakpoint (0 $tablet) {
            padding-top: 0;
            h2 {
              margin-top: 0;
              margin-bottom: 15px;
            }
            p {
              font-size: 13px;
              line-height: 18px;
              margin-bottom: 20px;
            }
          }
        }
        &.paragraph--column-in-a-grid {
          > div {
            width: 25%;
            text-align: center;
            .grid-item {
              border: none;
              margin: 0;
              h2 {
                line-height: 22px;
                margin: 10px 0 5px;
                float: none;
                text-align: center;
                max-width: 180px;
                font-size: 18px;
                color: #333;
                padding: 0;
                display: inline-block;
              }
              p {
                max-width: 250px;
                line-height: 22px;
                margin: 0 auto;
                font-size: 14px;
                color: #333;
              }
              img {
                float: none;
                text-align: center;
                max-width: 86px;
                max-height: 60px;
                display: inline-block;
                margin-bottom: 18px;
              }
            }
            &:nth-of-type(5) {
              margin-left: 12.5%;
            }
            @include breakpoint (0 $tablet) {
              width: 50%;
              margin: 0 0 25px 0 !important;
              .text {
                padding: 0;
              }
              .grid-item {
                .inner {
                  padding: 0;
                  img {
                    height: 35px;
                    margin-bottom: 5px;
                  }
                  h2 {
                    font-size: 15px;
                    line-height: 16px;
                    margin: 10px 0 5px;
                  }
                  p {
                    font-size: 12px;
                    line-height: 14px;
                  }
                }
              }
            }
          }
        }
      }
      article.webform {
        float: left;
        width: 70%;
        display: none;
        @include breakpoint (0 $tablet) {
          width: 100%;
          float: none;
          padding: 0;
          margin: 0;
        }
        form {
          margin-top: 0;
        }
        .container {
          max-width: 100%;
          @include breakpoint (0 $tablet) {
            padding: 0;
          }
        }
      }
    }
    .container {
      width: 100%;
    }
    .wrapper-field-bottom-content {
      .field-bottom-content {
        margin: 0 -15px;
        .paragraph--type--simple-content {
          padding: 0;
        }
        &:nth-of-type(1) {
          text-align: center;
          color: white;
          background: url("../img/ymca-membership-bg-2.jpg") no-repeat center;
          background-size: cover;
          min-height: 436px;
          h2 {
            margin: 38px 0 110px;
          }
          p {
            color: #fff;
            font-size: 21px;
            line-height: 29px;
            margin-bottom: 30px;
          }
          a {
            &:hover,
            &:focus {
              text-decoration: none;
            }
            &.join-online-now {
              background-color: #9c1f7b;
              background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(0.7, #aa248e), to(rgba(171, 36, 144, 0)));
              background-image: -webkit-linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              background-image: -moz-linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              background-image: -o-linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              background-image: linear-gradient(#aa248e 70%, rgba(171, 36, 144, 0));
              box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
              font-size: 20px;
              line-height: 32px;
              padding: 14px 50px;
              margin-bottom: 20px;
              min-width: 250px;
              width: auto;
              display: inline-block;
              color: #fff;
              @include cachet();
              border-radius: 4px;
              outline: 0 !important;
              position: relative;
              text-transform: uppercase;
            }
            &.try-the-y-toggle {
              background-color: #0d63ad;
              background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(0.7, #158acc), to(rgba(21, 138, 204, 0)));
              background-image: -webkit-linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              background-image: -moz-linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              background-image: -o-linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              background-image: linear-gradient(#158acc 70%, rgba(21, 138, 204, 0));
              box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
              font-size: 20px;
              line-height: 32px;
              padding: 14px 50px;
              margin-bottom: 20px;
              min-width: 250px;
              width: auto;
              display: inline-block;
              color: #fff;
              @include cachet();
              border-radius: 4px;
              outline: 0 !important;
              position: relative;
              text-transform: uppercase;
            }
          }
          @include breakpoint (0 $tablet) {
            background-size: 100%;
            background-position: top;
            position: relative;
            height: auto;
            margin-bottom: 20px;
            .col-sm-6 {
              &:first-child {
                border-bottom: 1px solid #EEE;
                margin-bottom: 15px;
              }
            }
            h2 {
              font-size: 24px;
              display: block;
              margin: 10% 0 17%;
              text-align: center;
            }
            p {
              color: #3a3a3a;
              font-size: 12px;
              line-height: 15px;
              margin-bottom: 20px;
            }
            a {
              margin-bottom: 10px;
              text-transform: capitalize;
              min-width: 210px;
              padding: 4px 0 !important;
            }
          }
        }
        &:nth-of-type(2) {
          background: $blue-darker;
          padding: 0 100px;
          color: white;
          @include breakpoint (0 $desktop) {
            padding: 0 15px;
          }
          h3 {
            font-size: 24px;
            text-transform: uppercase;
          }
          h4 {
            font-size: 20px;
            text-transform: uppercase;
            margin: 12px 0 4px;
          }
          p {
            font-size: 16px;
            line-height: 24px;
            a {
              color: white;
              text-decoration: underline;
            }
          }
          ul {
            margin: 0 0 0 15px;
            padding: 0;
            li {
              font-size: 16px;
              line-height: 24px;
            }
          }
          @include breakpoint (0 $tablet) {
            h3 {
              font-size: 18px;
              margin: 20px 0 5px;
              letter-spacing: -0.5px;
            }
            p {
              font-size: 12px !important;
              line-height: 15px !important;
              margin-bottom: 20px !important;
            }
            li {
              font-size: 12px !important;
              line-height: 15px !important;
            }
            h3 {
              font-size: 18px;
              margin: 20px 0 5px;
              letter-spacing: -0.5px;
            }
          }
        }
      }
    }
    @include breakpoint (0 $tablet) {
      h2 {
        font-size: 22px;
      }
      p {
        font-size: 13px;
        line-height: 18px;
        margin-bottom: 20px;
      }
    }
  }
  // Form styling
  #edit-date-of-birth {
    > div {
      float: left;
      width: 32%;
      &:nth-of-type(2) {
        margin: 0 2%;
      }
    }
  }
}

.webform-options-display-four-columns .form-checkboxes {
  column-count: 4;
}

.openy-ccc-account-memberships-form {
  .button.js-form-submit.form-submit {
    margin-top: 20px;
  }
  .membership-renewal-check-response {
    margin: 20px 0;
  }
}

.membership-application-form  {
  .form-item {
    padding: 0 10px;
  }

  .form-item-first,
  .form-item-last {
    float: left;
    width: 45%;

    @include breakpoint (0 $tablet) {
      float: none;
      width: 100%;
    }
  }

  .form-item-middle {
    float: left;
    width: 10%;
    @include breakpoint (0 $tablet) {
      float: none;
      width: 100%;
    }

  }

  .form-item-emergency-contact,
  .form-item-member-id,
  .form-item-city,
  .form-item-parent-name,
  .form-item-primary-phone {
    float: left;
    width: 34%;
    @include breakpoint (0 $tablet) {
      float: none;
      width: 100%;
    }

  }

  .form-item-relationship-2,
  .form-item-relationship-1,
  .form-item-phone-2,
  .form-item-phone-1,
  .form-item-bus-phone,
  .form-item-join-date,
  .form-item-expiration-date,
  .form-item-cell,
  .form-item-state,
  .form-item-zip-code {
    float: left;
    width: 33%;
    @include breakpoint (0 $tablet) {
      float: none;
      width: 100%;
    }

  }

  .form-item-member-initials-1,
  .form-item-member-initials-2,
  .form-item-member-initials-3,
  .form-item-member-initials-4,
  .form-item-member-initials-6,
  .form-item-member-initials-5 {
    width: 150px;
  }

  .form-item-email-address + fieldset,
  .form-item-program-policy-signature,
  .form-item-signature-of-bank-depositor-credit-card-holder,
  .form-item-member-signature,
  .form-item-bottom-date,
  .form-item-member-print-name,
  .form-item-bank-draft-signature-date,
  .form-item-program-policy-date,
  .form-item-electronic-signature,
  .form-item-dob {
    width: 50%;
    float: left;

    @include breakpoint (0 $tablet) {
      float: none;
      width: 100%;
    }
  }

  .form-item-member-print-name,
  .form-item-electronic-signature {
    float: none;
  }

  .form-item-dob {
    margin-top: 50px;
  }

  .form-item-dob + fieldset {
    width: 100%;
  }

  fieldset.js-webform-radios-fieldset {
    padding: 0;
  }

  .form-item-expiration-date + fieldset {
    padding: 0 10px;
  }

  .branch,
  .how-did-you-hear-about,
  .household-income-range,
  .race-ethnicity,
  .membership-category {
    .form-item {
      width: 30%;
      float: left;

      @include breakpoint (0 $tablet) {
        float: none;
        width: 100%;
      }
    }
  }

  .gender,
  .type-of-membership {
    .form-item {
      width: 20%;
      float: left;

      @include breakpoint (0 $tablet) {
        float: none;
        width: 100%;
      }
    }
  }

  .credit-card-confirm {
    .form-item {
      width: 10%;
      float: left;

      @include breakpoint (0 $tablet) {
        float: none;
        width: 100%;
      }
    }
  }

  .js-webform-radios .js-form-item label {
    margin-top: 0 !important;
  }

  [data-drupal-selector="edit-privacy-policy-link"] {
    display: block;
    font-weight: bold;
    margin: 25px 10px 10px;
  }

  .js-form-item-confirm-checkbox label {
    max-width: 90%;
    vertical-align: top;
  }
}

.ui-widget.ui-dialog .ui-dialog-content {
  @include breakpoint (0 $tablet) {
    padding: 0 10px 10px;
  }
}