/*
 * Newsletter preview modal (Phase 3, 2026-07-14) — chrome for the
 * #np-newsletter-modal shell + .np-newsletter-modal-content that
 * barrioNpmNewsletterModal clones into it on card click.
 *
 * Modal-lg width per D-6 (browse-friendly not immersive). Structure
 * mirrors the publication + arotahi modals: a top grid row with the
 * cover on the left and eyebrow (newsletter type) + title +
 * issue · date meta on the right, then description snippet, an
 * action-buttons row for "View pdf" (renderable files) + Download,
 * and a "See full page →" bottom link — all full-width below the grid.
 *
 * D-5 keeps this in a separate file. Consolidation to a shared
 * preview-modal.css is a valid post-ship follow-up now that three
 * near-identical files exist (see plan §11 D-5).
 *
 * See publication-landing-card-modals-plan.md §5 for design rationale.
 */

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

/* Top row — cover-left + head-right, mirroring .np-arotahi-modal-grid.
   Newsletter covers are portrait-oriented (issue thumbnails), so the
   cover column is a fixed 180px and the image is height-constrained.
   Collapses to a single-column stack at <576px (phone). */
.np-newsletter-modal-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 24px;
}

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

.np-newsletter-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-newsletter-modal-head {
  min-width: 0;
}

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

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

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

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

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

/* Action-buttons row — "View pdf" (renderable file → attachment modal
   handoff via .js-np-file-view) + "Download" (plain tracked download).
   Both buttons are the same visual weight; primary distinction is
   the icon + label. Wraps at narrow widths. */
.np-newsletter-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.np-newsletter-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #2c2c2b;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background-color .12s;
}

.np-newsletter-modal-action:hover {
  background: #4c4842;
  color: #fff;
  text-decoration: none;
}

.np-newsletter-modal-action--download {
  background: #fff;
  color: #2c2c2b;
  border: 1px solid #2c2c2b;
}

.np-newsletter-modal-action--download:hover {
  background: #f0ece3;
  color: #2c2c2b;
}

.np-newsletter-modal-action-ext {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

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

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

/* Close button — parallels publication + arotahi modal close styling. */
.np-newsletter-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. */
  .np-newsletter-modal .modal-body {
    padding: 24px 22px 18px;
  }
  .np-newsletter-modal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .np-newsletter-modal-cover {
    max-width: 180px;
    margin: 0 auto;
  }
  .np-newsletter-modal-title {
    font-size: 20px;
  }
  .np-newsletter-modal-action {
    flex: 1 1 auto;
    justify-content: center;
  }
}
