/* Pakistan News child theme: follow, engagement, and activity presentation. */

.pn-headline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 4px;
}

.pn-headline-row .entry-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.pn-headline-follow {
  flex: 0 0 auto;
  padding-top: 4px;
}

.pn-npa-follow,
.pn-eng-action,
.pn-comments-action {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--bb-alternate-text-color, #667085);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.pn-npa-follow:hover,
.pn-npa-follow:focus,
.pn-eng-action:hover,
.pn-eng-action:focus,
.pn-comments-action:hover,
.pn-comments-action:focus {
  color: var(--bb-primary-color, #008a45);
  outline: none;
}

.pn-npa-follow:focus-visible,
.pn-eng-action:focus-visible,
.pn-comments-action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.pn-npa-follow i,
.pn-eng-action i,
.pn-comments-action i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 !important;
  font-size: 20px;
  line-height: 1;
}

.pn-npa-follow.is-following {
  color: var(--bb-primary-color, #008a45);
}

.pn-npa-follow.is-busy {
  opacity: .58;
  pointer-events: none;
}

.pn-headline-follow .pn-npa-follow,
.pn-topic-engagement .pn-npa-follow {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(0, 138, 69, .28);
  border-radius: 999px;
  background: #fff;
  color: var(--bb-primary-color, #008a45);
  white-space: nowrap;
}

.pn-headline-follow .pn-npa-follow.is-following,
.pn-topic-engagement .pn-npa-follow.is-following {
  background: var(--bb-primary-color, #008a45);
  border-color: var(--bb-primary-color, #008a45);
  color: #fff;
}

.pn-engagement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  clear: both;
  margin: 7px 0 12px;
}

.pn-engagement--single {
  justify-content: flex-start;
  margin: 7px 0 14px;
}

.pn-engagement .pn-eng-meta,
.pn-news-meta,
.pn-meta-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--bb-alternate-text-color, #707782);
  font-size: 12px;
  line-height: 1.45;
}

.pn-news-avatars,
.pn-eng-avatars {
  display: inline-flex;
  align-items: center;
}

.pn-news-avatars > *,
.pn-eng-avatar-link {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-inline-start: -9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .09);
}

.pn-news-avatars > *:first-child,
.pn-eng-avatar-link:first-child {
  margin-inline-start: 0;
}

.pn-news-mini-avatar,
.pn-eng-avatar {
  display: block;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.pn-entry-meta {
  display: block;
  width: 100%;
  margin: 8px 0 10px;
}

.pn-entry-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  margin: 0 !important;
  padding: 0;
  border-top: 1px solid rgba(0, 0, 0, .08);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.pn-entry-actions > .pn-eng-action,
.pn-entry-actions > .pn-npa-follow,
.pn-entry-actions > .pn-comments-action {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border-inline-end: 1px solid rgba(0, 0, 0, .08);
  border-radius: 0;
}

.pn-entry-actions > :last-child {
  border-inline-end: 0;
}

.pn-entry-meta--archive .pn-entry-actions {
  margin-top: 6px !important;
}

/* Archive cards are intentionally icon-only; labels stay accessible. */
.pn-entry-meta--archive .pn-action-label,
.pn-entry-meta--archive .pn-npa-label,
.pn-entry-meta--archive .comments-count {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.pn-entry-meta--archive .pn-entry-actions i {
  font-size: 21px;
}

.pn-entry-meta--single .pn-action-label,
.pn-entry-meta--single .pn-npa-label,
.pn-entry-meta--single .comments-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pn-entry-meta--single .comments-count .bb-comment-text {
  display: inline;
}

.pn-archive-footer-meta {
  display: block;
  width: 100%;
  margin: 3px 0 6px;
  color: var(--bb-alternate-text-color, #707782);
  font-size: 12px;
  line-height: 1.4;
}

.pn-category-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.pn-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(0, 138, 69, .2);
  border-radius: 999px;
  background: rgba(0, 138, 69, .07);
  color: var(--bb-primary-color, #00783e) !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
}

.pn-card-photo-badge {
  position: absolute;
  inset-block-start: 13px;
  inset-inline-start: 13px;
  z-index: 11;
  pointer-events: none;
}

.pn-card-photo-badge:empty {
  display: none;
}

.pn-developing-badge,
.pn-eng-developing {
  display: inline-flex !important;
  align-items: center;
  padding: 6px 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #b00020 !important;
  box-shadow: 0 2px 9px rgba(0, 0, 0, .18);
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.post-inner-wrap,
.entry-media,
.entry-img {
  position: relative;
}

.pn-topic-engagement {
  margin: 8px 0 16px;
}

.pn-single-report-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 28px 0 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.pn-single-report-wrap .pn-eng-report {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
}

.pn-single-report-wrap .pn-eng-report:hover {
  color: #b00020;
  background: rgba(176, 0, 32, .06);
}

.pn-npa-toast {
  position: fixed;
  inset-inline-start: 50%;
  inset-block-end: 24px;
  transform: translateX(-50%) translateY(10px);
  z-index: 999999;
  max-width: min(90vw, 520px);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(17, 17, 17, .96);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  text-align: center;
  transition: opacity .18s ease, transform .18s ease;
}

.pn-npa-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pn-bb-activity-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pn-bb-activity-head .activity-avatar {
  flex: 0 0 auto;
  margin: 0 !important;
}

.pn-bb-activity-head .activity-header {
  flex: 1 1 auto;
  min-width: 0;
}

.pn-bb-activity-head--news-org {
  display: block;
}

.pn-news-org-activity .bp-generic-meta.activity-meta,
.pn-news-org-activity .bb-guest-action-buttons {
  display: none !important;
}

html[lang^="ur"] .pn-headline-row,
body.rtl .pn-headline-row,
html[lang^="ur"] .pn-engagement,
body.rtl .pn-engagement,
html[lang^="ur"] .pn-entry-actions,
body.rtl .pn-entry-actions,
html[lang^="ur"] .pn-category-badges,
body.rtl .pn-category-badges {
  direction: rtl;
  text-align: right;
}

html[lang^="ur"] .pn-npa-follow,
body.rtl .pn-npa-follow,
html[lang^="ur"] .pn-eng-action,
body.rtl .pn-eng-action,
html[lang^="ur"] .pn-comments-action,
body.rtl .pn-comments-action,
html[lang^="ur"] .pn-category-badge,
body.rtl .pn-category-badge {
  font-family: "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
  letter-spacing: 0;
}

@media (max-width: 620px) {
  .pn-headline-row {
    gap: 9px;
  }

  .pn-headline-follow .pn-npa-follow {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .pn-headline-follow .pn-npa-follow i {
    font-size: 18px;
  }

  .pn-entry-actions > .pn-eng-action,
  .pn-entry-actions > .pn-npa-follow,
  .pn-entry-actions > .pn-comments-action {
    min-height: 48px;
    padding: 10px 6px;
  }

  .pn-entry-meta--single .pn-entry-actions {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .pn-headline-row {
    flex-wrap: wrap;
  }

  .pn-headline-follow {
    width: 100%;
    padding-top: 0;
  }

  .pn-headline-follow .pn-npa-follow {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pn-npa-follow,
  .pn-eng-action,
  .pn-comments-action,
  .pn-npa-toast {
    transition: none;
  }
}


/* ============================================================
 * Pakistan News 3.6 production layout refinements.
 * ============================================================ */

/* Headline follow buttons: idle is solid green; following is white/green. */
.pn-headline-follow .pn-npa-follow,
.pn-card-headline-follow .pn-npa-follow,
.pn-topic-engagement .pn-npa-follow {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--bb-primary-color, #008a45);
  border-radius: 999px;
  background: var(--bb-primary-color, #008a45);
  color: #fff;
  white-space: nowrap;
}

.pn-headline-follow .pn-npa-follow:hover,
.pn-headline-follow .pn-npa-follow:focus,
.pn-card-headline-follow .pn-npa-follow:hover,
.pn-card-headline-follow .pn-npa-follow:focus,
.pn-topic-engagement .pn-npa-follow:hover,
.pn-topic-engagement .pn-npa-follow:focus {
  background: #006f39;
  border-color: #006f39;
  color: #fff;
}

.pn-headline-follow .pn-npa-follow.is-following,
.pn-card-headline-follow .pn-npa-follow.is-following,
.pn-topic-engagement .pn-npa-follow.is-following {
  background: #fff;
  border-color: var(--bb-primary-color, #008a45);
  color: var(--bb-primary-color, #008a45);
}

.pn-headline-follow .pn-npa-follow.is-following:hover,
.pn-card-headline-follow .pn-npa-follow.is-following:hover,
.pn-topic-engagement .pn-npa-follow.is-following:hover {
  background: rgba(0, 138, 69, .06);
  color: var(--bb-primary-color, #008a45);
}

/* Archive headline follow sits below the headline and keeps its text visible. */
.pn-card-headline-follow {
  display: flex;
  width: 100%;
  align-items: center;
}

.pn-card-headline-follow .pn-npa-follow {
  width: auto;
}

.pn-card-headline-follow .pn-npa-label {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: nowrap !important;
}

/* Update information and actions are always separate full-width rows. */
.pn-entry-meta--archive {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  clear: both;
}

.pn-entry-meta--archive .pn-archive-footer-meta {
  display: block !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  margin: 3px 0 7px !important;
}

.pn-entry-meta--archive .pn-entry-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  clear: both;
  margin: 0 !important;
}

/* Single action row is directly attached beneath the featured image. */
.pn-entry-meta--single {
  width: 100% !important;
  margin: 0 0 14px !important;
}

.pn-entry-meta--single .pn-entry-actions {
  width: 100% !important;
}

/* Category capsule rendered over the photo under Developing Story. */
.pn-category-badges--photo {
  display: flex;
  margin: 0 !important;
  padding: 0;
  gap: 0;
}

.pn-category-badges--photo .pn-category-badge {
  min-height: 23px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 93, 51, .28);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(0, 0, 0, .18);
  color: #075c35 !important;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

/* Retain the same capsule proportions for Developing Story and category. */
.pn-developing-badge,
.pn-eng-developing,
.pn-category-badges--photo .pn-category-badge {
  min-height: 23px !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* Legacy under-title category output should not appear when the photo overlay exists. */
.post-grid .pn-category-badges--archive-card {
  display: none !important;
}

@media (max-width: 620px) {
  .pn-card-headline-follow .pn-npa-follow {
    width: 100%;
    min-height: 38px;
  }
}


/* ============================================================
 * v3.7.0: compact archive follow capsule and multi-revisor stack.
 * ============================================================ */
.pn-card-headline-follow {
  margin: 4px 0 6px !important;
  min-height: 23px;
}

.pn-card-headline-follow .pn-npa-follow {
  width: auto !important;
  min-width: 0 !important;
  min-height: 23px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  gap: 5px !important;
}

.pn-card-headline-follow .pn-npa-follow i {
  font-size: 13px !important;
  line-height: 1 !important;
}

.pn-news-avatars,
.pn-eng-avatars {
  flex-wrap: wrap;
  row-gap: 3px;
  padding-inline-end: 5px;
}

.pn-eng-meta--single-title .pn-eng-avatar-link,
.pn-single-story-meta .pn-eng-avatar-link {
  margin-inline-start: -8px;
}

.pn-eng-meta--single-title .pn-eng-avatar-link:first-child,
.pn-single-story-meta .pn-eng-avatar-link:first-child {
  margin-inline-start: 0;
}

@media (max-width: 620px) {
  .pn-card-headline-follow .pn-npa-follow {
    width: auto !important;
    min-height: 23px !important;
  }
}

/* v3.8.7: named author/editor identities and language-correct sharing. */
.pn-news-people {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  min-width: 0;
}

.pn-news-person {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: inherit !important;
  text-decoration: none !important;
}

.pn-news-person__avatar {
  flex: 0 0 28px;
  width: 28px !important;
  height: 28px !important;
  border: 2px solid #fff;
  border-radius: 50% !important;
  object-fit: cover;
}

.pn-news-person__text {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.pn-news-person__name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pn-news-person__role {
  color: #687483;
  font-size: 10px;
  font-weight: 600;
}

.pn-verified-sources-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 4px 9px 4px 5px;
  color: #075c35;
  background: #eaf8f0;
  border: 1px solid rgba(7, 92, 53, .2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.pn-verified-sources-badge__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: #fff;
  background: #078b47;
  border-radius: 50%;
  font-size: 10px;
}
