@import '../../core/variables.less';
@top-height: 50px;
@icon-color:#939393;
.top-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: @top-height;
  background-color: #FFF;
  z-index: 112;
.logo{
  display: block;
  height: 24px;
  margin-left: 20px;
}
  .top {
    display: flex;
    display: -webkit-flex;
    flex-direction: row;
    -webkit-flex-direction: row;
    align-items: center;
    -webkit-align-items: center;
    padding: 0 24px 0 0;
    height: 100%;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    border-bottom:1px solid @xm-color-border;
    .backCenter{
      color:rgba(0,0,0,1);
      font-size: 16px;
    }
    .top-left {
      display: flex;
      display: -webkit-flex;
      align-items: center;
      -webkit-align-items: center;
      height: 100%;
      min-width: 200px;
      padding-left: 20px;
      box-sizing: content-box;
      .org-logo-box {
        display: flex;
        display: -webkit-flex;
        flex-direction: row;
        -webkit-flex-direction: row;
        align-items: center;
        -webkit-align-items: center;
        justify-content: center;
        -webkit-justify-content: center;
        position: relative;
        .logo {
          width: 40px;
          height: 40px;
          border-radius: 50%;
          overflow: hidden;
          cursor: pointer;
          position: relative;
          img {
            width: 100%;
            height: 100%;
          }
          .edit {
            position: absolute;
            width: 40px;
            height: 0;
            top: 0;
            left: 0;
            overflow: hidden;
            color: #ffffff;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
          }
          &:hover {
            .edit {
              height: 40px;
              background: rgba(0, 0, 0, 0.3);
              .icon {
                font-size: 20px;
              }
            }
          }
        }
        .name-box {
          flex: 1;
          -webkit-flex: 1;
          margin-left: 10px;
          position: relative;
          cursor: pointer;
          .area-list {
            width: 128px;
            position: absolute;
            top: 100%;
            left: 0;
            height: 0;
            overflow-y: hidden;
            border-radius: 4px;
            padding: 4px 0;
            -webkit-transition: all .3s;
            -moz-transition: all .3s;
            -ms-transition: all .3s;
            -o-transition: all .3s;
            transition: all .3s;
            li {
              margin: 2px 10px;
              font-size: 12px;
              color: #ffffff;
            }
          }
          &:hover {
            .area-list {
              height: auto;
              background: rgba(0, 0, 0, .6);
              li {
                -webkit-transition: all .3s;
                -moz-transition: all .3s;
                -ms-transition: all .3s;
                -o-transition: all .3s;
                transition: all .3s;
              }
              li:hover {
                background-color: rgba(255, 255, 255, .2);
              }
            }
          }
          .name {
            width: 120px !important;
            font-size: 14px;
            vertical-align: middle;
            display: flex;
            display: -webkit-box;
            display: -moz-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            align-items: center;
            -webkit-align-items: center;
            flex-direction: row;
            -webkit-flex-direction: row;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            .icon {
              cursor: pointer;
            }
          }
          .backCenter {
            cursor: pointer;
            &:hover {
              background: @xm-color-text-select-primary;
            }
          }
          .all-name {
            color: #afb7c7;
            font-size: 12px;
          }
        }
      }
    }
    .message-help {
      display: flex;
      display: -webkit-flex;
      align-items: center;
      -webkit-align-items: center;
      height: 100%;
      flex: 1;
      -webkit-flex: 1;
      justify-content: flex-end;
      .inst-container {
        width: calc(~'100% - 420px');
        position: relative;
        .inst {
          margin-right: 12px;
          display: flex;
          align-items: center;
          border-right: 1px solid #e8e8e8;
          padding-right: 24px;
          justify-content: flex-end;
          .select {
            cursor: pointer;
          }
          .name {
            color: #333;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            max-width:230px;
          }
          .icon {
            font-size: 16px;
            margin-left: 8px;
            color: #8c8e93;
            &:hover {
              color: #555;
            }
          }
        }
        .select-inst {
          position: absolute;
          top: 37px;
          right: 11px;
          background: #fff;
          width: 285px;
          padding: 14px;
          box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.06);
          max-height: 321px;
          border-radius: 2px;
          display: none;
          &.active {
            display: block;
          }
          h2 {
            margin-bottom: 10px;
          }
          .ant-radio-group {
            overflow-y: auto;
            max-height: 200px;
          }
          .ant-radio-wrapper {
            display: inline-block;
            width: calc(~'100% - 28px');
            margin: 8px 0;
            .ant-radio {
              float: left;
              margin: 3px 0;
            }
            .name {
              color: #666;
              white-space: pre-wrap;
            }
          }
          .control {
            display: flex;
            justify-content: flex-end;
            button {
              margin-left: 8px;
            }
          }
        }
      }
      .drop-menu {
        height: 100%;
        display: flex;
        display: -webkit-flex;
        align-items: center;
        -webkit-align-items: center;
        justify-content: center;
        -webkit-justify-content: center;
        position: relative;
        .help-button {
          display: flex;
          align-items: center;
          height: 100%;
          cursor: pointer;
          padding: 0 12px;
          width: 106px;
          .icon-text {
            margin-left:4px;
            color:#333;
          }
        }
        .icon {
          font-size: 16px;
          color: @icon-color;
          vertical-align: middle;
          white-space: nowrap;
          &.font-sm {
            font-size: 14px;
          }
        }
        &:hover {
          color: #555;
          .icon {
            color: #555;
          }
          .help-center,
          .message-center {
            color: black;
          }
        }
      }
      .help-menu {
        .help-center {
          box-shadow: 0 2px 8px rgba(0,0,0,0.15);
          position: absolute;
          overflow: hidden;
          top: 50px;
          left: 0;
          height: 0;
          background-color: #ffffff;
          &.active {
            height: auto;
          }
          .help-body {
            li {
              width: 125px;
              padding: 10px 20px;
              cursor: pointer;
              display: flex;
              align-items: center;
              span:nth-child(1) {
                margin-right: 10px;
                color: @primary;
                font-size: 18px;
              }
              span:nth-child(2) {
                font-size: 12px;
                vertical-align: middle;
                color: @primary;
              }
            }
          }
        }
      }
      .message-menu {
        .message-center {
          box-shadow: 0 0 8px rgba(0,0,0,0.15);
          position: absolute;
          overflow: hidden;
          top: 50px;
          right: -96px;
          width: 320px;
          height: 0;
          // -webkit-animation: flipInY 1s 0s ease both;
          // -moz-animation: flipInY 1s 0s ease both;
          background-color: #ffffff;
          border-radius: 4px;
          z-index: 1;
          &.active {
            height: auto;
          }
          .message-body {
            overflow: auto;
            // max-height: 255px;
            .message-item:hover {
              background: #F3F6FA;
            }
            li,a {
              width: 100%;
              display: block;
              border-bottom: 1px solid  @xm-color-border;
              cursor: pointer;
              padding: 16px;
              &.load-more {
                text-align: center;
                color: @xm-color-text-select-primary;
                font-size: 13px;
                padding: 10px;
              }
            }
          }
        }
      }
      .user {
        margin-left: 16px;
        max-width: 160px;
        display: flex;
        align-items: center;
        cursor: pointer;
        .name {
          margin-left: 8px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
    .top-version {
      .version-title {
        cursor: pointer;
        color: #f47564;
      }
    }

    .edit-menu,
    .exit {
      height: 100%;
      padding: 0 15px;
      display: flex;
      display: -webkit-flex;
      align-items: center;
      -webkit-align-items: center;
      justify-content: center;
      -webkit-justify-content: center;
      position: relative;
      cursor: pointer;

      .icon {
        margin-right: 4px;
        font-size: 16px;
        color: @icon-color;
        vertical-align: middle;
        &.font-sm {
          font-size: 14px;
        }
      }
      &:hover {
        color: #ffffff;
        background-color: @xm-color-text-select-primary;
        .icon {
          color: #ffffff;
        }
        .help-center {
          color: black;
        }
        .message-center {
          color: black;
        }
      }
    }
  }
}