.resources-header {
  padding: 2*$default-padding;
}

.resources-table-wrapper {
  padding-bottom: 60px;

  &.with_tag_filter {
    padding-right: 242px;
  }
}

div#image_assign_filter_and_image_sizing {
  width: 100%;
  height: 40px;
}

#picture_archive {

  .selected_item_tools {
    margin: -2*$default-padding;
    border-bottom: 1px solid $default-border-color;
    margin-bottom: 4*$default-padding;
    padding: 4*$default-padding;
    display: none;
  }
}

.thumbnail_background {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: $thumbnail-background-color;
  width: 100%;
  height: 120px;
}

.picture_thumbnail {
  margin: 2*$default-margin;
  background-color: #fff;
  position: relative;
  box-shadow: 0 0 0 1px $default-border-color;
  width: 160px;

  img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }

  .picture_name {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    bottom: 0;
    left: 0;
    line-height: 2;
    padding: 0 $default-padding;
    text-overflow: ellipsis;
  }

  &.small {
    width: 80px;

    .thumbnail_background {
      height: 60px;
    }
  }

  &.large {
    width: 240px;

    .thumbnail_background {
      height: 180px;
    }
  }

  &:hover {

    .picture_tool, .picture_tags {
      visibility: visible;
      opacity: 1;
    }
  }
}

#pictures,
#overlay_picture_list {
  display: flex;
  flex-wrap: wrap;
}

#pictures {

  .thumbnail_background {
    @include zoom-in;
  }
}

div.assign_image_list_image {
  text-align: center;
  overflow: hidden;
  position: relative;

  img {
    border-style: none;
  }
}

.picture_tool {
  width: 20px;
  height: 20px;
  position: absolute;
  background-color: white;
  top: $default-padding;
  padding: $default-padding / 2;
  z-index: 10;
  text-align: center;
  border-radius: $default-border-radius;
  box-shadow: 0 0 1px $dark-gray;

  &.visible {
    visibility: visible;
    opacity: 1;
  }

  &.hidden {
    // Overwrite the `.hidden { display: none }` style
    display: block;
  }

  &.select {
    left: $default-padding;

    input {
      margin: 0;
      padding: 0;
    }
  }

  &.delete {
    right: $default-padding;
  }

  a {
    display: block;
    width: 16px;
    height: 16px;
    cursor: pointer;
  }
}

.picture_tags {
  overflow: hidden;
  position: absolute;
  bottom: 22px;
  left: 0;
  width: 100%;
  max-height: 80%;
  padding: $default-padding;
  pointer-events: none;
}

.picture_tags, .picture_tool {
  visibility: hidden;
  opacity: 0;
  transition: opacity $transition-duration;
}

div#library_sidebar {
  position: fixed;
  border-left: 1px solid $default-border-color;
  top: 0;
  right: 0;
  width: 232px;
  padding: 86px 4*$default-padding 0 4*$default-padding;
  height: 100%;
  z-index: 3;
  background-color: $light-gray;

  h2 {
    margin-top: 4*$default-margin;
  }
}

.alchemy-dialog #library_sidebar {
  position: absolute;
}

div#filter_bar {

  .selectboxit {
    width: 194px;
  }
}

.alchemy-dialog-body {

  #library_sidebar {
    padding: 0 4*$default-padding;
  }
}

#assign_image_list, #assign_file_list {
  position: relative;
  height: 548px;
}

#assign_image_list {
  padding-right: 244px;
}

#overlay_file_list {
  .assign_file_file {
    display: block;
    margin-bottom: 4px;
    word-break: break-all;

    &:hover {
      background-color: $light_yellow;
    }
  }

  > ul {
    margin: 0;
    padding: 4px 0;

    a {
      @extend %text-overflow;
      display: block;
      line-height: 25px;
      text-decoration: none;
      padding: $default-padding 2*$default-padding;
    }

    .icon {
      margin-top: -2px;
      margin-right: 4px;
    }
  }
}

#all_files td.name a {
  @include zoom-in;
}
