/* =============================================================
   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, so cards always render the
   tukutuku cover (no photo variant). Cover markup = <div class="np-e-
   panui-cover"><p class="np-cover-word">…</p></div>.

   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), so the top
   is always the tukutuku header strip (.np-e-panui-cover markup in the
   template). Card is a flex column: cover → body area (title/date/summary
   inside the anchor) → sibling read-online link. Padding: 0 on the card
   itself so the cover caps flush; body + link get their own inner padding.
   overflow: hidden clips the cover's 8px top corners to the card radius. */
.np-epanui-card {
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.np-epanui-card-main {
  display: block;
  padding: 14px 16px 12px;
  text-decoration: 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 ------------------------------ */

/* Row-card variant — compact padding + small label. Hero / small
   variants override in css/e-panui-spotlight.css. */
.np-epanui-card .np-e-panui-cover {
  padding: 10px 16px;
}
.np-epanui-card .np-cover-word {
  font-size: 12px;
  letter-spacing: 0.04em;
}
