@import "../../variables.scss";

.home-upload {
  position: relative;

  .bottom-text {
    color: $lightGray;
    font-size: 16px;
    text-align: center;
    max-width: 590px;
    margin: 25px auto 0;

    @media (min-width: $largebp) {
      font-size: 16px;
    }
  }
}

.home-upload-white {
  background: $white;
  border-radius: 12px;
  box-shadow: 0 8px 24px 0 rgba(90, 94, 91, 0.15), 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  padding: 16px;
}

.home-upload-split {
  border: 1px dashed #c5cec7;
  border-radius: 4px;
  padding: 20px;

  @media (min-width: $largebp) {
    display: flex;
  }
}

.home-upload-box {
  padding-bottom: 20px;

  @media (min-width: $largebp) {
    width: 50%;
    padding-bottom: 0;
    padding-right: 20px;
  }
}

.home-upload-dropzone {
  border-radius: 4px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  outline: none;

  &:hover {
    background-color: rgba(0, 0, 0, 0.03);
    cursor: pointer;
  }

  &:hover .button {
    background-color: $greenHover;
    transform: translateY(-2px);
  }

  &.drop-active {
    background-color: $green;
    border: 1px solid $green;

    h3 {
      color: $white;
    }

    .button {
      display: none;
    }
  }

  .button {
    margin-top: 20px;

    @media (min-width: $largebp) {
      margin-top: 30px;
    }
  }
}

.home-upload-mode-switch {
  display: block;
  font-size: 13px;
  margin: 10px auto 0;

  @media (min-width: $largebp) {
    font-size: 14px;
  }
}

.home-upload-directory-mode-notice {
  color: $lightGray;
  font-size: 13px;
  line-height: 1.2em;
  margin-top: 20px;
  text-align: center;
}

.home-upload-text {
  color: $gray;
  display: block;
  transition: 0.2s color;
  font-size: 13px;

  @media (min-width: $largebp) {
    font-size: 14px;
  }

  .drop-active & {
    color: $white;
  }

  h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: $darkGray;

    @media (min-width: $largebp) {
      font-size: 18px;
    }
  }
}

.deco-3 {
  position: absolute;
  top: -70px;
  left: -5px;
  animation: 8s float infinite;
}

.deco-4 {
  position: absolute;
  top: -32px;
  left: -90px;
  animation: 6s float infinite;
}

.deco-5 {
  position: absolute;
  top: 52px;
  left: -56px;
  animation: 10s float infinite;
}

.home-uploaded-files {
  border: solid 1px #c5cec7;
  padding: 0 20px;
  margin-top: 10px;
  border-radius: 4px;

  @media (min-width: $largebp) {
    padding: 0 40px;
  }

  .upload-file + .upload-file {
    border-top: 1px solid rgba(197, 206, 199, 0.4);
  }
}

.home-upload-retrieve {
  align-items: center;
  text-align: center;
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  border-top: 1px dashed #c5cec7;
  height: 200px;
  padding: 40px 20px;

  @media (min-width: $largebp) {
    width: 50%;
    padding: 20px 40px;
    border-top: 0;
    border-left: 1px dashed #c5cec7;
  }

  .home-upload-text {
    width: 100%;
  }
}

.home-upload-retrieve-form {
  width: 100%;
  margin-top: 3px;
  position: relative;
  margin-top: 20px;

  @media (min-width: $largebp) {
    margin-top: 30px;
  }

  input {
    border: 1px solid #cbd3cd;
    border-radius: 4px;
    line-height: 46px;
    transition: 0.2s border-color;
    padding: 0 64px 0 16px;
    font-size: 13px;

    @media (min-width: $largebp) {
      font-size: 14px;
    }
  }

  input:hover,
  input:hover + button {
    border-color: rgb(143, 143, 143);
  }

  input:focus,
  input:focus + button {
    border-color: $green;
  }

  button {
    border-left: 1px solid #cbd3cd;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    width: 46px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    color: #cbd3cd;
    transition: 0.2s background-color, 0.2s border-color, 0.2s color;

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

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

    input:hover,
    input:hover + button {
      border-color: $red;
    }

    input:focus,
    input:focus + button {
      border-color: $red;
    }

    button {
      border-color: $red;

      &:hover {
        background: $red;
        border-color: $red;
      }
    }
  }
}
