@import "bourbon";

@mixin opensans {
  font-family: 'Open Sans', sans-serif;
}

@mixin clearfix {
  &:after {
    content: "";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
  }
}

$white: #fff;
$black: #000;

[class*='31_set'] {
  &.tve_gray_bg {
    background-image: none;
    background: #c2c2c2;
  }
}

#tve_31_set {
  [class*='31_set'] {
    @include clearfix();
    //    .tve_editor_main_content {
    //      max-width: 2200px;
    //      margin-left: 0;
    //      padding: 0 50px;
    //    }
    a {
      color: inherit;
    }
    .tve_p_lb_close {
      @include opensans();
      border-radius: 50%;
      border: 1px solid #3760a7;
      background: #4c84e5;
      color: #fff;
      font-size: 15px;
      line-height: 17px;
      text-decoration: none;
    }
    h2 {
      @include opensans();
      color: #fff;
      font-weight: 600;
      font-size: 32px;
      line-height: 1.111em;
      letter-spacing: normal;
    }
    p {
      @include opensans();
      color: #fff;
      font-size: 18px;
      font-weight: 400;
      line-height: 1.5em;
      margin-bottom: 20px;
    }
    h2 {
      clear: none;
      padding-bottom: 0;
    }
    .bold_text {
      font-weight: 700 !important;
    }
  }
}

#tve_31_set {
  @include opensans();
  text-shadow: none;
  article {
    padding-bottom: 0;
  }
  .thrv_contentbox_shortcode {
    margin-top: 0;
    margin-bottom: 0;
    .tve_cb {
      .tve_cb_cnt {
        padding: 10px;
      }
    }
  }
  .thrv_lead_generation {
    &.thrv_lead_generation_horizontal {
      button, input[type="text"], input[type="email"] {
        margin-bottom: 0;
      }
      .tve_lead_generated_inputs_container {
        .tve_lg_input_container {
          &.tve_lg_2 {
            width: 67%;
            &:last-of-type {
              padding-right: 0;
              width: 33%;
            }
          }
        }
      }
    }
    button {
      @include opensans();
      border-radius: 0;
      border: 0;
      box-shadow: none;
      color: $white;
      font-weight: 600;
      font-size: 20px;
      line-height: 30px;
      padding: 12px 10px;
      text-shadow: none;
      &:active {
        box-shadow: 0 5px 5px 0 rgba(#000, .16) inset;
      }
    }
    input[type="text"], input[type="email"] {
      @include opensans();
      border-radius: 0;
      border: 0;
      background: #fff;
      color: #838e8f;
      font-size: 18px;
      font-weight: 300;
      height: auto;
      line-height: 28px;
      padding: 13px 20px !important;
      &:focus {
        background: #dddedf;
        color: #333333;
        font-weight: 400;
      }
    }
  }
  .thrv-leads-form-box {
    border: 0;
    border-radius: 5px;
  }
  .thrv-leads-widget {
    background: #4c84e5;
    border-radius: 5px;
    border: 0;
  }
  .tve-leads-lightbox {
    .tve_p_lb_content {
      background: #4c84e5;
      border-radius: 5px;
      padding: 0 15px;
    }
  }
  /*
   autoresponder elements
 */
  .tve_lg_radio_wrapper {
    display: inline-block;
    position: relative;
    padding: 5px 20px 5px 0;
    input[type="radio"] {
      cursor: pointer;
      height: 100%;
      margin: 0;
      padding: 0;
      opacity: 0;
      position: absolute;
      left: 0;
      top: 0;
      z-index: 5;
      width: 100%;
      &:checked {
        + label {
          &:before {
            box-shadow: 1px 2px 0 0 rgba(#000, .15) inset;
          }
        }
      }
      + label {
        @include opensans();
        color: #fff;
        display: inline-block;
        position: relative;
        font-size: 18px;
        font-weight: 300;
        &:before {
          background-color: #fff;
          border: 1px solid rgba(#000, .1);
          border-radius: 100%;
          content: '';
          display: inline-block;
          height: 20px;
          margin-right: 10px;
          vertical-align: middle;
          width: 20px;
        }
        &:after {
          @include transition(background-color .3s);
          background-color: transparent;
          border-radius: 100%;
          content: '';
          height: 10px;
          position: absolute;
          top: 10px;
          left: 6px;
          width: 10px;
        }
      }
    }
  }
  .tve_lg_checkbox_wrapper {
    display: inline-block;
    position: relative;
    padding: 5px 20px 5px 0;
    width: auto;
    input[type="checkbox"] {
      &:not(:checked),
      &:checked {
        position: absolute;
        visibility: hidden;
        + label {
          @include opensans();
          color: #fff;
          cursor: pointer;
          font-size: 18px;
          font-weight: 300;
          position: relative;
          padding-left: 35px;
          &:before {
            background-color: #fff;
            border: 1px solid rgba(#000, .1);
            content: '';
            height: 20px;
            position: absolute;
            left: 0;
            top: 4px;
            width: 20px;
          }
          &:after {
            @include transition(all, .2s);
            content: "\02713";
            font-size: 15px;
            font-weight: 600;
            position: absolute;
            top: 4px;
            left: 5px;
          }
        }
      }
      &:not(:checked) + label:after {
        @include transform(scale(0));
        opacity: 0;
      }
      &:checked + label:after {
        @include transform(scale(1));
        opacity: 1;
      }
      &:checked + label:before {
        box-shadow: 1px 2px 0 0 rgba(#000, .15) inset;
      }
    }
  }
}

$color-pallete: 'blue' #4c84e5 #3d6ab7 #2e4f89 #3760a7,
'black' #000000 #0e0e0e #080808 #0e0e0e,
'green' #4a7424 #3b5d1d #2c4616 #3b5d1d,
'white' #999999 #7a7a7a #5c5c5c #7a7a7a,
'orange' #f29b19 #c27c14 #915d0f #c27c14,
'purple' #653c76 #51305e #3d2447 #51305e,
'red' #d02d24 #a6241d #7d1b16 #a6241d,
'teal' #3a868d #2e6b71 #235055 #2e6b71;

@each $color in $color-pallete {
  #tve_31_set {
    //    .thrv-leads-screen-filler.tve_#{nth($color, 1)} {
    //      background-color: nth($color, 4);
    //    }
    .thrv-leads-form-box.tve_#{nth($color, 1)} {
      background-color: nth($color, 2);
    }
    .tve_cb.tve_cb5.tve_#{nth($color, 1)} {
      background: nth($color, 5);
    }
    .thrv_lead_generation.tve_#{nth($color, 1)} {
      input[type="text"], input[type="email"] {
        &:hover, &:focus {
          box-shadow: 0 0 0 3px nth($color, 2) inset;
        }
      }
      button {
        background: nth($color, 2);
        &:hover {
          background: nth($color, 3);
        }
        &:active {
          background: nth($color, 4);
        }
      }
      input[type="radio"] {
        &:checked + label {
          &:after {
            background-color: nth($color, 2);
          }
        }
      }
      input[type="checkbox"] {
        &:not(:checked),
        &:checked {
          + label {
            &:after {
              color: nth($color, 2);
            }
          }
        }
      }
    }
  }
}

@media only screen and (max-width: 940px) {
  #tve_31_set {
    .thrv_lead_generation {
      &.thrv_lead_generation_horizontal {
        &.tve_2 {
          .tve_lead_generated_inputs_container {
            .tve_lg_input_container {
              &.tve_lg_2 {
                width: 50%;
                &:last-of-type {
                  width: 50%;
                }
              }
            }
          }
        }
      }
    }
  }
}

@import "_responsive";
