.form-inline {
  display: inline-block;
}
.media-wrap {
  display: flex;
  &-left {
    flex: 1;
    min-width: 1px;
    padding: 20px;
    border-right: 1px solid #ccc;
  }
  &-right {
    width: 340px;
    margin: 20px;
    &-box {
      opacity: 0;
    }
  }
}
.media-lists {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}
.media-item {
  width: calc(11.111% - 20px);
  margin: 0 10px 10px 10px;
  border: 2px solid transparent;
  cursor: pointer;
  > * {
    user-select: none;
  }
  &.media-dialog-item {
    width: calc(16.666% - 20px);
  }
  &.on {
    border-color: #1292f8;
  }
  &-img {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    background: #ebebeb;
    overflow: hidden;
    img,
    video {
      position: absolute;
      object-fit: scale-down;
      width: 100%;
      height: 100%;
    }
    &:before {
      content: "";
      position: absolute;
      z-index: 2;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
    }
    &:hover {
      .actions {
        opacity: 1;
        transform: translateY(0);
      }
    }
    > i {
      width: 40px;
      height: 40px;
      border: 2px solid #fff;
      font-size: 16px;
      color: #fff;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: auto;
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
    }
  }
  .actions {
    position: absolute;
    left: 0;
    width: 100%;
    bottom: 0;
    z-index: 99;
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 10px;
    transition: all 0.5s;
    opacity: 0;
    transform: translateY(100%);
    i {
      color: #fff;
      cursor: pointer;
      &:hover {
        color: #1292f8;
      }
    }
  }
  p {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.8;
  }
}

.media-preview {
  &-img {
    position: relative;
    padding-bottom: 75%;
    img,
    video {
      width: 100%;
      height: 100%;
      object-fit: scale-down;
      position: absolute;
    }
    > i {
      z-index: 11;
      width: 40px;
      height: 40px;
      border: 2px solid #fff;
      font-size: 16px;
      color: #fff;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: auto;
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
    }
  }
  &-list {
    margin-top: 20px;
    border-top: 1px solid #efefef;
    padding-top: 20px;
    li {
      display: flex;
      justify-content: space-between;
      line-height: 2;
      font-size: 14px;
      span {
        width: 70%;
        text-align: right;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
      .media-preview-url {
        line-height: 1;
        padding: 5px 10px;
        border: 1px solid #0a9ada;
        border-radius: 5px;
        width: auto !important;
        cursor: pointer;
        &:hover {
          background: #0a9ada;
          color: #fff;
        }
      }
    }
  }
}

.space-use {
  display: flex;
  align-items: center;
  margin-top: 10px;
  span {
    color: #1292f8;
  }
  p + p {
    margin-left: 10px;
  }
}

.media-paginate {
  display: flex;
  align-items: center;
  justify-content: center;
}

#media-preview-modal {
  .modal-dialog {
    width: 1000px !important;
  }
  .modal-body {
    height: 500px;
    position: relative;
    padding: 0;
    margin: 20px;
    img,
    video {
      position: absolute;
      object-fit: scale-down;
      width: 100%;
      height: 100%;
    }
  }
}

#upload-list {
  width: 360px;
  z-index: 9999;
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-height: 200px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  -webkit-box-shadow: 0 6px 6px 0 rgba(22, 45, 61, 0.06),
    0 0 18px 0 rgba(22, 45, 61, 0.12);
  box-shadow: 0 6px 6px 0 rgba(22, 45, 61, 0.06),
    0 0 18px 0 rgba(22, 45, 61, 0.12);
  -webkit-transition: height 0.3s;
  transition: height 0.3s;
}

#upload-list .title {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  height: 45px;
  padding: 0 12px 0 18px;
  background: #162d3d;
  position: relative;
  color: #fff;
}

#upload-list .title span {
  position: absolute;
  top: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 400;
  opacity: 1;
  display: block;
  line-height: 45px;
  right: 12px;
}

#upload-list ul {
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
}

#upload-list ul::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

#upload-list ul::-webkit-scrollbar-track {
  background: #fff;
  border-radius: 2px;
}

#upload-list ul::-webkit-scrollbar-thumb {
  background: #bee0fc;
  border-radius: 5px;
}

#upload-list ul::-webkit-scrollbar-corner,
#upload-list ul::-webkit-scrollbar-thumb:hover {
  background: #83c5fa;
}

#upload-list ul li {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  overflow: hidden;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border-bottom: 1px solid #f0f4f7;
  line-height: normal;
  cursor: pointer;
}

#upload-list ul li .img {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 12px;
}

#upload-list ul li .img img {
  width: 24px;
  height: 24px;
}

#upload-list ul li .name {
  width: 192px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#upload-list ul li .size {
  color: #7a92a5;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

#upload-list ul li .state {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin-left: 10px;
}

#upload-list ul li .state i {
  color: #2b81cb;
  font-size: 22px;
  margin-top: 3px;
}

#upload-list ul li .state img {
  width: 18px;
  height: 18px;
}

#file-upload .preview {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  outline: 0;
  padding-right: 17px;
  display: none;
}

.media-list-loading {
  display: none;
  justify-content: center;
  img {
    width: 40px;
  }
}

#media-dialog-modal .modal-dialog {
  width: 1000px !important;
  .media-wrap {
    height: 400px;
    overflow: hidden;
    &-left {
      height: 100%;
      overflow-x: hidden;
      &::-webkit-scrollbar {
        width: 5px;
      }
      &::-webkit-scrollbar-thumb {
        background-color: rgba(129, 129, 129, 0.6);
        border-radius: 5px;
      }
      &::-webkit-scrollbar-thumb:hover {
        background-color: rgba(129, 129, 129, 0.5);
      }
    }
  }
  .modal-body {
    padding: 0;
  }
}
.modal-header {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  height: 75px;
  .close {
    position: absolute;
    right: 20px;
    top: 20px;
    float: none;
  }
}
.modal-header-form {
  display: flex;
  align-items: center;
  margin-left: 20px;
  .btn {
    outline: none !important;
    border: none;
  }
  .form-group {
    margin: 0;
  }
}

.select-box {
  position: absolute;
  border: 1px dashed #0099ff;
  background-color: #c3d5ed;
  opacity: 0.6;
  z-index: 9999;
  display: none;
}

.upload-wrap-lists .thumbnail-img {
  position: relative;
  font-size: 0;
  i {
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    font-size: 14px;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
  }
}
