/*
Content teaser provides the styles needed to render a content (node) in teaser
view mode, containing:

- cover image: optional
- metadata: optional
- content: required
 */

[data-component-id="osinett:ot-content-teaser"] {
  border: solid 1px var(--medium-bg);
  background-color: var(--light-bg);
  border-radius: 7px;
  box-shadow: var(--level-1);
  display: flex;
  align-items: stretch;
  flex-direction: column;
  font-size: calc(16rem / 16);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
  padding: 12px;
  /**/
  max-width: 640px;
}

[data-component-id="osinett:ot-content-teaser"] header {
  margin-bottom: 0.75em;
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-meta {
  color: var(--medium);
  font-size: calc(14rem/16);
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-meta a {
  color: var(--medium);
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-title h3 {
  color: var(--dark-text);
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.5;
}

[data-component-id="osinett:ot-content-teaser"] header .ot-card-cover {
  margin: 0 1em 0 0;
  max-width: 40px;
}

[data-component-id="osinett:ot-content-teaser"] header .ot-card-cover img {
  width: 100%;
  border-radius: 50px;
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-body {
  color: var(--dim-text);
  flex-basis: auto;
  flex-grow: 1;
  flex-shrink: 1;
  line-height: 1.5;
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-body p:first-of-type {
  margin-top: 0;
  padding-top: 0.25em;
}

/* The wrapper for the optional cover image in a teaser */
[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-cover {
  float: left;
  margin: 0.5em 1em 0.5em 0;
  max-width: 40%;
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-cover img {
  width: 100px; /* minisquare */
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-title {
  color: var(--osinet-fg);
  font-size: 1rem;
  margin: 0.25em 0;
  text-decoration: none;
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-cover:any-link {
  text-decoration: none;
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-title:any-link:hover {
  color: var(--osinet-fg-hover);
}

[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-title h2,
[data-component-id="osinett:ot-content-teaser"] .ot-content-teaser-title h3 {
  border: none;
  margin: 0;
  padding: 0;
}
