/*
 * Publication preview modal (Phase 1, 2026-07-14) — chrome for the
 * #np-publication-modal shell + .np-publication-modal-content that
 * barrioNpmPublicationModal clones into it on card click.
 *
 * Modal-lg width per D-6 (browse-friendly not immersive). Structure
 * mirrors the researcher modal's person-style layout: a top grid row
 * with the cover on the left and citation-style title + authors + meta +
 * publisher + DOI on the right, then abstract snippet, attached files
 * (reuses .np-file-* from _attachment-list.html.twig), and a "See full
 * page →" bottom link — all full-width below the grid.
 *
 * See publication-landing-card-modals-plan.md §3 for design rationale.
 */

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

/* Top row — cover-left + citation-right, mirroring the researcher-modal's
   .np-profile-grid. Publication covers are portrait-oriented (book / PDF
   thumbs, ~3:4) rather than square portraits, so the cover column is a
   fixed 180px and the image is height-constrained rather than aspect-locked.
   Collapses to a single-column stack at <576px (phone). */
.np-publication-modal-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 24px;
}

.np-publication-modal-cover {
  margin: 0;
}

.np-publication-modal-cover img {
  width: 100%;
  max-height: 240px;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(44, 44, 43, 0.15);
}

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

.np-publication-modal-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #2c2c2b;
}

.np-publication-modal-authors {
  margin: 0 0 8px;
  font-size: 15px;
  color: #575349;
}

.np-publication-modal-meta {
  margin: 0 0 4px;
  font-size: 13px;
  color: #8a8377;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.np-publication-modal-publisher,
.np-publication-modal-doi {
  margin: 0 0 4px;
  font-size: 13px;
  color: #575349;
}

.np-publication-modal-doi a {
  color: #2c2c2b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.np-publication-modal-doi a:hover {
  color: #000;
}

.np-publication-modal-abstract {
  margin: 20px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #2c2c2b;
}

.np-publication-modal-abstract p {
  margin: 0 0 12px;
}

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

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

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

/* Close button — .np-publication-modal-close styled via the shared shell's
   btn-close-white variant. Overlays the top of the modal-content; sized +
   positioned like the article + grant modal close buttons. */
.np-publication-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, citation-below at phone width. Cover shrinks to
     a comfortable centred thumbnail so the citation gets the full row. */
  .np-publication-modal .modal-body {
    padding: 24px 22px 18px;
  }
  .np-publication-modal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .np-publication-modal-cover {
    max-width: 180px;
    margin: 0 auto;
  }
  .np-publication-modal-title {
    font-size: 20px;
  }
}
