.home {
  height: 100vh;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;

  .atouch {
    transition: all .3s;

    &:active {
      transform: scale(.9);
    }
  }

  .cursor {
    cursor: pointer;
  }

  .title {
    font-size: 18px;
    color: rgba(0, 0, 0, .6);
    font-weight: bold;
    margin-bottom: 6px;
    letter-spacing: 1px;
    font-style: italic;
  }

  .opts {
    display: flex;
    justify-content: center;
    padding: 2px 2px;
    border-radius: 10px;
    background: rgba(238, 238, 238, .6);
    margin-bottom: 6px;

    .opt-scroll {
      display: flex;
      align-items: center;
      overflow-x: auto;
      padding: 0 10px;
    }

    .opt-item {
      display: flex;
      align-items: center;
      align-self: stretch;
      padding: 2px 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #5d5de9;
      color: #fff;
      font-size: 12px;
      border-radius: 10px;
      white-space: nowrap;

      &:not(:last-child) {
        margin-right: 10px;
      }
    }
  }

  .buildBox {
    flex: 2;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    overflow: hidden;

    .title {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .buildNoticeBox {
      flex: 1;
      height: 280px;
      border: 1px solid #000;
      position: relative;

      .unreadChatMsg {
        white-space: nowrap;
        position: absolute;
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 4px 6px;
        background-color: #76d214;
        color: #fff;
        border-radius: 4px;
        cursor: pointer;
      }

      .buildNoticeBoxScroll {
        height: 100%;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        box-sizing: border-box;
      }

      .msg-item {
        margin-bottom: 10px;

        .item-name {
          font-size: 12px;
          color: #000;
          display: flex;
          align-items: center;

          .item-name-txt {
            color: #ce2828;
            margin-right: 4px;

            .name-txt-branch {
              color: #3d42d2;
            }
          }
        }

        .item-ctx-wrap {
          background-color: #eee;
          padding: 5px;
          margin: 5px 0;

          .item-info {
            font-size: 12px;
            color: #000;
          }

          .item-msg {
            width: 100%;
            padding: 4px 6px;
            background-color: #000;
            font-size: 12px;
            color: #fff;
            border-radius: 4px;
            white-space: break-spaces;
            max-height: 250px;
            overflow-y: auto;
            box-sizing: border-box;
            margin: 5px 0;
            word-break: break-all;
          }

          .status {
            font-size: 12px;
            padding: 4px 6px;
            border-radius: 4px;
            text-align: center;

            &.status-1 {
              background-color: #5de9d2;
              color: #000;
            }

            &.status-2 {
              background-color: #008000;
              color: #fff;
            }

            &.status-3 {
              background-color: #ce2828;
              color: #fff;
            }
          }
        }
      }
    }
  }

  .chatBox {
    flex: 3;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    .msgBox {
      flex: 1;
      height: 300px;
      border: 1px solid #000;
      position: relative;

      .unreadChatMsg {
        white-space: nowrap;
        position: absolute;
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 4px 6px;
        background-color: #76d214;
        color: #fff;
        border-radius: 4px;
        cursor: pointer;
      }

      .msgBoxScroll {
        height: 100%;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        box-sizing: border-box;
      }

      .msg-item {
        margin-bottom: 10px;
        max-width: 80%;
        display: flex;
        flex-direction: column;
        align-self: flex-start;
        align-items: flex-start;

        .item-name {
          font-size: 12px;
          color: #000;
          display: flex;
          align-items: center;

          .item-name-txt {
            color: #ce2828;
            margin-right: 4px;
          }
        }

        .item-msg {
          padding: 4px 6px;
          background-color: #5d5de9;
          color: #fff;
          border-radius: 4px;
          white-space: break-spaces;
          box-sizing: border-box;
          word-break: break-all;
          margin: 5px 0;
        }

        .item-imgs {
          margin: 5px 0;

          img,
          video {
            width: 70px;
            height: 70px;
            border-radius: 5px;
            object-fit: contain;
            background-color: rgba(225, 225, 225, .6);
            padding: 5px;
            display: block;

            &+img {
              margin-top: 10px;
            }
          }

          video {
            object-fit: cover;
          }
        }
      }

      .msg-item-self {
        align-self: flex-end;
        align-items: flex-end;

        .item-msg {
          background-color: #489dbc;
          align-self: flex-end;
          margin: 5px 0;
        }
      }
    }

    .command-list {
      display: flex;
      align-items: center;
      // justify-content: space-between;
      margin-top: 10px;

      &>div {
        margin-left: 5px;
      }

      .commands {
        width: 200px;
      }

      .aad-img {
        width: 100px;
        height: 20px;
        border-radius: 10px;
        background-color: hwb(70 6% 28%);
        color: #fff;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;

        input {
          width: 100%;
          height: 100%;
          border-radius: 10px;
          opacity: 0;
          position: absolute;

        }
      }

      .aad-build {
        background-color: #5574da;
      }
    }


    .textareaBox {
      margin-top: 10px;
      min-height: 40px;
      max-height: 100px;
      position: relative;

      .textarea-auto-height {
        min-height: 100%;
        opacity: 0;
      }

      .textarea-ctx {
        position: absolute;
        z-index: 1;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: flex-start;

        &>:not(:first-child) {
          margin-left: 10px;
        }

        textarea {
          flex: 1;
          resize: none;
          box-sizing: border-box;
          padding: 4px 6px;
          outline: none;
          border-radius: 4px;
          align-self: stretch;

          &:focus {
            border: 1px solid #5d5de9;
          }
        }

        .btn-send {
          border: none;
          background-color: #5d5de9;
          color: #fff;
          padding: 4px 10px;
          border-radius: 4px;
          font-size: 12px;
          width: 80px;
          height: 40px;
        }

        .btn-disabled {
          pointer-events: none;
          filter: grayscale(100%);
        }
      }

    }
  }




  @keyframes sacale {
    0% {
      transform: scale(0.5);
    }

    50% {
      transform: scale(1);
    }
  }

  .showImg {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;

    .prewiew {
      overflow-y: auto;
      max-height: 100%;
      width: 100%;
    }

    img,
    video {
      // max-width: 100%;
      // max-height: 100%;
      display: block;
      width: 100%;
      // object-fit: contain;
      animation: sacale 0.6s both;
    }

    .exit {
      width: 30px;
      height: 30px;
      color: #fff;
      font-size: 18px;
      border: 1px solid #fff;
      position: fixed;
      right: 20px;
      top: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .pkgBox {
    position: fixed;
    display: flex;
    justify-content: center;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .8);
    padding: 120px 20px 130px;
    z-index: 1000;

    .pkgBox-cnt {
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      width: 100%;
    }

    .pkgBox-title {
      color: #fff;
      font-size: 18px;
      margin-bottom: 10px;
    }

    .pkgBox-ipt {
      margin-bottom: 20px;

      input {
        width: 100%;
        box-sizing: border-box;
        padding: 4px 6px;
        outline: none;
        border-radius: 4px;
      }

      &:focus {
        border: 1px solid #5d5de9;
      }
    }

    .pkgBox-list {
      flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      // align-content: flex-start;
      // flex-wrap: wrap;

      .pkgBox-list-item {
        padding: 2px 10px;
        background-color: #eee;
        color: #000;
        border-radius: 4px;
        font-size: 14px;
        margin: 0 5px 10px 0;
        white-space: nowrap;
        font-weight: bold;
      }

      .active {
        background-color: #5d5de9;
        color: #fff;
      }
    }

    .btn-build {
      margin-top: 50px;
      padding: 5px 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #5d5de9;
      color: #fff;
      font-size: 14px;
      border-radius: 4px;
    }

    .exit {
      width: 30px;
      height: 30px;
      color: #fff;
      font-size: 18px;
      border: 1px solid #fff;
      position: fixed;
      right: 20px;
      top: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .logBox {
    position: fixed;
    display: flex;
    justify-content: center;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .8);
    padding: 120px 20px 130px;
    z-index: 1000;

    .pkgBox-cnt {
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      width: 100%;
    }

    .pkgBox-title {
      color: #fff;
      font-size: 18px;
      margin-bottom: 10px;
    }

    .tabs {
      display: flex;
      justify-content: center;
      margin: 10px 0 30px;
      background-color: #eee;
      border-radius: 10px;
      padding: 5px;

      .tab-item {
        flex: 1;
        padding: 6px 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #fff;
        color: #000;
        font-size: 14px;
        border-radius: 10px;

        &:not(:first-child) {
          margin-left: 10px;
        }
      }

      .active {
        background-color: #5d5de9;
        color: #fff;
      }
    }

    .pkgBox-list {
      flex: 1;
      overflow-y: auto;
      // align-content: flex-start;
      // flex-wrap: wrap;

      .pkgBox-list-item {
        padding: 2px 10px;
        background-color: #eee;
        color: #000;
        border-radius: 4px;
        font-size: 14px;
        margin: 0 0 10px 0;
        font-weight: bold;
        word-break: break-all;

        a {
          color: #000;
        }
      }

      .active {
        background-color: #5d5de9;
        color: #fff;
      }
    }

    .exit {
      width: 30px;
      height: 30px;
      color: #fff;
      font-size: 18px;
      border: 1px solid #fff;
      position: fixed;
      right: 20px;
      top: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}

@media screen and (min-width: 1000px) {
  .home {
    // align-items: stretch;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 20px 60px 100px;
    align-content: flex-start;

    .opts {
      width: 100%;
      margin-bottom: 15px;
    }

    .buildBox {
      height: 100%;
      margin-right: 20px;

      .buildNoticeBox {
        flex: 1;
      }
    }

    .chatBox {
      height: 100%;

      .msgBox {
        flex: 1;
      }
    }

    .showImg {
      .prewiew {
        max-width: 50%;
      }
    }

    .pkgBox,
    .logBox {
      .pkgBox-cnt {
        max-width: 800px;
      }
    }
  }
}