.pestlibrary-timeline {
  --pestlib-baseline: #e5e9ec;
  --pestlib-baseline-border: #c7ced3;
}
.pestlibrary-timeline .timeline-track {
  position: relative;
  display: flex;
  height: 2.25rem;
  border-radius: 3px;
  overflow: visible;
}
.pestlibrary-timeline .timeline-labels {
  display: flex;
  margin-top: 0.35rem;
}
.pestlibrary-timeline .timeline-labels span {
  flex: 1 1 0;
  text-align: center;
}
.pestlibrary-timeline .timeline-month {
  position: relative;
  flex: 1 1 0;
  background-color: var(--pestlib-baseline);
  border-right: 1px solid var(--pestlib-baseline-border);
}
.pestlibrary-timeline .timeline-month:first-child {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}
.pestlibrary-timeline .timeline-month:last-child {
  border-right: none;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}
.pestlibrary-timeline .timeline-band {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}
/* Band colour: the template's .brand-primary-background /
   .brand-secondary-background on each band (1.22.8). */
.pestlibrary-timeline .timeline-caption {
  margin: 0.35rem 0 0;
}
.pestlibrary-timeline .timeline-callout {
  display: none;
}
@media (hover: hover) {
  .pestlibrary-timeline .timeline-band {
    cursor: pointer;
  }
  .pestlibrary-timeline .timeline-band .timeline-callout {
    display: block;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 13rem;
    max-width: 60vw;
    padding: 0.6rem 0.8rem;
    background-color: #fff;
    border: 1px solid #d7dbdf;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    font-size: 0.75rem;
    line-height: 1.35;
    color: #333;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
  }
  .pestlibrary-timeline .timeline-band .timeline-callout::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #fff;
  }
  .pestlibrary-timeline .timeline-band:hover .timeline-callout,
  .pestlibrary-timeline .timeline-band:focus .timeline-callout,
  .pestlibrary-timeline .timeline-band:focus-visible .timeline-callout {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
  .pestlibrary-timeline .timeline-callout strong {
    display: block;
    margin-bottom: 0.2rem;
  }
  .pestlibrary-timeline .timeline-caption {
    display: none;
  }
}
.pestlibrary-timeline--compact .timeline-labels span:nth-child(even) {
  visibility: hidden;
}
sup a,
small a,
.small a {
  font-size: inherit;
}

/* Related Pests renders twice, once per breakpoint. See the comment in
   site/tmpl/pest/default.php. This is a component class rather than the
   template's hidden-sm/md/lg because that family stops at 3839px and there is
   no hidden-xl, which would have shown BOTH copies on a 4K screen. 767px is
   the template's own xs ceiling. */
.pestlibrary-mobile-only {
  display: none;
}
@media (max-width: 767px) {
  .pestlibrary-mobile-only {
    display: block;
  }
}

/* Directory cards. Ported 2026-09-03 from library/directory.html:10-60, the
   mockup <style> block Chad approved on 2026-08-26. The component emitted the
   .pestlibrary-directory-row class from the start with no rule behind it, so
   every card sized itself off its own photo and the CTA landed at a different
   height in each column. Source: dev/less/pestlibrary.less. */
.row.pestlibrary-directory-row {
  align-items: stretch;
}
.pestlibrary-directory-card {
  display: flex;
  flex-direction: column;
}
/* 1.22.7: the Cube J5 template's .row [class^='col-'] { display:grid } (0,2,0)
   beat the bare card class, so each card was a grid and a tall neighbor
   stretched every track. 0,3,0 here. The > div gap is Chad's 1.5rem minimum
   above the CTA. Source: dev/less/pestlibrary.less. */
.row.pestlibrary-directory-row > .pestlibrary-directory-card {
  display: flex;
  flex-direction: column;
}
.row.pestlibrary-directory-row > .pestlibrary-directory-card > div {
  margin-bottom: 1.5rem;
}
/* THE 16:9 RATIO IS OWNED HERE, not borrowed from the client template's
   .ratio-16x9 (a different repo). The div is empty, so without this ::before
   the photo has no height at all under any other template. */
.pestlibrary-card-photo {
  position: relative;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-color: #d9d9d9;
}
.pestlibrary-card-photo::before {
  display: block;
  padding-top: 56.25%;
  content: "";
}
.pestlibrary-card-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  text-align: center;
}
/* The label is real text in the markup, not a CSS content: string as in the
   mockup, because it comes from COM_PESTLIBRARY_ITEM_PHOTO_PLACEHOLDER and a
   translated string cannot live in a stylesheet. */
.pestlibrary-card-photo--empty > span {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 1rem;
}
/* One fixed size, replacing .btn-block, which was 100% of the column and so
   varied card to card. padding-top is from the mockup and is deliberate: with
   box-sizing:border-box it shifts the label down inside the content box, which
   is the rendering that was approved. */
.pestlibrary-card-cta {
  margin-top: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 200px;
  max-width: 100%;
  height: 44px;
  padding-top: 12px;
}
