@import '../../styles/mixins/text-ellipsis.scss';

.nut-card {
  width: 100%;
  display: flex;
  background-color: inherit;
  border-radius: $card-border-radius;

  &-left {
    width: 120px;
    height: 120px;
    flex-shrink: 0;

    > img {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: $card-border-radius;
    }
  }

  &-right {
    flex: 1;
    padding: 0 10px 8px;

    &-title {
      @include moreline-ellipsis();
      line-height: 1.5;
      font-size: 14px;
      color: $color-title;
    }

    &-price {
      display: flex;
      align-items: center;
      height: 18px;
      line-height: 18px;
      margin-top: 9px;

      .nut-price {
        .nut-price-big {
          font-size: 18px;
        }

        .nut-price-symbol,
        .nut-price-point,
        .nut-price-small {
          font-size: 12px;
        }
      }

      &-origin {
        &.nut-price {
          margin-left: 2px;
          color: #d2a448;

          .nut-price-big,
          .nut-price-symbol,
          .nut-price-point,
          .nut-price-small {
            font-size: 12px;
          }
        }
      }
    }

    &-other {
      display: flex;
      align-items: center;
      padding: 5px 0 2px;

      .nut-tag {
        padding: 0 2px;
        margin-right: 5px;
        font-size: $font-size-xs;
      }
    }

    &-shop {
      display: flex;
      justify-content: space-between;
      align-items: center;

      &-name {
        line-height: 1.5;
        color: $color-text;
        font-size: 12px;
        padding-top: 4px;
      }
    }
  }
}

[dir='rtl'] .nut-card,
.nut-rtl .nut-card {
  &-right {
    &-price {
      &-origin {
        &.nut-price {
          margin-left: 0;
          margin-right: 2px;
        }
      }
    }

    &-other {
      .nut-tag {
        margin-right: 0;
        margin-left: 5px;
      }
    }
  }
}
