// tips
.cc-tips-error {
  color: $--color-danger;
}
.cc-tips-success {
  color: $--color-success;
}

// image-edit-upload
.image-edit-upload {
  position: relative;
  height: 400px;
  background: #fff;
  padding-bottom: 30px;
  box-sizing: content-box;
}
.cc-edit-upload {
  &-main {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 8;

    .el-upload-dragger {
      height: auto;
    }
    .el-upload-input {
      display: none;
    }
  }
  &-cover {
    height: 400px;
    > img {
      display: block;
      height: 100%;
      width: auto;
      margin: 0 auto;
    }
  }
  &-dcover {
    padding: 109px 0;
    > i {
      font-size: 160px;
      color: #999;
    }
  }
  &-edit {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 9;
  }

  &-edit-box {
    height: 350px;
    position: relative;
    .img-progress {
      position: absolute;
      height: 10px;
      width: 100%;
      bottom: -8px;
      left: 0;
      z-index: 7;
    }
  }
  &-btns {
    height: 50px;
    padding-top: 10px;
    text-align: center;
    button {
      margin: 0 10px;
    }
  }
  &-tips {
    position: absolute;
    top: 405px;
    left: 0;
    font-size: 14px;
    z-index: 9;
  }
}

// image-list-upload
$--cc-list-upload-pre: cc-list-upload;

.cc-list-upload {
  &-list {
    font-size: 0;
  }
  &-item {
    font-size: 14px;
    display: inline-block;
    vertical-align: top;
    margin: 20px 10px;
    border: 1px solid $--color-text-gray-6;
    height: 150px;
    width: 150px;
    position: relative;

    &-unvalid,
    &-error {
      border-color: $--color-danger;
    }
    &-success {
      border-color: $--color-success;
    }
    &-ready .#{$--cc-list-upload-pre}-action,
    &-uploading .#{$--cc-list-upload-pre}-action {
      display: none !important;
    }
    &-ready .#{$--cc-list-upload-pre}-progress,
    &-uploading .#{$--cc-list-upload-pre}-progress {
      display: block;
    }
  }
  &-box {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: auto;
  }
  &-info {
    z-index: 7;
    > img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }
  &-input {
    visibility: hidden;
  }
  &-progress {
    display: none;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    text-align: center;
    color: #000;
  }
  &-action {
    display: none;
    z-index: 8;
    background: rgba(0, 0, 0, 0.7);
    padding: 60px 5px 0;
    line-height: 30px;
    text-align: center;
    > i {
      font-size: 40px;
      color: #c0c0c0;
      cursor: pointer;
    }
    > i:hover {
      color: #fff;
    }
  }
  &-item:hover .#{$--cc-list-upload-pre}-action {
    display: block;
  }

  &-tips {
    position: absolute;
    width: 100%;
    bottom: -30px;
    text-align: center;
    line-height: 30px;
    &-error {
      color: $--color-danger;
    }
    &-success {
      color: $--color-success;
    }
  }

  &-add {
    cursor: pointer;
    > i {
      display: block;
      position: absolute;
      top: 50%;
      left: 50%;
      font-size: 60px;
      transform: translate(-50%, -50%);
      color: #999;
    }
  }
}

// image-preview
.cc-image-preview {
  &-header {
    position: absolute;
    width: 100%;
    padding: 15px;
    top: 0;
    left: 0;
    line-height: 20px;
    text-align: center;
    font-size: 16px;
    z-index: 99;
    color: #f0f0f0;
    h3 {
      position: absolute;
      left: 15px;
      z-index: auto;
    }
  }
  &-close {
    position: absolute;
    width: 30px;
    height: 30px;
    top: 5px;
    right: 15px;
    z-index: 100;
    line-height: 30px;
    text-align: center;
    font-size: 40px;
    color: #fff;
    text-shadow: 0 0 2px #333;
    cursor: pointer;

    &:hover {
      color: $--color-danger;
    }
  }
  &-body {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: auto;
    overflow: hidden;
  }
  &-imgs {
    position: absolute;
    top: 0;
    left: 50%;
    width: 600px;
    margin-left: -300px;
    // box-shadow: 0px 24px 36px 0px rgba(0, 0, 0, 0.3);
    transition: width, height, transform 0.2s linear;
    z-index: 8;
    &-nosition {
      transition: none;
    }
    &-move {
      cursor: move;
    }
    > img {
      display: block;
      width: 100%;
    }
  }
  &-guide {
    position: absolute;
    width: 80px;
    height: 80px;
    line-height: 80px;
    top: 50%;
    margin-top: -80px;
    text-align: center;
    color: #d0d0d0;
    z-index: 9;
    font-size: 60px;
    text-shadow: 0 0 2px #333;
    cursor: pointer;

    &:hover {
      color: #eee;
    }
    > i {
      margin-top: -5px;
    }
    &-prev {
      left: 0;
    }
    &-next {
      right: 0;
    }
  }
  &-footer {
    position: absolute;
    height: 60px;
    bottom: 0;
    right: 0;
    padding: 10px;
    font-size: 30px;
    color: #d0d0d0;
    z-index: 99;
    li {
      display: inline-block;
      vertical-align: top;
      height: 40px;
      width: 40px;
      line-height: 40px;
      margin: 0 5px;
      text-align: center;
      cursor: pointer;
      transition: transform 0.2s linear;
    }
    li:hover {
      // color: #000;
      transform: scale(1.1, 1.1);
    }
    li.li-disabled {
      cursor: not-allowed;
      color: #d0d0d0 !important;
      transform: none !important;
    }
  }

  &-loading {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 0;
    left: 50%;
    margin: 0 0 0 -30px;
    color: $--color-border;
    font-size: 50px;
    text-align: center;
    line-height: 60px;
    z-index: 99;
  }

  &-preload {
    position: absolute;
    z-index: 9;
    width: 100px;
    height: 100px;
    overflow: hidden;
    top: -1000px;
    left: -1000px;
  }

  &-none {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e0e0e0;
    text-align: center;
    font-size: 20px;
    > i {
      font-size: 30px;
    }
  }

  // view-ui
  .ivu-modal-content {
    background: transparent;
  }
  .ivu-modal-header {
    display: none;
  }
  .ivu-modal-body {
    top: 0;
  }
  .ivu-modal-close {
    display: none;
  }
  .ivu-modal-mask {
    background: rgba(55, 55, 55, 0.8);
  }
}

// import-file
.cc-import-file {
  &-tips {
    min-height: 20px;
    max-height: 160px;
    line-height: 20px;
    overflow: hidden;
  }
  &-footer {
    padding: 0 0 10px 0;
    font-size: 14px;
    a,
    .el-button--text {
      color: $--color-primary;
      &:hover {
        opacity: 0.9;
      }
    }
  }

  .el-dialog {
    &__body {
      background-color: $--color-background;
      padding: 20px;
    }
    &__footer {
      padding: 15px 20px;
    }
  }
}

// rich-editor
.cc-editor {
  .ql-editor {
    max-height: 500px !important;
    height: 300px;
    overflow: auto;
  }
}

// label-select
$--cc-labels-pre: cc-labels;
.cc-labels {
  margin-bottom: 8px;

  &-label {
    display: block;
    float: left;
    height: 24px;
    line-height: 24px;
    font-size: 14px;
    padding-right: 20px;
    font-weight: 600;
  }
  &-options {
    margin-left: 60px;
    li {
      display: inline-block;
      vertical-align: top;
      margin: 0 5px 5px 0;
      height: 24px;
      line-height: 24px;
      padding: 0 10px;
      border-radius: 3px;
      cursor: pointer;
    }
    li:hover {
      color: #409eff;
    }
    li.#{$--cc-labels-pre}-selected {
      background: #409eff;
      color: #fff;
    }
    li.#{$--cc-labels-pre}-disabled {
      color: #909399;
      cursor: not-allowed;
    }
  }
}

// drag-table
.drag-table {
  th,
  td {
    padding: 10px;
  }
  .after-drop {
    td {
      border-bottom: 2px solid $--color-primary;
    }
  }
  .before-drop {
    td {
      border-top: 2px solid $--color-primary;
    }
  }
  .drag-handle {
    padding: 5px;
    cursor: move;

    i {
      color: #8b8fa1;
      transform: rotate(90deg);
    }
    &:hover i {
      color: #3a5ae5;
    }
  }
}
// org-select
.org-select {
  width: 220px;
}
.org-popover {
  &.el-popover {
    width: 400px;
    padding: 0;
  }

  &-tree {
    max-height: 300px;
    overflow: auto;
    padding: 5px 0;
  }

  .custom-tree-node {
    .el-icon-check {
      display: none;
    }

    &.is-select {
      color: #3a5ae5;
      .el-icon-check {
        display: block;
      }
    }

    &.is-disabled {
      cursor: not-allowed;
      color: $--color-text-gray-3;
    }
  }
  .el-tree-node__content {
    height: auto;
    min-height: 26px;
  }
}

// one-date-time-range
.one-date-time-range {
  .el-date-editor--date {
    width: 120px;
    .el-input__inner {
      padding-right: 10px;
    }
  }
  .el-date-editor--time {
    width: 75px;
    .el-input__inner {
      padding: 0 10px;
    }
    .el-input__prefix,
    .el-input__suffix {
      display: none;
    }
  }
}
