$component: 'form';
$template: 'template-2';

@mixin transition($time, $property) {
  -webkit-transition: $property $time;
  -moz-transition: $property $time;
  -ms-transition: $property $time;
  -o-transition: $property $time;
  transition: $property $time;
}
@mixin border-sizing($sizing) {
  -webkit-box-sizing: $sizing;
  -moz-box-sizing: $sizing;
  box-sizing: $sizing;
}
@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  border-radius: $radius;
}

.widget.c-#{$component}.c-#{$component}-#{$template} {
  .widget-form {
    &-header {
      font-size: 24px;
      font-weight: bold;
      line-height: 30px;
    }
    &-description {
      font-size: 16px;
      line-height: 24px;
      margin-top: 15px;
    }
    &-button {
      font-size: 16px;
      line-height: 16px;
      font-weight: 500;
      text-align: center;
      color: #FFF;
      padding: 20px 70px;
      cursor: pointer;
      @include border-radius(28px);
      @include transition(0.4s, null);

      &-wrap {
        padding-left: 130px;
        padding-right: 130px;
        max-width: 600px;
        @include border-sizing(border-box);
      }
      &-under {
        font-size: 14px;
        font-weight: bold;
        line-height: 18px;
        text-align: center;
        margin-top: 15px;
      }
    }
  }
  &[data-background='true'] {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  &[data-button-position='center'] {
    .widget-form {
      &-header {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
        @extend %position-center;
      }
      &-description {
        max-width: 70%;
        margin-left: auto;
        margin-right: auto;
        @extend %position-center;
      }
      &-action {
        margin-top: 35px;
      }
    }
  }
  &[data-theme='dark'] {
    .widget-form {
      &-header {
        @extend %theme-dark;
      }
      &-description {
        @extend %theme-dark;
      }
      &-button {
        &-under {
          @extend %theme-dark;
        }
      }
    }
  }
  &[data-theme='light'] {
    .widget-form {
      &-header {
        @extend %theme-light;
      }
      &-description {
        @extend %theme-light;
      }
      &-button {
        &-under {
          @extend %theme-light;
        }
      }
    }
  }
  %position-center {
    text-align: center;
  }
  %theme-dark {
    color: #333;
  }
  %theme-light {
    color: #FFF;
  }

  @media all and (max-width: 1000px) {
    &[data-button-position='right'] {
      .widget-form {
        &-header {
          max-width: 80%;
          margin-left: auto;
          margin-right: auto;
          @extend %text-align-from-right;
        }
        &-description {
          max-width: 70%;
          margin-left: auto;
          margin-right: auto;
          @extend %text-align-from-right;
        }
        &-action {
          margin-top: 35px;
        }
      }
    }
    %text-align-from-right {
      text-align: center;
    }
  }
  @media all and (max-width: 768px) {
    .widget-form {
      &-header {
        font-size: 18px;
        line-height: 24px;
      }
      &-description {
        font-size: 13px;
        line-height: 18px;
      }
      &-button {
        font-size: 14px;
        line-height: 14px;
        padding-left: 40px;
        padding-right: 40px;

        &-under {
          font-size: 11px;
          line-height: 15px;
        }
      }
    }
    &[data-button-position='center'] {
      .widget-form {
        &-header {
          @extend %width-reset;
        }
        &-description {
          @extend %width-reset;
        }
      }
    }
    &[data-button-position='right'] {
      .widget-form {
        &-header {
          @extend %width-reset;
        }
        &-description {
          @extend %width-reset;
        }
      }
    }
    %width-reset {
      max-width: initial;
    }
  }
}