@import 'part:@lyra/base/theme/variables-style';

.root {
  display: flex;
  padding: 0.5em;
  user-select: none;
  overflow: hidden;
  position: relative;
  min-height: 1rem;
  max-width: 100%;
}

.hasDescription {
  composes: root;
}

.heading {
  vertical-align: baseline;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.5rem;
}

.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title {
  font-size: 1rem;
  color: inherit;
  font-weight: 500;
  text-transform: none;
  margin: 0;
  padding: 0;
}

.subtitle {
  font-size: var(--font-size-small);
  color: inherit;
  margin: 0;
  padding: 0;
  font-weight: 400;
  line-height: 1em;
}

.description {
  padding: 0;
  margin: 0;
  font-size: var(--font-size-small);
}

.status {
  color: var(--white);
  background-color: var(--gray);
  padding: 0.25em 0.5em;
  font-size: var(--font-size-small);
}

.media {
  height: 2.5rem;
  width: 2.5rem;
  margin-right: 0.5em;
  position: relative;
  overflow: hidden;

  @nest & img {
    width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
    object-fit: cover;
  }

  @nest .hasDescription & {
    height: 5rem;
    width: 5rem;
  }
}
