/* GSR Trending News 1.0.6 — full Article Cards presentation in one-column sidebar. */
.gsr-trending-mount { width:100%; min-width:0; }
.gsr-trending, .gsr-trending * {box-sizing:border-box;}
.gsr-trending {width:100%;min-width:0;margin:0 0 20px;background:transparent;color:#15232c;font-family:Arial,Helvetica,sans-serif;}
.gsr-trending__heading-panel {background:#fff;padding:13px 13px 10px;margin:0 0 12px;box-shadow:0 3px 14px rgba(0,0,0,.09);}
.gsr-trending__heading {display:flex;align-items:center;gap:10px;margin:0!important;padding:0 0 10px;border:0;border-bottom:1px solid #e4e4e4;font:700 22px/1.3 'Libre Baskerville',Georgia,serif;letter-spacing:-.35px;text-transform:uppercase;color:#15232c;-webkit-text-stroke:.4px #15232c;}
.gsr-trending__heading::before {content:"";flex:0 0 4px;width:4px;height:26px;background:#a71919;}
/* Reuse the canonical Article Cards markup, selectors, typography, and click target.
   Only override the home-page grid COLUMN count for this sidebar instance. */
#page .gsr-trending .fairy-content-area.fairy-masonry.gsr-trending__cards {
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:20px!important;
 width:100%!important;margin:0!important;height:auto!important;min-height:0!important;
 padding:0!important;align-items:stretch!important;box-sizing:border-box!important;
}
#page .gsr-trending .gsr-trending__cards > article {width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;margin:0!important;position:static!important;height:auto!important;}
#page .gsr-trending .gsr-trending__cards > article .card-blog-post {height:100%!important;}
/* The heading/card should not get a second padded/shadowed parent from Fairy's widget shell. */
#secondary .widget:has(.gsr-trending-mount),
#secondary .wp-block-shortcode:has(.gsr-trending-mount) {
 padding:0!important;margin-bottom:0!important;background:transparent!important;
 box-shadow:none!important;border:0!important;
}
/* Inline clock icon matches the 12px book/metadata icons on Article Cards. */
#page .gsr-trending .gsr-trending__clock {width:12px;height:12px;flex:0 0 12px;display:inline-block;fill:none;stroke:#64717a;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
#page .gsr-trending .gsr-trending__cards .posted-on {display:inline-flex;align-items:center;gap:5px;}
/* Missing-image fallback has the same 16:9 media size as the article cards. */
#page .gsr-trending .gsr-trending__placeholder {display:flex;align-items:center;justify-content:center;aspect-ratio:16/9;width:100%;background:#c5c5c5;}
#page .gsr-trending .gsr-trending__placeholder svg {width:43%;height:auto;fill:none;stroke:#fff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;opacity:.85;}
/* Prevent browser/WordPress widget defaults from styling card bullets as sidebar lists. */
#page .gsr-trending .gsr-trending__cards .gsr-card-highlights {list-style:none!important;}
@media (max-width:767px) {
 .gsr-trending {margin-bottom:16px;}
 .gsr-trending__heading-panel {padding:10px;margin-bottom:12px;}
 .gsr-trending__heading {font-size:18px;line-height:1.35;padding-bottom:8px;letter-spacing:-.2px;}
 .gsr-trending__heading::before {height:22px;}
 /* Match the phone-only 16px inset used by Latest News masonry articles. */
 #page .gsr-trending .gsr-trending__cards > article {padding:0 16px 18px!important;}
}
@media (prefers-reduced-motion:reduce) {
 #page .gsr-trending .gsr-trending__cards .card-blog-post,
 #page .gsr-trending .gsr-trending__cards .card_media img {transition:none!important;}
}

/* Hide a zero-result shortcode AND its Fairy/WordPress sidebar widget shell.
   The shortcode's empty mount remains in the DOM for AJAX population.
   Once views qualify, JS removes the empty marker and CSS reveals the widget.
   :empty also covers previously cached HTML from earlier plugin versions.
   Scope to widgets containing our exact plugin mount; never hide other widgets. */
.gsr-trending-mount[data-gsr-trending-empty="1"],
.gsr-trending-mount:empty { display:none!important; }
#secondary .widget:has(.gsr-trending-mount[data-gsr-trending-empty="1"]),
#secondary .widget:has(.gsr-trending-mount:empty),
#secondary .wp-block-shortcode:has(.gsr-trending-mount[data-gsr-trending-empty="1"]),
#secondary .wp-block-shortcode:has(.gsr-trending-mount:empty) {
  display:none!important;
}

/* v1.0.7: Trending ranking badges now replace category badges on the image.
   Use the same top-left placement, padding, type scale, and corner radius as the
   masonry-card category labels so the Trending cards feel fully consistent. */
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 6px 9px !important;
  margin: 0 !important;
  background: #15232c !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.2px !important;
  text-transform: uppercase !important;
  white-space: nowrap;
  pointer-events: none;
}
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--1 {
  background: #a71919 !important;
}
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--2,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--3,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--4,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--5,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--6,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--7,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--8,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--9,
#page .gsr-trending .gsr-trending__cards > article .card_media > a > .gsr-trending__rank--10 {
  background: #15232c !important;
}
