.header-account {
  display: inline-block;

  .account-box {
    cursor: context-menu;
    position: relative;

    .box-inner {
      display: flex;
      align-items: center;
      flex-direction: row-reverse;
      gap: 10px;
    }

    &:hover {
      .title {
        color: var(--ns-primary);
      }

      .icon {
        background-color: var(--ns-primary);
        color: #fff;
      }
    }

    .icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      text-align: center;
      font-size: 18px;
      border-radius: 100%;
      background: #dedede;
      color: #888;
      transition: .2s;
      overflow: hidden;
      position: relative;

      img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
      }
    }

    .title {
      display: block;
      text-align: center;
      color: #666;
      font-weight: 500;
      transition: .2s;
    }

    .subtitle {
      display: block;
      color: #707070;
      font-size: 13px;
      text-align: center;
      margin-top: 5px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .account-links {
      position: absolute;
      z-index: 333;
      width: 230px;
      background: #fff;
      border-radius: 10px;
      display: block;
      margin: 10px 0 0 0;
      list-style: none;
      transition: .2s;
      top: 100%;
      left: 0;
      padding: 5px;
      box-shadow: rgba(0, 0, 0, .1) 0 2px 5px;

      &:empty{
        display: none !important;
      }

      &::before {
        content: "";
        position: absolute;
        width: 100%;
        height: 10px;
        bottom: 100%;
        left: 0;
      }

      > li {
        display: block;

        a {
          display: block;
          padding: 5px;
          text-align: center;
          border-radius: var(--ns-radius) ;
          transition: .2s;

          &:hover {
            background: #eee;
            color: #444;
          }
        }

        a.logout {
          font-size: 18px;
        }
      }

      .summary{
        border-bottom: #eee 1px solid;
        padding-bottom: 5px;
        margin-bottom: 5px;

        a {
          display: flex;
          align-items: center;
          gap: 15px;
          text-align: right;
        }
        img{
          width: 60px;
          height: 60px;
          border-radius: var(--ns-radius);
          background-color: #eee;
        }

        span{
          flex: 1;
        }

        .profile-name{
          display: block;
          font-weight: bold;
          color: #333;
        }

        .profile-details{
          color: #666;
        }
      }
    }

    &:not(:hover) {
      .account-links {
        margin-top: 15px;
        opacity: 0;
        visibility: hidden;
      }
    }
  }

  &.to-left {
    .account-box .account-links {
      left: auto;
      right: 0;
    }
  }
}
