@import '../../style/theme/color';
@import '../../style/core/_font';
@import '../../style/core/animation';

:host {
  display: inline-flex;
  align-items: center;
}

.devui-breadcrumb-font-style {
  font-size: $devui-font-size;
  color: $devui-aide-text;
}

.devui-breadcrumb-item {
  @extend.devui-breadcrumb-font-style;

  cursor: auto;

  ::ng-deep a:hover {
    color: $devui-text;
    text-decoration: none;
  }

  ::ng-deep a {
    @extend.devui-breadcrumb-font-style;

    cursor: pointer;

    &:focus {
      text-decoration: none;
    }
  }
}

.devui-breadcrumb-down-icon {
  vertical-align: middle;
  display: inline-block;
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin-right: -8px;
  text-align: center;
  outline: none;

  svg g path {
    fill: $devui-icon-fill;
  }
}

.devui-breadcrumb-item-active {
  color: $devui-text;

  ::ng-deep a {
    color: $devui-text;
    text-decoration: none;
  }

  svg g path {
    fill: $devui-icon-text;
  }

  span {
    color: $devui-text;
  }
}

.devui-breadcrumb-separator {
  @extend.devui-breadcrumb-font-style;

  margin: 0 4px;
}

.devui-breadcrumb-dropdown-menu {
  padding: 8px 0;
  max-width: 200px;

  li {
    padding: 0 12px;
    font-size: $devui-font-size;
    line-height: 36px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;

    a {
      color: $devui-text;
      line-height: 36px;
      width: 170px;
      display: inline-block;
      vertical-align: top;

      &:focus {
        text-decoration: none;
      }
    }

    &:hover {
      background: $devui-list-item-hover-bg;

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

.devui-search-container {
  max-width: 200px;
}

span.devui-breadcrumb-dropdown-origin {
  min-width: unset;
  display: inline-flex;
  padding: 0;
}

d-search {
  width: 100%;
}

.devui-breadcrumb-item-with-menu {
  .devui-breadcrumb-item {
    cursor: pointer;
  }

  &:hover {
    svg g path {
      fill: $devui-icon-fill-hover;
    }
  }
}

.devui-dropdown-open {
  .devui-breadcrumb-down-icon {
    transform: rotate(180deg);
  }
}

.devui-breadcrumb-item {
  ::ng-deep a,
  ::ng-deep span {
    transition: color $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
    display: inline-block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 440px;
    vertical-align: top;
  }
}

.devui-breadcrumb-down-icon {
  transition: transform $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
  transform-origin: center;

  svg g path {
    transition: fill $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
  }
}
