:root {
  --van-nav-bar-height: 46px;
  --van-nav-bar-background: var(--van-background-2);
  --van-nav-bar-arrow-size: 16px;
  --van-nav-bar-icon-color: var(--van-primary-color);
  --van-nav-bar-text-color: var(--van-primary-color);
  --van-nav-bar-title-font-size: var(--van-font-size-lg);
  --van-nav-bar-title-text-color: var(--van-text-color);
  --van-nav-bar-z-index: 1;
}

.van-nav-bar {
  position: relative;
  z-index: var(--van-nav-bar-z-index);
  line-height: var(--van-line-height-lg);
  text-align: center;
  background: var(--van-nav-bar-background);
  user-select: none;

  &--fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  &--safe-area-inset-top {
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
  }

  .van-icon {
    color: var(--van-nav-bar-icon-color);
  }

  &__content {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--van-nav-bar-height);
  }

  &__arrow {
    margin-right: var(--van-padding-base);
    font-size: var(--van-nav-bar-arrow-size);
  }

  &__title {
    max-width: 60%;
    margin: 0 auto;
    color: var(--van-nav-bar-title-text-color);
    font-weight: var(--van-font-bold);
    font-size: var(--van-nav-bar-title-font-size);
  }

  &__left,
  &__right {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 var(--van-padding-md);
    font-size: var(--van-font-size-md);
  }

  &__left {
    left: 0;
  }

  &__right {
    right: 0;
  }

  &__text {
    color: var(--van-nav-bar-text-color);
  }
}
