/* subject */
.subject-list {
  position: absolute;
  z-index: 9;
  width: 100%;
  height: 260px;
  top: 50%;
  margin-top: -130px;
  color: @fontMain;
  ul {
    font-size: 0;
    text-align: center;
  }
  li {
    position: relative;
    display: inline-block;
    vertical-align: top;
    top: 0;
    width: 200px;
    height: 260px;
    font-size: 24px;
    border-radius: 30px;
    background-color: #4e7cff;
    background-image: url(../images/subject-back-one.png);
    background-size: 159px 189px;
    background-position: 13px 32px;
    background-repeat: no-repeat;
    margin: 0 20px;
    transition: top 0.2s linear;
    cursor: pointer;

    &:hover {
      box-shadow: 0px 4px 0px 0px rgba(255, 255, 255, 0.1);
      top: 10px;
      .subject-icon {
        display: block;
      }
    }

    &:nth-of-type(2) {
      background-color: @purple;
      background-image: url(../images/subject-back-two.png);
    }
    &:nth-of-type(3) {
      background-color: @pink;
      background-image: url(../images/subject-back-three.png);
    }
  }
  .subject-name {
    position: absolute;
    bottom: 32px;
    left: 32px;
    z-index: 9;
  }
  .subject-icon {
    position: absolute;
    width: 12px;
    height: 10px;
    background-image: url(../images/icon-arrow-right.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    right: 32px;
    bottom: 32px;
    display: none;
  }
}

/* camera */
.camera-form {
  width: 400px;
  padding-top: 80px;
  margin: 0 auto;
  .ivu-input {
    text-align: center;
    padding: 20px;
    height: 60px;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
  }
  .icon.ivu-icon-scan {
    margin-top: 20px;
    margin-left: -10px;
  }
}
.camera-write {
  text-align: center;
  margin-top: 50px;
}
.camera-write:hover {
  color: @subColor;
}
.camera-btn {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 220px;
  margin-left: -110px;
}

/* setting-steps */
.scan-area-steps {
  .step-body {
    position: relative;
    padding: 0 30px;
    margin-bottom: 40px;
    min-height: 400px;
  }
  .step-ctrl {
    text-align: center;
    padding-bottom: 30px;

    > button {
      width: 160px;
      height: 44px;
    }
  }
}
/* code-area */
.code-area {
  min-height: 458px;
  &-cont {
    position: relative;
    width: 610px;
    box-shadow: 0px 40px 40px 0px rgba(4, 5, 17, 0.3);
    &-disabled::before {
      content: "";
      display: block;
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      z-index: 99;
    }
    &-disabled .cropper-container > .cropper-modal,
    &-disabled .cropper-container > .cropper-crop-box {
      display: none;
    }
  }
  &-cont img {
    display: block;
    width: 100%;
  }
  &-preview {
    position: absolute;
    width: 240px;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
  }
  &-spin {
    height: 240px;
    position: relative;
  }
  &-spin-img {
    position: absolute;
    width: 240px;
    height: 160px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    box-shadow: 0px 40px 40px 0px rgba(4, 5, 17, 0.3);
  }
  &-icon {
    margin: 20px auto 0;
    text-align: center;
    line-height: 36px;
    &:hover {
      background-color: @blue;
    }
  }
}
/* rotate-icon */
.rotate-icon {
  width: 40px;
  height: 40px;
  border: 2px solid @blue;
  border-radius: 16px;
  padding: 10px;
  cursor: pointer;
  &::before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    background-size: 100% 100%;
  }
  &-left {
    &::before {
      background-image: url(../images/icon-rotate-left.png);
    }
    &:hover::before {
      background-image: url(../images/icon-rotate-left-act.png);
    }
  }
  &-right {
    &::before {
      background-image: url(../images/icon-rotate-right.png);
    }
    &:hover::before {
      background-image: url(../images/icon-rotate-right-act.png);
    }
  }

  &:hover {
    background-color: @blue;
  }
}
/* .cropper-line */
.cropper {
  &-modal {
    opacity: 0.7;
  }
  &-line {
    background-color: @blue;
    opacity: 1;
    &.line-e {
      right: -2px;
      top: 3px;
      bottom: 3px;
      width: 2px;
    }
    &.line-n {
      height: 2px;
      top: -2px;
      left: 3px;
      right: 3px;
    }
    &.line-w {
      left: -2px;
      top: 3px;
      bottom: 3px;
      width: 2px;
    }
    &.line-s {
      height: 2px;
      bottom: -2px;
      left: 3px;
      right: 3px;
    }
  }
  &-point {
    background-color: rgba(51, 51, 51, 0.7);
    border: 2px solid @blue;
    border-radius: 50%;
    opacity: 1;
    width: 10px !important;
    height: 10px !important;

    &.point-e {
      margin-top: -5px;
      right: -6px;
    }
    &.point-w {
      margin-top: -5px;
      left: -6px;
    }
    &.point-n {
      margin-left: -5px;
      top: -6px;
    }
    &.point-s {
      margin-left: -5px;
      bottom: -6px;
    }
    &.point-ne {
      top: -6px;
      right: -6px;
    }
    &.point-nw {
      top: -6px;
      left: -6px;
    }
    &.point-sw {
      bottom: -6px;
      left: -6px;
    }
    &.point-se {
      bottom: -6px;
      right: -6px;
    }
  }
}

/* cover-area */
.cover-area {
  .code-area-preview {
    position: absolute;
    height: 100%;
    top: 0;
    transform: none;
  }
  .code-area-spin {
    height: 100%;
  }
  .code-area-spin-img {
    height: 100%;
  }
}

/* tailor-area */
.tailor-area .code-area-cont {
  width: 100%;
  height: 400px;
}
/* image-orientation */
.image-orientation {
  padding: 0 40px;
  .image-orient-cont {
    width: 450px;
    height: 450px;
    margin: 0 auto;
    position: relative;
  }
  .image-orient-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    &:first-child {
      left: 32px;
    }
    &:last-child {
      right: 32px;
    }
  }
}

/* waiting */
.waiting {
  padding: 50px 20px;
  text-align: center;
  font-size: 24px;

  > i {
    font-size: 40px;
  }
}
/* scan-wait */
.scan-wait {
  padding-top: 200px;
  text-align: center;
  button {
    margin: 0 10px;
  }
}
/* check-info */
.check-info {
  .check-form {
    padding-top: 80px;
    width: 400px;
    margin: 0 auto;
  }
  .check-action {
    margin-top: 212px;
    text-align: center;
    > button {
      height: 44px;
      width: 160px;
    }
  }
}
.check-result {
  text-align: center;
  &-item {
    display: inline-block;
    vertical-align: top;
    width: 200px;
    height: 144px;
    border-radius: 20px;
    border: 2px solid rgba(59, 66, 122, 1);
    color: @fontSub;
    position: relative;
    padding: 32px 15px;
    &:first-child {
      margin-right: 10px;
    }
    > i {
      position: absolute;
      top: 20px;
      left: 20px;
    }

    > h4 {
      font-size: 18px;
      margin-bottom: 10px;
    }
    > p {
      font-size: 32px;
      font-weight: 500;
      color: @fontMain;
      line-height: 45px;
    }
  }
}

/* scan */
.scan {
  // &-back {
  //   position: fixed;
  //   width: 220px;
  //   height: 70px;
  //   padding: 20px 32px;
  //   top: 0;
  //   left: 0;
  //   z-index: 999;
  //   background-color: #202442;
  // }
  &-task {
    position: fixed;
    width: 220px;
    left: 0;
    top: 70px;
    bottom: 0;
    z-index: 200;
    padding: 20px 20px 76px;
    border-top-right-radius: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #202442;

    .task-item {
      padding: 12px 10px 12px 58px;
      color: @fontSub;
      border-radius: 10px;
      background-color: @backgroundLight;
      position: relative;
      margin-bottom: 10px;

      &-icon {
        position: absolute;
        top: 12px;
        left: 10px;
        width: 38px;
        height: 38px;
        line-height: 38px;
        text-align: center;
        background: rgba(53, 60, 112, 1);
        border-radius: 12px;
      }
      > p {
        &:nth-of-type(2) {
          line-height: 16px;
        }
      }

      &.task-over {
        p:nth-of-type(1) {
          color: @fontMain;
        }
      }
    }
    &-action {
      position: fixed;
      width: 220px;
      left: 0;
      bottom: 0;
      background-color: #2d325a;
      padding: 20px 10px;
      text-align: center;
      > button {
        width: 85px;
        padding: 0 5px;
        &:first-child {
          margin-right: 10px;
          background: rgba(34, 192, 255, 1);

          &:hover {
            background: rgba(34, 192, 255, 0.9);
          }
        }
      }
    }
  }

  &-history {
    position: fixed;
    top: 70px;
    width: 220px;
    bottom: 0;
    right: 0;
    z-index: 99;
    padding: 20px;
    border-top-left-radius: 20px;
    background-color: #202442;
    overflow-y: auto;
    overflow-x: hidden;
    .history-item {
      margin-bottom: 16px;

      &-title {
        margin-top: 6px;
        color: @fontSub;
        overflow: hidden;
        span {
          float: right;
          &:first-child {
            color: @fontMain;
            float: left;
          }
        }
      }
      &-body img {
        display: block;
        width: 100%;
        height: auto;
      }
    }
  }

  &-image {
    margin: 0 260px;
    padding-bottom: 18px;
  }

  &-main {
    height: 456px;
    background: @backgroundLight;
    margin-bottom: 20px;
    position: relative;
  }

  /* scan-wariting */
  &-waiting {
    padding-top: 140px;
    border-radius: 20px;
    &-icon {
      width: 233px;
      height: 229px;
      background-image: url(../images/camera.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
      margin: 0 auto;
    }
  }

  /* scan-picture */
  &-picture {
    box-shadow: 0px 20px 30px 0px rgba(0, 0, 0, 0.1);
  }
  // scan-info
  &-info {
    margin-top: 20px;
    overflow: hidden;
    line-height: 36px;
    p {
      float: left;
    }
    &-cont {
      margin-right: 20px;

      > span {
        color: @fontMain;
        &:first-child {
          color: @fontSub;
        }
      }
    }
    &-scan {
      &::before {
        content: "";
        display: inline-block;
        vertical-align: middle;
        border-radius: 50%;
        width: 10px;
        height: 10px;
        border: 2px solid rgba(65, 205, 125, 1);
        margin-right: 8px;
      }
    }
    &-upload {
      &::before {
        content: "";
        display: inline-block;
        vertical-align: middle;
        border-radius: 50%;
        width: 10px;
        height: 10px;
        border: 2px solid #f65164;
        margin-right: 10px;
      }
    }
  }
  &-reset-area {
    float: right;
  }
}
.line-scan {
  .scan-image {
    margin-left: 40px;
  }
  .scan-student {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 8px 20px;
    background-color: #41cd7d;
    color: @fontMain;
    line-height: 20px;
    border-radius: 10px;
    opacity: 0.9;
    z-index: 99;

    span:first-child {
      margin-right: 10px;
    }
  }
}

/* scan-exception-dialog */
.scan-exception-dialog {
  .exception-body {
    position: relative;
    width: 944px;
    margin: 0 auto;
    border-radius: 20px;
    background-color: #2e325a;
    padding: 0 30px 30px;
  }
  .exception-title {
    position: relative;
    font-size: 18px;
    padding: 20px 0;
    line-height: 24px;
    > i {
      margin-right: 10px;
    }
  }
  .exception-back {
    position: absolute;
    width: 30px;
    height: 30px;
    color: #929396;
    font-size: 30px;
    top: 20px;
    right: 20px;
    z-index: 99;
    cursor: pointer;
    > i {
      vertical-align: top;
    }
    &:hover {
      color: @pink;
    }
  }
  .exception-code-area {
    margin-bottom: 32px;
  }
  .exception-footer {
    overflow: hidden;
  }
  .exception-form {
    float: left;
  }
  .exception-search {
    width: 30px;
    font-size: 20px;
    color: @fontSub;
    vertical-align: middle;
    cursor: pointer;
    &:hover {
      color: @fontMain;
    }
  }
  .exception-actions {
    float: right;
    > button {
      margin: 0 5px;
      font-weight: 500;
    }
  }
  // ivu
  .ivu-modal-header {
    display: none;
  }
  .ivu-modal-body {
    top: 0 !important;
    padding: 56px 40px;
  }
  .ivu-modal-content {
    background: #25294a !important;
  }
  .ivu-icon-scan {
    margin-top: 8px;
    margin-right: 5px;
  }
}

/* scan-area-dialog */
.scan-area-dialog {
  .ivu-modal-content {
    background: #25294a !important;
  }
  .ivu-modal-body {
    top: 62px !important;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }

  50% {
    opacity: 1;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

.zoomIn {
  animation-name: zoomIn;
  animation-duration: 0.2s;
}
.fadeIn {
  animation-name: fadeIn;
  animation-duration: 0.2s;
}
