$tablet-s-width: 768px;

@mixin ellipsis($row) {
  overflow: hidden;
  text-overflow: ellipsis;
  @if $row == 1 {
    display: block;
    white-space: nowrap;
    word-wrap: normal;
  } @else if $row >= 2 {
    display: -webkit-box;
    -webkit-line-clamp: $row;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
  }
}

::ng-deep .rightDrawer-albumbox {
  height: 100%;
  overflow: hidden;
  .mat-tab-labels {
    .mat-tab-label {
      width: 50%;
    }
  }
}

.select-filebox {
  display: flex;
  flex-flow: column;
  margin: 10px;
  padding: 10px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-size: 0.9em;
  @media screen and (max-width: #{$tablet-s-width}), (max-height: 800px) {
    display: none;
  }
  .select-file {
    color: #212121;
    border-bottom: 1px dotted #dddddd;
    text-align: center;
    padding-bottom: 10px;
  }
  ul {
    padding-top: 10px;
    li {
      @include ellipsis(1);
      &.name {
        font-weight: 600;
      }
    }
  }
  .empty-msg {
    display: inline-flex;
    flex-flow: column;
    margin: auto 0;
    align-items: center;
    justify-content: center;
    color: #999999;
    span {
      padding: 6px;
    }
  }
}

.search-list {
  display: flex;
  padding: 0 10px;
  height: calc(100% - 450px);
  @media screen and (max-width: #{$tablet-s-width}), (max-height: 800px) {
    margin-top: 10px;
    height: calc(100% - 170px);
  }
  overflow-y: auto;
  flex-wrap: wrap;

  .img-item {
    cursor: pointer;
    margin-bottom: 10px;
    position: relative;
    dl {
      dt {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 90px;
        background-color: #efefef;
        border: 1px dotted #cccccc;
        box-sizing: border-box;
        img {
          width: 100%;
          height: 100%;
        }
      }
      dd {
        .btn-download {
          margin-left: auto;
          height: 40px;
        }
      }
    }
  }
}

::ng-deep .album-scrollbar {
  .ps {
    .ps-content {
      display: flex;
      flex-flow: wrap;
      height: auto;
      justify-content: stretch;
      align-content: space-between;
      width: 100%;
      .img-item {
        cursor: pointer;
        margin-bottom: 10px;
        position: relative;
        width: 32%;
        margin-right: 2%;
        &:nth-child(3n + 0) {
          margin-right: 0;
        }
      }
    }
  }
}
.preview-image,
.preview-video {
  max-height: 140px;
}

.btn-box {
  position: absolute;
  bottom: 0;
  height: 50px;
  margin-bottom: 10px;
  width: 100%;
  button {
    margin: 5px;
    font-size: 0.9em;
    padding: 0 12px;
  }
}

.spinner {
  width: 100%;
  height: 100%;
  position: absolute;
  padding: 15px 0;
  background: rgb(255, 255, 255, 0.6);
  display: table;
  text-align: center;

  span {
    display: table-cell;
    vertical-align: middle;
    color: #666666;
  }
}
