libs/barista-components/filter-field/src/filter-field-tag/filter-field-tag.scss
@import '../../../core/src/style/variables';
@import '../../../style/font-mixins';

// from "* { Box-sizing: Border-box }
// FTW" @ https://www.paulirish.com/2012/box-sizing-border-box-ftw/
*,
*::before,
*::after {
  box-sizing: inherit;
}

:host {
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
  height: 24px;
  border: 1px solid $gray-300;
  border-radius: 3px;
  background-color: $gray-130;
  @include dt-main-font();
  font-size: 12px;
  color: $gray-500;

  &.dt-filter-field-tag-disabled {
    border-color: $gray-200;
    background-color: #ffffff;

    .dt-filter-field-tag-key,
    .dt-filter-field-tag-value {
      color: $gray-500;
    }
  }

  &.dt-filter-field-tag-read-only {
    .dt-filter-field-tag-key,
    .dt-filter-field-tag-value {
      color: $gray-500;
    }
  }
}

:host ::ng-deep .dt-button.dt-button-nested {
  height: 22px;
  line-height: 22px;
  padding-left: 8px;
  padding-right: 8px;
  color: $gray-500;

  &[disabled] {
    background-color: $white;
  }

  .dt-button-icon {
    margin-left: 0;
    margin-top: 3px;
    height: 22px;
    vertical-align: baseline;
  }
}

.dt-filter-field-tag-button-nested.dt-button.dt-button-nested {
  &:hover:not([disabled]),
  &:active:not([disabled]) {
    background-color: $gray-200 !important;
  }
}

.dt-filter-field-tag-button-temporarily-disabled.dt-button.dt-button-nested {
  background-color: transparent;
  cursor: not-allowed;
}

.dt-filter-field-tag-button-icon-temporarily-disabled ::ng-deep svg {
  fill: $turquoise-600 !important;
}

:host ::ng-deep .dt-button.dt-icon-button.dt-filter-field-tag-button {
  width: 22px;
  padding-left: 0;
  padding-right: 0;
}

.dt-filter-field-tag-icon {
  height: 16px;
  width: 16px;
}

.dt-filter-field-tag-key::after {
  content: ' ' attr(data-separator) ' ';
}

.dt-filter-field-tag-key[data-separator=':']::after {
  content: attr(data-separator) ' ';
}

.dt-filter-field-tag-container {
  display: flex;
}

.dt-filter-field-tag-value {
  color: $turquoise-600;
  margin-left: 4px;
  max-width: 250px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.dt-filter-field-tag-label .dt-filter-field-tag-value {
  --dt-filter-field-max-width: 300px;
  max-width: var(--dt-filter-field-max-width);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.dt-filter-field-tag-value-isfreetext .dt-filter-field-tag-value::before,
.dt-filter-field-tag-value-isfreetext .dt-filter-field-tag-value::after {
  content: '"';
  color: currentColor;
}
