@import '~choerodon-ui/lib/style/themes/default';

.c7n-iam-organization {
  .link:hover {
    color: @primary-color;
    text-decoration: underline;
    cursor: pointer;
  }

  &-option {
    display: inline-flex;
    vertical-align: middle;

    &-avatar {
      width: 18px;
      height: 18px;
      background: rgb(197, 203, 232);
      color: rgb(100, 115, 195);
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-right: 5px;
      text-align: center;
      border-radius: 50%;
      flex-shrink: 0;

      &-noavatar {
        width: 18px;
        height: 18px;
        line-height: 18px;
        text-align: center;
        color: rgb(100, 115, 195);
      }
    }
  }
  .text-gray {
    color: rgba(0, 0, 0, 0.65);
  }
  &-name-avatar {
    float: left;
    width: 18px;
    height: 18px;
    line-height: 18px;
    background: rgb(197, 203, 232);
    color: rgb(100, 115, 195);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 5px;
    text-align: center;
    border-radius: 50%;
    flex-shrink: 0;
    text-transform: uppercase;
  }

  &-sidebar {
    .c7n-modal {
      &-header {
        height: .55rem;
        min-height: .55rem;
        .c7n-modal-title {
          font-weight: 500;
        }
      }
    }
    .c7n-modal-content {
      width: 3.8rem !important;
      left: inherit;
      right: 0;
    }
    .c7n-form-item-with-help {
      margin-bottom: .4rem;
    }
    &-create {
      &.c7n-modal-sidebar .c7n-modal-body {
        height: calc(100% - 1.32rem);
      }
    }
    .c7n-modal-footer {
      position: absolute;
        width: 100%;
        bottom: 0.25rem;
    }

    .c7n-organization-detail-row {
      margin-bottom: .16rem;
      font-size: .14rem;
      div:first-child:not(.c7n-iam-organization-avatar-wrap) {
        color: rgba(0, 0, 0, 0.65);
      }

      &-hide {
        display: none;
      }
    }
  }

  &-avatar {
    display: flex;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    width: .8rem;
    height: .8rem;
    margin-top: 10px;
    border-radius: 50%;
    background: #3f51b5;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
    &-label {
      margin-bottom: .2rem;
      margin-top: .06rem;
      text-align: center;
      color: rgba(0, 0, 0, .54rem);
      width: 100%;
      display: inline-block;
    }
    &-wrap {
      position: absolute;
      width: 80px;
      height: 80px;
      border-radius: 50%;
      font-size: 40px;
      line-height: 80px;
      font-weight: 700;
      background-size: 100%;
      background-position: center;
      background-repeat: no-repeat;
      color: #3f51b5;
      text-transform: uppercase;
      text-align: center;
    }

    &-button {
      position: absolute !important;
      width: 100%;
      height: 100% !important;
      border-radius: inherit !important;
      top: 0;
      left: 0;
      cursor: pointer;
      transition: opacity 0.3s;

      .c7n-upload {
        display: block;
        width: 100%;
        height: 100%;
      }

      &-icon {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        margin: auto;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background-color: rgba(0, 0, 0, 0.26);
        color: #fff;

        .icon {
          font-size: 24px;
          line-height: 80px;
        }
      }

      &-create {
        opacity: 1;
      }

      &-edit {
        opacity: 0;
      }
    }

    &:hover &-button {
      opacity: 1;
    }
  }
}
