/*
 * Project preview modal (2026-07-14) — chrome for the #np-project-modal
 * shell + .np-project-modal-content that barrioNpmProjectModal clones
 * into it on card click. Opens from _project-teaser.html.twig (row
 * cards on project_search page displays) and _spotlight-card.html.twig
 * (Whakaaweawe hero + smalls on Pātai / project-type landing pages).
 *
 * Modal-lg width per D-6 (browse-friendly not immersive). Structure
 * mirrors the researcher/person modal's layout — cover on the left,
 * eyebrow + title + kaiārahi + whare wānanga + wā rangahau on the
 * right — with description and 'View full project →' link full-width
 * below the grid.
 *
 * D-5 keeps this in its own file. Colour scheme is static neutral for
 * MVP; a follow-up polish could pull the Pātai --hue cascade into the
 * eyebrow + detail-link accent per D-4 (deferred).
 *
 * See documentation/project-modal-plan.md §8 for design rationale.
 */

.np-project-modal .modal-body {
  padding: 32px 40px 24px;
}

/* Top row — cover-left + head-right, mirroring the researcher-modal
   .np-profile-grid. Project images are typically landscape hero shots,
   so the cover column is 220px (a touch wider than the portrait-oriented
   arotahi/publication modals). Collapses to a single-column stack at
   <576px (phone). */
.np-project-modal-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 24px;
}

/* No-image variant — projects that lack field_featured_image (and its
   field_image fallback) collapse the grid to a single column so the
   title + meta rows use the full modal width instead of squeezing into
   the 220px image column. Twig adds the modifier when
   `np_project_card.image_url` is empty. */
.np-project-modal-grid--no-image {
  grid-template-columns: 1fr;
}

.np-project-modal-image {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f1ece1;
  aspect-ratio: 1 / 1;
}

.np-project-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.np-project-modal-head {
  min-width: 0;
}

.np-project-modal-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6c675f;
}

.np-project-modal-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #2c2c2b;
  letter-spacing: -0.2px;
}

/* Meta rows — labelled key/value pairs mirroring the researcher modal's
   .np-profile-meta-* shape. Bilingual keys are muted, values are
   full-weight readable text. */
.np-project-modal-meta-row {
  margin-bottom: 10px;
}

.np-project-modal-meta-row:last-child {
  margin-bottom: 0;
}

.np-project-modal-meta-key {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6c675f;
  margin-bottom: 2px;
}

.np-project-modal-meta-value {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: #2c2c2b;
}

/* Matakitenga · Framework row — Pātai (clickable) + Pae pills. Uses
   the shared .np-dot + .np-d-patai-* / .np-d-pae-* colour system from
   patai.css. No pill background — matches the detail-rail treatment
   (list-of-dot-plus-label, no visual chip weight). Dot 8px matches the
   teaser Pae dots per projects-by-patai-theming.md §CSS · Dot widget.
   Added 2026-07-14 per project-modal-plan.md §17. */
.np-project-modal-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.np-project-modal-pills li,
.np-project-modal-pills a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #2c2c2b;
}

.np-project-modal-pills a {
  text-decoration: none;
}

.np-project-modal-pills a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.np-project-modal-pills .np-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
  /* background comes from .np-d-patai-* / .np-d-pae-* in patai.css */
}

/* Body — the project's summary paragraph via
   ProjectFieldExtractor::bodySummary(). Reuses the reading rhythm the
   researcher-modal body uses so descriptions in one modal are visually
   consistent with the other. */
.np-project-modal-body {
  margin: 20px 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #2c2c2b;
  padding-top: 18px;
  border-top: 1px solid #e4e0d8;
}

.np-project-modal-body p {
  margin: 0 0 12px;
}

.np-project-modal-body p:last-child {
  margin-bottom: 0;
}

.np-project-modal-detail-link {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e7e2d8;
  text-align: right;
}

.np-project-modal-detail-link a {
  font-size: 14px;
  font-weight: 700;
  color: #2c2c2b;
  text-decoration: none;
}

.np-project-modal-detail-link a:hover {
  text-decoration: underline;
}

/* Close button — parallels the publication + arotahi + newsletter
   modal close styling. */
.np-project-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

@media (max-width: 575.98px) {
  /* Stack cover-on-top, head-below at phone width. Cover shrinks to a
     centred thumbnail. */
  .np-project-modal .modal-body {
    padding: 24px 22px 18px;
  }
  .np-project-modal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .np-project-modal-image {
    max-width: 220px;
    margin: 0 auto;
  }
  .np-project-modal-title {
    font-size: 20px;
  }
}
