@import '../../style/themes/default.less';

/* header */
.ele-admin-header {
  display: flex;
  align-items: center;
  height: @header-height;
  line-height: @header-height;
  box-shadow: @header-light-shadow;
  background: @header-light-background;
  z-index: calc(@layout-z-index + 2);
  box-sizing: border-box;
  position: relative;

  // logo
  .ele-admin-logo {
    width: @sidebar-width;
    height: @header-height;
    box-shadow: @logo-light-shadow;
    background: @header-light-background;
    transition: @sidebar-transition;
    font-weight: @logo-font-weight;
    font-family: @logo-font-family;
    font-size: @logo-font-size;
    color: @logo-light-color;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    & > img {
      width: @logo-size;
      height: @logo-size;

      & + span {
        margin-left: @padding-sm;
      }
    }
  }

  // 面包屑
  .ele-admin-breadcrumb {
    flex-shrink: 0;
  }

  // nav
  .ele-admin-header-nav {
    flex: 1;
    overflow: hidden;

    & > .ant-menu {
      border: none;
      background: none;
      line-height: @header-height;

      .ant-menu-item,
      .ant-menu-submenu {
        top: auto;
        margin-top: 0;
      }
    }
  }

  // 操作按钮
  .ele-admin-header-tool {
    display: flex;
    flex-shrink: 0;
    padding: 0 @padding-sm;

    .ele-admin-header-tool-item {
      padding: 0 @padding-sm;
      font-size: @font-size-base;
      transition: color 0.2s, background-color 0.2s;
      cursor: pointer;

      &:hover {
        background: @header-tool-hover-bg;
      }

      .anticon-menu-fold,
      .anticon-menu-unfold,
      .anticon-more,
      .anticon-bell,
      .anticon-fullscreen,
      .anticon-fullscreen-exit {
        transform: scale(1.15);
      }
    }
  }

  // 用户信息
  .ele-admin-header-avatar {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;

    .ant-avatar {
      width: @header-avatar-size;
      height: @header-avatar-size;
      line-height: @header-avatar-size;

      & + span {
        padding-left: @padding-xs;
      }
    }
  }
}
