@import '../../globals/vars';

.#{$iot-prefix}--value-card__attribute {
  display: flex;
  // need a set height to determine truncation vs wrapping. This is the max font size allowed
  height: 54px;
  // line up the value and unit
  align-items: baseline;
  padding-right: $spacing-05;

  &-wrapper {
    width: var(--value-card-attribute-width);

    &--vertical {
      padding: 0 0 $spacing-06 0;
    }

    &--vertical:last-of-type {
      padding: 0;
    }

    &--horizontal {
      padding: 0;
    }
  }

  &_trend-icon {
    margin-right: $spacing-02;
  }

  &-label {
    // 14px equivalent
    font-size: 0.875rem;
    text-align: left;
    color: $text-01;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 100%;
    // set the height so the height and value will always be in the same position regardless if they exist
    height: $layout-01;
    margin-bottom: $spacing-02;
    display: flex;
    flex-direction: row;
    align-items: center;

    & > span {
      height: $layout-01;
    }

    & > svg {
      margin-right: $spacing-02;
    }
  }

  &-secondary-value {
    height: $layout-01;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: $spacing-02;
    color: var(--secondary-value-color);
  }
}

html[dir='rtl'] .#{$iot-prefix}--value-card__attribute {
  padding-right: 0;
  padding-left: $spacing-05;
}
