/**
 * BrainsOnBoard — Sources box
 *
 * Ships with the PLUGIN, enqueued only on posts that actually have a source
 * record. Same rule as the FAQ block and the table styling: markup generated by
 * the plugin brings its own CSS, so a template change can never orphan it.
 *
 * The box is the evidence trail for an article whose facts came from somewhere
 * else, so it is styled to be found rather than to be pretty — a rule above it,
 * a quiet heading, and numbered entries that stay legible at small sizes.
 *
 * The `.breakdance` prefixed duplicates are deliberate, for the same reason
 * they exist in bob-faq.css: Breakdance styles post content through two-class
 * selectors such as `.breakdance .bde-rich-text h3` (specificity 0,2,0), which
 * beat a single class (0,1,0).
 *
 * @package BrainsOnBoard
 * @since 2.2.0
 */

.bob-sources,
.breakdance .bob-sources {
  margin: 2.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.bob-sources__heading,
.breakdance .bob-sources__heading {
  margin: 0 0 0.65rem !important;
  font-size: 0.8125rem !important;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.bob-sources__list,
.breakdance .bob-sources__list {
  margin: 0 !important;
  padding-left: 1.35rem !important;
  list-style: decimal outside;
}

.bob-sources__item,
.breakdance .bob-sources__item {
  margin: 0 0 0.45rem !important;
  padding-left: 0.15rem;
}

.bob-sources__item:last-child,
.breakdance .bob-sources__item:last-child {
  margin-bottom: 0 !important;
}

/* A citation is a long string that must never force a horizontal scrollbar on
   a narrow screen, so it is allowed to break inside a URL-like run. */
.bob-sources__item a,
.breakdance .bob-sources__item a {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (prefers-color-scheme: dark) {
  .bob-sources,
  .breakdance .bob-sources {
    border-top-color: rgba(255, 255, 255, 0.18);
  }
}

/* Printed, the links are dead, so the addresses have to be on the page. */
@media print {
  .bob-sources,
  .breakdance .bob-sources {
    break-inside: avoid;
  }

  .bob-sources__item a::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
}
