@keyframes Rotate {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(15deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@mixin ICON_CONTAINER {
  color: #ffffff;
  text-align: center;
  font-family: 'Roboto', sans-serif;
  font-weight: 100;

  &:hover {
    cursor: pointer;
  }

  .os {
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin: 10px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

@mixin CONTAINER {
  background: linear-gradient(to top, #005bea 0%, #00c6fb 100%);
  height: 100%;

  .drop-zone {
    display: flex;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    user-select: none;
    position: relative;

    .icon {
      margin: 0;
      padding: 0;

      .elephant {
        fill: #ffffff;
        -webkit-app-region: no-drag;

        &:hover {
          opacity: 0.9;
          cursor: pointer;
        }
        &:active {
          opacity: 0.6;
        }
        &.loading {
          transform-origin: 80% 90%;
          animation: Rotate 1.5s infinite;
        }
        &.ondrag {
          opacity: 0.6;
        }
      }
    }
  }

  .text {
    font-size: 24px;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    color: #ffffff;

    &.loading {
      opacity: 0.4;
    }
    &.ondrag {
      opacity: 0.4;
    }
  }

  .result {
    margin-top: 1em;
    color: #ffffff;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
  }

  .error {
    margin-top: 1em;
    color: #ffffff;
    width: 300px;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 100;
    overflow: hidden;
    position: relative;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
  }

  .filename {
    width: 300px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 500;
  }

  .switch {
    margin: 20px;
    display: flex;

    .icon-container {
      @include ICON_CONTAINER();
      transition: opacity 0.3s linear;

      &.loading {
        opacity: 0.4;
      }
      &.unchecked {
        opacity: 0.6;
      }
    }

    .back-container {
      @include ICON_CONTAINER();

      &:hover {
        cursor: pointer;
        opacity: 0.6;
      }
      &:active {
        opacity: 0.2;
      }
    }
  }
}

* {
  margin: 0;
  padding: 0;
}

html,
body,
#root {
  height: 100%;
}

.container {
  @include CONTAINER();
}

.container_darwin {
  @include CONTAINER();
  -webkit-app-region: drag;

  .icon {
    .elephant {
      -webkit-app-region: no-drag;
    }
  }

  .switch {
    .icon-container {
      -webkit-app-region: no-drag;
    }

    .back-container {
      -webkit-app-region: no-drag;
    }
  }
}
