@import '../../style/themes/index';
@import '../../style/mixins/index';

@yee-pageheader-prefix-cls: ~'@{yee-prefix}-page-header';

.@{yee-pageheader-prefix-cls} {
  .yee-reset-component;
  position: relative;
  padding: @yee-page-header-padding-vertical @yee-page-header-padding;
  background-color: @yee-component-background;

  &-ghost {
    background-color: inherit;
  }

  &.has-breadcrumb {
    padding-top: @yee-page-header-padding-breadcrumb;
  }

  &.has-footer {
    padding-bottom: 0;
  }

  &-back {
    float: left;
    margin: 8px 0;
    margin-right: 16px;
    font-size: 16px;
    line-height: 1;
    &-button {
      .yee-operation-unit();
      color: @yee-page-header-back-color;
      cursor: pointer;
    }
  }

  .@{yee-prefix}-divider-vertical {
    height: 14px;
    margin: 0 12px;
    vertical-align: middle;
  }

  .@{yee-prefix}-breadcrumb + &-heading {
    margin-top: 8px;
  }

  &-heading {
    width: 100%;
    overflow: hidden;
    &-title {
      display: block;
      float: left;
      margin-bottom: 0;
      padding-right: 12px;
      color: @yee-heading-color;
      font-weight: 600;
      font-size: @yee-heading-4-size;
      line-height: 32px;
    }

    .@{yee-prefix}-avatar {
      float: left;
      margin-right: 12px;
    }

    &-sub-title {
      float: left;
      margin: 5px 0;
      margin-right: 12px;
      color: @yee-text-color-secondary;
      font-size: 14px;
      line-height: 22px;
    }

    &-tags {
      float: left;
      margin: 4px 0;
    }

    &-extra {
      float: right;
      > * {
        margin-left: 8px;
      }
      > *:first-child {
        margin-left: 0;
      }
    }
  }

  &-content {
    padding-top: 12px;
    overflow: hidden;
  }

  &-footer {
    margin-top: 16px;
    .@{yee-prefix}-tabs-bar {
      margin-bottom: 1px;
      border-bottom: 0;
      .@{yee-prefix}-tabs-nav .@{yee-prefix}-tabs-tab {
        padding: 8px;
        font-size: 16px;
      }
    }
  }

  @media (max-width: @yee-screen-sm) {
    &-heading {
      &-extra {
        display: block;
        float: unset;
        width: 100%;
        padding-top: 12px;
        overflow: hidden;
      }
    }
  }
}
