/**
 *
 * @ai-apps/angular v2.152.0 | _attribute.scss
 *
 * Copyright 2014, 2023 IBM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


@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;
}
