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

.fileUpload {
  display: flex;
}

.fileLabel {
  flex-grow: 1;
  height: $base-input-height;
  background-color: $base-input-background;
  border-radius: $base-border-radius;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  line-height: $base-input-height;
  border: $base-border;
  border-right: none;
  display: flex;
  align-items: center;
  padding: 0 10px;
  min-width: 0;
}

.fileInput {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;

  &:disabled {
    cursor: default;
  }
}

.button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  position: relative;
  height: $base-input-height;
  box-shadow: none;
}

.nameText {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sizeText {
  margin: 0 $base-spacing;
  white-space: nowrap;
}

.fileInfo {
  display: flex;
  min-width: 0;
  align-items: center;
}

.icon {
  cursor: pointer;
}

.iconDisabled {
  cursor: default;
}

.disabled.fileLabel {
  background-color: $brand-grey;
  .fileInput {
    cursor: default;
  }
}
