@mixin get-involved-content-page {
  height: 100%;
  display: flex;
  flex-direction: column;

  @include from($widescreen) {
    max-width: 35.5834rem;
  }
}

@mixin dropzone-overlay {
  @extend %body-text;
  font-family: $font-tgn-bold;
  display: none;
  position: absolute;
  background-color: transparentize($ami-black, 0.4);
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 4rem;
  color: $ami-white;
  pointer-events: none;
  left: 0;
  top: 0;
}

.split-layout {
  .left-image-container.thank-you-image {
    background-image: url('../images/thank-you-left-image.jpg');
  }

  .image-uploader {
    @include get-involved-content-page;

    form {
      margin-top: 3.166rem;
      overflow: hidden;

      @include until($desktop) {
        width: 100%;
        max-width: 36.1112rem;
        margin-left: auto;
        margin-right: auto;
      }

      @include until($tablet) {
        margin-top: 1.666rem;
      }

      @include mobile {
        margin-left: inherit;
      }
    }

    .email-container {
      display: flex;
      flex-direction: column;

      &:hover,
      &.has-value {
        input[type="email"] {
          border-bottom-color: $ami-white;
        }

        label {
          color: $ami-white;
        }
      }
    }

    .left-column {
      @include until($tablet) {
        margin-bottom: 1.666rem;
        padding-bottom: 0;
      }

      @include from($tablet) {
        padding-right: 1rem;
      }

      .user-data-form {
        @include until($tablet) {
          width: 16rem;
        }

        > div:not(:last-child) {
          margin-bottom: 1.666rem;

          &:not(:first-child) {
            @include until($tablet) {
              margin-bottom: 0.888rem;
            }
          }
        }
      }

      .g-recaptcha {
        @include until($tablet) {
          transform: scale(0.955);
          -webkit-transform: scale(0.955);
          transform-origin: 0 0;
          -webkit-transform-origin: 0 0;
        }
      }
    }

    .right-column {
      @include until($tablet) {
        padding-top: 0;
      }

      @include from($tablet) {
        padding-left: 0;
      }
    }

    .email-input {
      position: relative;
      max-width: 16.8rem;

      @include until($tablet) {
        max-width: 16rem;
      }

      > i {
        position: absolute;
        right: 0;
        top: 0;
        display: none;
      }

      &.success > i.success {
        color: $bright-green;
        display: block;
      }

      &.error {
        > input {
          border-color: $red;
        }

        > i.error {
          color: $red;
          display: block;
        }
      }

      .validation-message {
        color: $red;
        position: absolute;
        font-size: $font-size-small;
      }
    }

    input[type="email"],
    .recaptcha {
      width: 100%;
    }

    label {
      @extend %body-text-small;
      color: transparentize($ami-white, 0.4);
    }

    .js-terms-and-conditions {
      display: inline-flex;
      align-items: center;

      @include until($tablet) {
        width: 16rem;
      }

      &:hover {
        > label {
          color: $ami-white;
        }
      }

      > input[type="checkbox"] {
        display: none;

        &:checked + label {
          color: $ami-white;

          &::before {
            background-color: $green;
            border-color: $green;
            color: $ami-white;
          }
        }
      }

      > label {
        color: transparentize($ami-white, 0.4);
        font-family: $font-tgn-condensed;
        font-size: $font-size-body-text;
        letter-spacing: 0.03rem;

        &::before {
          content: '\e800';
          font-family: "ami-icons";
          color: transparent;
          border: 1px solid $light-grey;
          height: 1.125rem;
          width: 1.125rem;
          margin-right: 0.5rem;
          flex-shrink: 0;
          font-size: 0.8rem;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }
      }
    }

    .terms-description {
      @extend %body-text;
      margin-top: 1.389rem;
      margin-bottom: 0;
    }
  }

  .button-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-top: 0.3889rem;

    @include tablet-only {
      max-width: 36.1112rem;
      margin-left: auto;
      margin-right: auto;
    }

    @include mobile {
      width: 16rem;
      justify-content: flex-start;
    }
  }

  .page-description {
    @extend %body-text;
  }

  .column-title {
    @extend %body-text-small;
    font-family: $font-tgn-bold;
    color: $ami-white;
  }

  .column-description {
    @extend %body-text-small;
  }

  .column-link {
    @extend %body-text-small;
    color: $ami-yellow;
  }

  .image-downloader {
    @include get-involved-content-page;

    .columns {
      padding-top: 2.222rem;
    }

    .left-column,
    .right-column {
      padding-top: 0;
    }

    .downloadable-image {
      margin-top: 1.125rem;
      width: 11.111rem;
      height: auto;
      display: block;
    }

    .button-container {
      margin-top: auto;

      @include mobile {
        margin-left: inherit;
      }
    }
  }

  .image-editting-column {
    width: 17.666rem;

    @include until($desktop) {
      margin-left: auto;
    }

    @include until($tablet) {
      width: 16rem;
      margin-left: inherit;
      float: none;
    }

  }

  .dropzone-net {
    width: 17.666rem;
    height: 17.666rem;
    border: 2px dashed $ami-white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;

    @include until($tablet) {
      width: 16rem;
      height: 16rem;
    }

    &.dz-drag-hover {
      border-style: solid;
      border-color: $ami-yellow;
    }

    &.dz-max-files-reached {
      cursor: default;
    }

    .dz-message {
      @extend %body-text-small;
      text-align: center;
    }

    .dz-preview {
      display: none;
    }

    .image-editor {
      max-width: 100%;
      max-height: 100%;

      &.full-size {
        height: 100%;
      }

      img {
        width: 100%;
      }
    }

    .mobile-overlay {
      @include dropzone-overlay;

      &.enabled.visible {
        display: flex;
      }
    }

    &:hover {
      .drag-info-box {
        opacity: 0;
        transition: opacity $transition-duration ease;
      }
    }

    @include until($desktop) {
      .for-desktop,
      .drag-info-box,
      .remove-image-desktop {
        display: none;
      }
    }

    @include from($desktop) {
      .for-mobile {
        display: none;
      }
    }
  }

  .zoom-controls {
    margin-top: 1rem;
    position: relative;

    .zoom-label {
      @extend %body-text-small;
      color: $ami-white;
    }

    @include until($desktop) {
      display: none;
    }
  }

  .remove-image-desktop {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 1.0556rem;
    background-color: transparentize($ami-black, 0.6);
    z-index: 9;
    color: $ami-yellow;
    cursor: pointer;
    transition: background-color $transition-duration ease-in-out;

    &:hover {
      background-color: $ami-black;
    }

    &::before {
      margin: 0.5556rem;
    }
  }

  .dropzone-tools {
    @extend %body-text-small;
    color: $ami-yellow;
    margin-top: 0.444rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;

    > span::before {
      font-size: 1rem;
    }

    @include from($desktop) {
      display: none;
    }

    .help-icon {
      color: $light-grey;
    }
  }

  .drag-info-box {
    @extend %body-text-small;
    color: $ami-white;
    padding: 0.2rem;
    background-color: transparentize($ami-black, 0.4);
    position: absolute;
    top: $font-size-body-text;
    right: $font-size-body-text;
    pointer-events: none;
    z-index: 9;
  }

  .banners {
    position: absolute;
    top: 0;
    left: 0;
    background-image: url('../images/banners.svg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .email-required-message-overlay {
    @include dropzone-overlay;
    pointer-events: all;

    &.is-active {
      display: flex;
    }
  }

  .file-error-message-overlay {
    @include dropzone-overlay;
    display: flex;
  }
}

.error-message-container {
  @extend %body-text-small;
  color: $red;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: auto;

  justify-content: flex-end;
  width: 100%;

  @include until($tablet) {
    width: 16rem;
    justify-content: flex-start;
  }

  @include until($desktop) {
    max-width: 36.1112rem;
    margin-left: auto;
    margin-right: auto;
  }

  @include mobile {
    align-items: flex-start;
  }
}

.loader-container {
  opacity: 0.3;
  background: $ami-beige;
  width: 100%;
  height: 100%;
  z-index: 10;
  top: 0;
  left: -100%;
  position: fixed;
  align-items: center;
  justify-content: center;
  transition: all $transition-duration ease-in-out;
  display: flex;

  &.visible {
    left: 0;
    opacity: 1;
  }

  .loader {
    border-bottom-color: $light-brown;
    border-left-color: $light-brown;
    height: 5rem;
    width: 5rem;
    border-width: 5px;
  }
}

.donate {
  margin-top: 1.6667rem;
}

@mixin stacked-buttons {
  &:first-child {
    padding-right: 1.375rem;
  }

  &:not(:first-child):not(:last-child) {
    padding-left: 1.375rem;
    margin-top: 0.3889rem;
    padding-top: 0;
  }
}

.share-buttons {
  padding-top: 1.6667rem;

  @include mobile {
    display: flex;
  }

  > .column:not(.ami-toolbar) {
    display: flex;
    flex-direction: column;

    &:not(:last-child) {
      padding-bottom: 0;
    }

    &:first-child {
      padding-right: 0.5rem;
    }

    &:not(:first-child):not(:last-child) {
      padding-left: 0.5rem;
    }

    > .ami-button:not(:first-child) {
      margin-top: 0.3889rem;
    }

    @include desktop-only {
      @include stacked-buttons;
    }
  }

  .ami-button {
    font-family: $font-tgn-condensed-bold;
    font-size: $font-size-body-text;
    color: $ami-white;
    background-color: transparent;
    border: 1px solid $light-grey;
    position: relative;
    display: flex;
    justify-content: flex-start;
    padding: 0.5556rem;
    color: $light-grey;

    > span {
      flex: 1;
      text-align: center;
    }

    > i::before {
      font-size: 1.1667rem;
      margin: 0;
    }

    &:hover {
      background-color: transparent;
      color: $ami-white;
      border-color: $ami-white;

    }

    &.selected,
    &:hover {
      &.facebook > i::before {
        color: $facebook;
      }
      &.twitter > i::before {
        color: $twitter;
      }
      &.pinterest > i::before {
        color: $pinterest;
      }
      &.whatsapp > i::before {
        color: $whatsapp;
      }
    }

    &.selected .checkmark {
      display: block;
      position: absolute;
      right: 0.3334rem;
      top: -0.1667rem;
      background-color: $dark-green;
      border-radius: 0.4rem;
      font-size: 0.4rem;
      height: 0.6112rem;
      width: 0.6112rem;
      display: flex;
      align-items: center;
      justify-content: center;
      color: $ami-white;
    }

    .checkmark {
      display: none;
    }
  }

  .ami-toolbar {
    display: flex;
    width: 100%;
    padding-top: 0;
    margin-top: 0.3889rem;
  }

  .copy-link {
    flex: 1;
    padding: 0.3889rem 0.5556rem;

    @include mobile {
      display: none;
    }

    .copy-link-content {
      background-color: $dark-grey;
      color: transparentize($ami-white, 0.4);
      font-size: $font-size-body-text-small;
      font-family: $font-tgn;
      letter-spacing: 0.0167rem;
      line-height: 1.2223rem;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding: 0 0.2778rem;
      border: none;
    }
  }

  .copy-link-button {
    flex-shrink: 0;
    align-items: center;
    cursor: pointer;

    i {
      position: absolute;
      left: 0.5556rem;
      display: none;
    }

    @include mobile {
      flex: 1;
      justify-content: center;

      > i {
        display: block;
      }
    }
  }
}
