@import '../Variables';

.coveo-dynamic-hierarchical-facet-search-value {
  display: flex;
  flex-direction: column;
  padding: 5px;
  cursor: pointer;

  .coveo-dynamic-hierarchical-facet-search-value-header {
    display: flex;

    .coveo-dynamic-hierarchical-facet-search-value-label {
      flex-shrink: 1;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .coveo-dynamic-hierarchical-facet-search-value-results-count {
      flex-shrink: 0;
      margin-left: 5px;
      color: $color-strong-contrast-grey;
      font-weight: lighter;
    }
  }

  .coveo-dynamic-hierarchical-facet-search-value-path {
    padding: 0;
    color: $color-strong-contrast-grey;
    font-weight: lighter;

    display: flex;

    .coveo-dynamic-hierarchical-facet-search-value-path-ellipsis,
    .coveo-dynamic-hierarchical-facet-search-value-path-prefix,
    .coveo-dynamic-hierarchical-facet-search-value-path-part {
      display: inline;
    }

    .coveo-dynamic-hierarchical-facet-search-value-path-prefix {
      white-space: pre;
    }

    .coveo-dynamic-hierarchical-facet-search-value-path-part {
      flex: 0 15 auto;
      min-width: 10px;
      @supports (max-width: max-content) {
        flex: 1 0 0;
        max-width: max-content;
      }
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .coveo-dynamic-hierarchical-facet-search-value-path-ellipsis {
      margin-right: 2px;
    }
  }
}
