/* =============================================================
   barrio_npm_prototype — e-pānui row / teaser card

   Used by the e_panui_search view's page display
   (/publications/e-panui) via _e-panui-card.html.twig, and by the
   /publications/landing-list cluster via PublicationSearchPreprocess
   dispatching e_panui rows to the same _e-panui-card partial.

   Also holds the shared **.np-e-panui-cover** base rules used by BOTH
   row cards (this file) AND spotlight cards (css/e-panui-spotlight.css
   overrides padding + label size per hero / small variant).

   Load order in barrio_npm_prototype.libraries.yml:
   publication-listing.css → e-panui-teaser.css → e-panui-spotlight.css.
   • AFTER publication-listing.css so .np-epanui-card can override the
     .np-pub-card padding / gap it inherits (both single-class selectors,
     later wins).
   • BEFORE e-panui-spotlight.css so the .np-e-panui-cover base is
     defined before the hero/small variant overrides.

   E-pānui bundle has no field_image. Row cards carry the tukutuku
   treatment on the DATE as a capsule pill (see the .np-epanui-card
   .np-pub-meta rules below); the title itself renders as plain dark
   text on the tile background. Spotlight cards keep the separate
   .np-e-panui-cover band from their own templates.

   Extracted from publication-listing.css + e-panui-spotlight.css
   2026-07-14 per the per-content-type file convention
   (css-organisation.md §2).
   ============================================================= */

/* -------- Row card ------------------------------------------------ */

/* E-Pānui card — no photo cover (bundle has no field_image); the title
   itself carries the tukutuku treatment as a rounded pill (see rules
   below). Card is a flex column: title-pill + date + summary (inside the
   anchor) → sibling read-online link → attached-files list. Padding: 0
   on the card itself so children set their own inner padding.
   overflow: hidden clips inner corners to the card radius. */
.np-epanui-card {
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  /* Release the fixed 230px height inherited from .np-pub-card — e-pānui
     cards are column-layout with a variable-length body summary + optional
     Read-online link + optional attached-file list, so the pub-card's
     fixed-height cover-left-body-right layout doesn't apply. min-height
     preserves grid-row uniformity for empty cards (matches the 230px
     baseline); content-heavy cards (with a file-list) grow past.
     Fixed 2026-08-08 — the fixed height was clipping the file-list off
     the bottom edge on cards with attached files. */
  height: auto;
  min-height: 230px;
}
.np-epanui-card-main {
  display: block;
  padding: 14px 16px 12px;
  text-decoration: none;
}

/* Date-as-pill — inherits the tukutuku treatment (linear-gradient +
   niho-taniwha overlay) from the retired .np-e-panui-cover band and
   sizes to content as a capsule sitting inline-flex under the title.
   Dot prefix borrows the retired .np-cover-word .np-dot marker.
   Title renders plain (base .np-pub-title rule from publication-
   listing.css — near-black text on tile background, no override
   needed). See e-panui-tile-title-pill-plan.md.

   z-index: 0 establishes a stacking context so the ::before pattern
   can sit behind the text at z-index: -1 without escaping the pill. */
.np-epanui-card .np-pub-meta {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  margin: 10px 0;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--np-ct-e_panui-dk), var(--np-ct-e_panui));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.np-epanui-card .np-pub-meta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/npm-pattern-white.png');
  background-repeat: no-repeat;
  background-position: 100% center;
  background-size: auto 250%;
  opacity: 0.22;
  z-index: -1;
  pointer-events: none;
}
.np-epanui-card .np-pub-meta .np-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  flex: none;
}
.np-epanui-read {
  align-self: flex-start;
  padding: 0 16px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--hue, #6c675f);
  text-decoration: none;
}
.np-epanui-read:hover {
  text-decoration: underline;
}
/* Clamped to 3 lines so long summaries don't drive per-card height
   variance across the grid. Matches .np-pub-card-body /
   .np-report-card-body. See browse-modal-card-height-plan.md. */
.np-epanui-card-body {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #575349;
}

/* -------- Shared tukutuku cover ---------------------------------- */

/* Tukutuku cover — coloured header strip using --np-ct-e_panui / -dk
   tokens with the theme's white niho-taniwha PNG layered low-opacity
   over the hue. E-pānui bundle has no field_image so this cover is
   always the tukutuku pattern (no photo variant).

   BASE rules used by BOTH row cards (this file) AND spotlight cards
   (hero + small variants in e-panui-spotlight.css override padding +
   label size on top of these). Mirrors the .np-ph::before pattern in
   patai-spotlight.css lines 335+; opacity 0.22 matches the
   .np-ph--cover reveal on line 475 of that file. */
.np-e-panui-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--np-ct-e_panui-dk), var(--np-ct-e_panui));
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.np-e-panui-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/npm-pattern-white.png');
  background-repeat: no-repeat;
  background-position: 100% center;
  background-size: auto 250%;
  opacity: 0.22;
  pointer-events: none;
}

.np-e-panui-cover .np-cover-word {
  position: relative;              /* sit above ::before */
  z-index: 1;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.np-e-panui-cover .np-cover-word .np-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  flex: none;
}

/* Row-card cover overrides retired 2026-08-05 — the row card no longer
   renders .np-e-panui-cover markup (title-as-pill treatment replaces
   the band). Base .np-e-panui-cover rules above stay for the spotlight
   variants (hero + small) on /publications/e-panui, which still render
   the cover directly from their own templates. */
