/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../mixins/common.less';
@import '../custom.less';
@import './vars.less';

@breadcrumb-prefix-cls: ~'@{css-prefix}breadcrumb';

.@{breadcrumb-prefix-cls} {
  .inject-Breadcrumb-vars();

  font-size: var(--tv-Breadcrumb-font-size);
  line-height: var(--tv-Breadcrumb-text-line-height);
  .clearfix();

  & &__item {
    cursor: pointer;
    display: inline-flex;
    align-items: center;

    &:last-child {
      .@{breadcrumb-prefix-cls}__inner {
        font-weight: var(--tv-Breadcrumb-text-font-weight);
        text-decoration: none;
        color: var(--tv-Breadcrumb-last-text-color);

        a {
          cursor: text;
          text-decoration: none;
          color: var(--tv-Breadcrumb-last-text-color);
        }
      }

      .@{breadcrumb-prefix-cls}__separator,
      .@{breadcrumb-prefix-cls}__separator-cls {
        display: none;
      }
    }
  }

  & &__item--medium {
    font-size: 16px;
  }

  & &__inner {
    vertical-align: middle;

    &,
    & a {
      color: var(--tv-Breadcrumb-text-color);
    }

    &:hover {
      text-decoration: underline;

      & a:hover {
        cursor: pointer;
        text-decoration: underline;
      }
    }
  }

  & &__separator {
    color: var(--tv-Breadcrumb-separator-icon-color);
    margin: var(--tv-Breadcrumb-separator-margin-y) var(--tv-Breadcrumb-separator-margin-x);
    vertical-align: middle;
    text-align: center;
    width: var(--tv-Breadcrumb-separator-width);
  }

  & &__separator-cls {
    font-size: var(--tv-Breadcrumb-font-size);
    fill: var(--tv-Breadcrumb-separator-icon-color);
    margin: var(--tv-Breadcrumb-separator-margin-y) var(--tv-Breadcrumb-separator-margin-x);
    vertical-align: middle;
  }

  & &__item:last-child:hover {
    cursor: text;
    text-decoration: none;

    a {
      cursor: text;
      text-decoration: none;
    }
  }
}
