@import "bourbon";

@mixin lato {
  font-family: 'Lato', sans-serif;
}

@mixin sourcesans {
  font-family: 'Source Sans Pro', sans-serif;
}

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

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

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

#tve_40_set {
  [class*='40_set'] {
    @include clearfix();
    //    .tve_editor_main_content {
    //      max-width: 2200px;
    //      margin-left: 0;
    //      padding: 0 50px;
    //    }
    a {
      color: inherit;
    }
    .tve_p_lb_close {
      @include lato();
      border-radius: 50%;
      background: #e05e4d;
      border: 0;
      color: #fff;
      font-size: 15px;
      line-height: 17px;
      text-decoration: none;
      top: 10px;
      right: 10px;
    }
    h2 {
      @include lato();
      color: #333333;
      font-weight: 400;
      font-size: 32px;
      line-height: 1.111em;
      letter-spacing: normal;
      .bold_text {
        color: #e64f30;
      }
    }
    p {
      @include lato();
      color: #666;
      font-size: 20px;
      font-weight: 300;
      line-height: 1.5em;
      margin-bottom: 20px;
      text-shadow: none;
    }
    h2 {
      clear: none;
      padding-bottom: 0;
    }
    .bold_text {
      font-weight: 700!important;
    }
  }
}

#tve_40_set {
  @include lato();
  text-shadow: none;
  article {
    padding-bottom: 0;
  }
  .thrv_contentbox_shortcode {
    margin-top: 0;
    margin-bottom: 0;
    .tve_cb5 {
      border: 0;
      border-radius: 5px;
      box-shadow: 0 1px 10px 0 rgba(#000, .15);
    }
  }
  .thrv_lead_generation {
    &.thrv_lead_generation_horizontal {
      &.tve_2 {
        button, input[type="text"], input[type="email"] {
          margin-bottom: 0;
        }
      }
      &.tve_2 {
        .tve_lead_generated_inputs_container {
          .tve_lg_input_container {
            &.tve_lg_2 {
              width: 60%;
              &:last-of-type {
                width: 40%;
              }
            }
          }
        }
      }
    }
    button {
      @include lato();
      border-radius: 5px;
      border: 0;
      box-shadow: 0 -1px 1px 0 rgba(#000, .3) inset;
      color: $white;
      font-weight: 700;
      font-size: 20px;
      line-height: 30px;
      padding: 12px 10px;
      text-shadow: 0 1px 1px rgba(#000, .3);
    }
    input[type="text"], input[type="email"] {
      @include sourcesans();
      border-radius: 2px;
      border: 0;
      background: #fbfbfb;
      box-shadow: -1px 1px 5px 0 rgba(#000, .3) inset;
      color: #999;
      font-size: 18px;
      font-weight: 300;
      height: auto;
      line-height: 28px;
      padding: 13px 20px !important;
      &:focus {
        background: #ebebeb;
        color: #333;
      }
    }
  }
  .thrv-leads-form-box {
    border: 0;
  }
  .thrv-leads-widget {
    background: #d2e6f1;
  }
  .tve-leads-lightbox {
    .tve_p_lb_content {
      background: #d2e6f1;
      border-radius: 0;
      padding: 0 15px;
      .tve_p_lb_inner {
        overflow: visible;
      }
    }
  }
  /*
   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%;
      + label {
        @include lato();
        color: #666666;
        display: inline-block;
        position: relative;
        font-size: 16px;
        font-weight: 300;
        &:before {
          background-color: #fcfcfc;
          border: 1px solid #cccccc;
          box-shadow: 1px 1px 2px 0 rgba(#000, .15) inset;
          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: 8px;
          position: absolute;
          top: 6px;
          left: 5px;
          width: 8px;
        }
      }
    }
  }
  .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 lato();
          color: #666666;
          cursor: pointer;
          font-size: 16px;
          font-weight: 300;
          position: relative;
          padding-left: 35px;
          &:before {
            background-color: #fcfcfc;
            border: 1px solid #cccccc;
            box-shadow: 1px 1px 2px 0 rgba(#000, .15) inset;
            content: '';
            height: 20px;
            position: absolute;
            left: 0;
            top: 0;
            width: 20px;
          }
          &:after {
            @include transition(all, .2s);
            content: "\02713";
            color: #fff;
            font-size: 18px;
            font-weight: 600;
            position: absolute;
            top: -2px;
            left: 4px;
          }
        }
      }
      &:not(:checked) + label:after {
        @include transform(scale(0));
        opacity: 0;
      }
      &:checked + label:after {
        @include transform(scale(1));
        opacity: 1;
      }
    }
  }
}

$color-pallete:
'blue' #549bd3 #407ac5 #5da7d9 #386dbf #417cc6 #5398d2 #d2e6f1,
'black' #2e2e2e #222222 #323232 #1e1e1e #232323 #2d2d2d #cbcbcb,
'green' #389b77 #2a7b5a #3da882 #256e4e #2b7d5b #379974 #cde6dd,
'white' #afafaf #959595 #b9b9b9 #8b8b8b #979797 #adadad #fff,
'orange' #de8a3a #d3682c #e29740 #ce5b26 #d36a2d #dd8739 #f7e2ce,
'purple' #9592cc #736ebc #a3a0d3 #6661b5 #7571bd #938fcb #e4e4f2,
'red' #e46754 #db4d40 #e7715d #d74438 #db4f41 #e36553 #f8d9d4,
'teal' #34b6bd #289ea7 #386dbf #23959f #28a0a9 #33b4bb #ccedee;

@each $color in $color-pallete {
  #tve_40_set {
    //    .thrv-leads-screen-filler.tve_#{nth($color, 1)} {
    //      background-color: nth($color, 4);
    //    }
    .tve_cb.tve_cb5.tve_#{nth($color, 1)} {
      background: nth($color, 8);
    }
    .thrv-leads-form-box.tve_#{nth($color, 1)} {
      background: nth($color, 8);
    }
    .thrv_lead_generation.tve_#{nth($color, 1)} {
      input[type="text"], input[type="email"] {
        &:hover {
          background: nth($color, 8);
        }
      }
      button {
        @include linear-gradient(nth($color, 2), nth($color, 3));
        &:hover {
          @include linear-gradient(nth($color, 4), nth($color, 5));
        }
        &:active {
          @include linear-gradient(nth($color, 6), nth($color, 7));
        }
      }
      input[type="radio"] {
        &:checked + label {
          &:after {
            border: 2px solid nth($color, 6);
          }
        }
      }
      input[type="checkbox"] {
        &:checked {
          + label {
            &:after {
              color: nth($color, 6);
            }
          }
        }
      }
    }
  }
}

@media only screen and (max-width: 940px) {
  #tve_40_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";
