@root-entry-name: 'default';
@import (reference) '~antd/es/style/themes/index.less';
@import '../components/ProBackBtn/style/index';

.pro-header {
  background-color: var(--zaui-base-bg, #ffffff);
  padding         : 16px 0 0 0 !important;

  &.pro-header-no-back.pro-header-has-describe {
    .pro-header-top {
      padding-left: var(--zaui-space-size-md, 16px);
    }
  }

  &.pro-header-no-back {
    .pro-header-top {
      padding-left: 0;
    }

    .pro-header-left {
      &.pro-header-left-space {
        margin-left: 0 !important;
      }

    }
  }

  &.pro-header-no-describe {
    box-shadow   : none;
    margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));

    .pro-header-title,
    .pro-header-top {
      padding: 0;
      margin : 0;
    }
  }

  &.pro-header-fixed.pro-header-no-describe {
    .pro-header-top {
      padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
    }
  }

  .pro-header-describe {
    a {
      color: var(--zaui-link, #006AFF);
    }
  }

  .pro-header-copy {
    margin-bottom: 0;
    width        : 14px;
    display      : flex;
    align-items  : center;

    .@{ant-prefix}-typography-copy-success {
      svg {
        width  : 14px;
        height : 14px;
        fill   : var(--zaui-success, #00AE4D);
        display: inline-block;
      }
    }

    .drag-icon {
      div {
        display: flex;
      }

      svg {
        width  : 14px;
        height : 14px;
        fill   : #3F3F3F;
        display: inline-block;
      }
    }
  }

  .pro-header-tag {
    background   : var(--ant-primary-1, #e6f4ff);
    color        : var(--zaui-brand, #006AFF);
    padding      : 4px 8px;
    border-radius: var(--zaui-border-radius-card, 2px);
    font-size    : var(--zaui-font-size-sm, 12px);
    font-weight  : normal;
    line-height  : 16px;
    display      : inline-block;
    white-space  : pre;
  }

  .pro-header-title {
    font-weight: 500;
    font-size  : var(--zaui-font-size-xl, 18px);
    padding    : 0 var(--zaui-space-size-md, 16px);
    line-height: 22px;
  }

  &.pro-header-fixed {
    position  : sticky;
    z-index   : 101;
    box-shadow: 0px 1px 2px 0px rgba(0, 55, 93, 0.1);
  }

  &.pro-header-shadow {
    box-shadow: 0px 1px 2px 0px rgba(0, 55, 93, 0.1);
  }

  .@{ant-prefix}-breadcrumb {
    li {
      font-weight: 500;
      color      : #1D2129;
    }

    .@{ant-prefix}-breadcrumb-link {
      font-size: var(--zaui-font-size-xl, 18px);
      display  : inline-flex;
    }

    .@{ant-prefix}-breadcrumb-separator {
      font-weight: 500;
      color      : #1D2129;
      font-size  : var(--zaui-font-size-xl, 18px);
      margin     : 0 var(--zaui-space-size-xs, 4px);
    }
  }

  .pro-header-top {
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    margin-bottom  : calc(var(--zaui-space-size-sm; 8px) * var(--zaui-size; 1));
    padding        : 0 var(--zaui-space-size-md, 16px);

    .pro-header-left {
      display     : flex;
      align-items : center;
      margin-right: var(--zaui-space-size-md, 16px);

      &.pro-header-left-space {
        margin-left: var(--zaui-space-size-md, 16px);
      }

      ul {
        display    : flex;
        align-items: center;

        li {
          color      : #1D2129;
          font-size  : var(--zaui-font-size-xl, 18px);
          font-weight: 500;
          display    : flex;

          .breadcrumb-value {
            display: inline-block;
          }

          &>span {
            display: flex;
          }

          .omit {
            overflow     : hidden;
            white-space  : nowrap;
            text-overflow: ellipsis;
          }

          b {
            font-size: var(--zaui-font-size-lg, 16px);
          }

          .@{ant-prefix}-typography {
            display      : flex;
            margin-bottom: 0;
          }

          &.version {
            background   : var(--ant-primary-1, #e6f4ff);
            border-radius: var(--zaui-border-radius, 4px);
            color        : var(--zaui-brand, #006AFF);
            font-style   : initial;
            padding      : 0 var(--zaui-space-size-sm, 8px);
            font-size    : var(--zaui-font-size-sm, 12px);
            height       : 24px;
            line-height  : 24px;
          }

          &.hidden {
            display: none;
          }
        }
      }

    }

    .pro-header-right {
      .@{ant-prefix}-btn-link {
        color: #616161;
      }

      .@{ant-prefix}-btn-primary {
        color: #ffffff;
      }

      .@{ant-prefix}-btn-link {
        padding: var(--zaui-space-size-xs, 4px), var(--zaui-space-size-sm, 8px);
      }

      .@{ant-prefix}-divider-vertical {
        margin: 0;
      }
    }

  }

  .pro-header-nav {
    display   : flex;
    background: #F7F9FC;
    border-top: 1px solid #F2F2F2;
    position  : relative;

    &.pro-header-nav-open {
      .pro-header-fold {
        .pro-header-fold-bg {
          transform: rotate(180deg);
        }
      }

    }

    &.pro-header-nav-hidden {
      padding: 0;
      border : none;

      ul {
        height     : 0;
        overflow   : hidden;
      }
    }

    .pro-header-fold {
      position : absolute;
      bottom   : -13px;
      left     : 50%;
      transform: translateX(-50%);
      cursor   : pointer;

      .pro-header-fold-bg {
        background      : #fff;
        position        : relative;
        z-index         : 2;
        height          : 26px;
        transform       : rotate(0deg);
        transform-origin: center;
      }

      &::before {
        content   : '';
        z-index   : 1;
        position  : absolute;
        bottom    : 13px;
        left      : 50%;
        transform : translateX(-50%);
        width     : 140px;
        height    : 1px;
        background: linear-gradient(90deg, rgba(238, 238, 238, 0) 0%, var(--zaui-brand, #006AFF) 37%, var(--zaui-brand, #006AFF)57%, rgba(216, 216, 216, 0) 100%);
      }

      svg {
        fill: var(--zaui-brand, #006AFF);
      }
    }

    ul {
      display   : flex;
      flex-wrap : wrap;
      padding   : 0 16px;
      transition: height 0.2s ease-in-out;
      height    : 60px;
      overflow  : hidden;

      li {
        margin-right : 52px;
        margin-top   : 4px;
        margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));

        &:last-child {
          margin-right: 0;
        }

        span {
          font-weight: 400;
          font-size  : var(--zaui-font-size, 14px);

          &:first-child {
            display    : block;
            font-weight: 500;
          }
        }

        .describe-value {
          color      : var(--zaui-text, #343434);
          font-weight: 400;

          &>* {
            color      : var(--zaui-text, #343434);
            font-weight: 400 !important;
          }
        }
      }
    }
  }

  .pro-header-info {
    li {
      margin-right: var(--zaui-space-size-sm, 8px);
    }
  }

  .pro-header-describe {
    display       : flex;
    flex-wrap     : wrap;
    font-size     : var(--zaui-font-size, 14px);
    padding       : 0 var(--zaui-space-size-md, 16px);
    padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));

    li {
      margin-left: var(--zaui-space-card, 32px);

      &.pro-header-only-tag {
        margin-left: var(--zaui-space-size-sm, 8px);

        span:first-child {
          margin-right: 0;
        }
      }

      &:first-child {
        margin-left: 0;
      }

      span {
        font-weight: 400;
        color      : #0A0A0A;

        &:first-child {
          margin-right: 12px;
        }

        &:last-child {
          font-weight: 600;
          display    : inline-grid;

          .pro-header-tag {
            margin-left: 4px;
          }
        }
      }
    }
  }
}

@media (max-width: 1366px) {
  .pro-header-describe {
    li span:last-child {
      max-width: 350px;
    }
  }
}
