@use 'sass:map';

@use 'common/var' as *;
@use 'mixins/mixins' as *;
@use 'mixins/utils' as *;
@use 'mixins/var' as *;

@include b(breadcrumb) {
  @include set-component-css-var('breadcrumb', $breadcrumb);
}

@include b(breadcrumb) {
  font-size: 14px;
  line-height: 1;
  @include utils-clearfix;

  @include e(separator) {
    margin: 0 8px;
    font-weight: bold;
    color: var(--el-text-color-placeholder);

    &.#{$namespace}-icon {
      margin: 0 6px;
      font-weight: normal;
      svg {
        vertical-align: middle;
      }
    }
  }

  @include e(item) {
    float: left;

    @include e(inner) {
      color: map.get($breadcrumb, 'text-link-color');

      &.is-link,
      & a {
        font-weight: bold;
        text-decoration: none;
        transition: var(--el-transition-color);
        color: map.get($breadcrumb, 'text-link-color');

        &:hover {
          color: map.get($breadcrumb, 'text-link-color-hover');
          cursor: pointer;
        }
      }
    }

    &:last-child {
      .#{$namespace}-breadcrumb__inner,
      .#{$namespace}-breadcrumb__inner a {
        &,
        &:hover {
          font-weight: normal;
          color: map.get($breadcrumb, 'text-color');
          cursor: text;
        }
      }

      .#{$namespace}-breadcrumb__separator {
        display: none;
      }
    }
  }
}
