/*
 * Shared author byline (plugins/authors/lib/Byline.php). The site's own .alert-byline,
 * .byline-author, .byline-avatar and .byline-name rules style the base byline; this
 * file adds what the component itself introduces: the label before a name, the source
 * credit of a reposted statement, and the smaller "Shared by" line beside it.
 */
.byline-label {
  color: var(--text-muted, inherit);
  font-weight: 400;
}

.byline--repost,
.byline--with-source {
  align-items: center;
  column-gap: var(--space-4, 16px);
  row-gap: var(--space-2, 8px);
}

.byline-source {
  display: inline;
}

.byline-source .byline-name {
  font-weight: 600;
}

.byline-source__writer {
  display: inline-block;
  margin-left: var(--space-3, 12px);
}

.byline-shared {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 8px);
  font-size: var(--text-sm, 0.875rem);
  color: var(--text-muted, inherit);
}

/* A divider sets our credit apart from the source's on the same line, so our logo is
   never read as the writer's photo and the statement is never read as ours. Repost:
   before "Shared by". Our intro over a statement: before "Statement by". Phones drop
   it (each credit on its own line there). */
.byline--repost > .byline-shared,
.byline--with-source > .byline-source {
  border-left: 1px solid var(--border-medium, currentColor);
  padding-left: var(--space-4, 16px);
}

.byline-shared__avatar {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.byline-shared__avatar img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.byline-shared__name {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.byline-shared__name:hover,
.byline-shared__name:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Phone: source, writer and "Shared by" each on their own line, all left aligned
   (align-self, because a page may centre its byline's items). */
@media (max-width: 600px) {
  .byline--repost,
  .byline--with-source {
    flex-direction: column;
    align-items: flex-start;
  }

  .byline--repost > .byline-source,
  .byline--repost > .byline-shared,
  .byline--with-source > .byline-author,
  .byline--with-source > .byline-source {
    align-self: flex-start;
  }

  .byline--repost > .byline-shared,
  .byline--with-source > .byline-source {
    border-left: 0;
    padding-left: 0;
  }

  .byline-source__writer {
    display: block;
    margin-left: 0;
  }
}
