/**
 * 뉴스포털 — 본문·nph GNB 문자 전용 (사이트 chrome 아이콘은 허용)
 * @see docs/NEWS_PORTAL_UI.md
 */

/* ── Chrome layer: 필수 아이콘 표시 (모바일 헤더·윙·챗봇·위로가기·통합탑바) ── */
[data-menu="news"] .l14-shell > header i[class*="fa-"],
[data-menu="news"] .l14-s13 i[class*="fa-"],
[data-menu="news"] .l14-s14 i[class*="fa-"],
[data-menu="news"] .l14-wing-ad i[class*="fa-"],
[data-menu="news"] #layout-wings i[class*="fa-"],
[data-menu="news"] #cb-fab i[class*="fa-"],
[data-menu="news"] #fv4-totop i[class*="fa-"],
[data-menu="news"] .fv4-totop i[class*="fa-"],
[data-menu="news"] .nhx2-root i[class*="fa-"],
[data-menu="news"] .ntb-root i[class*="fa-"],
[data-menu="news"] .s2-search-btn i[class*="fa-"],
[data-menu="news"] .fv4-sns i[class*="fa-"],
.news-portal-text-only .l14-shell > header i[class*="fa-"],
.news-portal-text-only .l14-s13 i[class*="fa-"],
.news-portal-text-only .l14-s14 i[class*="fa-"],
.news-portal-text-only #cb-fab i[class*="fa-"],
.news-portal-text-only #fv4-totop i[class*="fa-"],
.news-portal-text-only .nhx2-root i[class*="fa-"] {
  display: inline-block !important;
  font-style: normal;
}

[data-menu="news"] .nhx2-iconbtn .np-txt,
[data-menu="news"] .nhx2-cats-allbtn .np-txt,
.news-portal-text-only .nhx2-iconbtn .np-txt,
.news-portal-text-only .nhx2-cats-allbtn .np-txt {
  display: none !important;
}

/* ── 본문·nph: GNB/액션 칩 등 장식 아이콘 숨김 (문자 라벨 SSOT) ── */
[data-menu="news"] .nph-root .nph-cats1-chip i[class*="fa-"],
[data-menu="news"] .nph-root .nph-actions i[class*="fa-"],
[data-menu="news"] .nph-root .nph-cats2-chip i[class*="fa-"],
[data-menu="news"] .nph-root .nph-cats3-chip i[class*="fa-"],
[data-menu="news"] .nph-root .nph-domain-chip i[class*="fa-"],
[data-menu="news"] .jhi-main i[class*="fa-"]:not(.jhi-required-icon),
[data-menu="news"] .nl-list-wrap i[class*="fa-"],
[data-menu="news"] .nl-list-wrap .nl-bp-page-header i[class*="fa-"],
[data-menu="news"] .nl-list-wrap .nl-bp-search-wrap i[class*="fa-"],
[data-menu="news"] .nl-pmode-btn i[class*="fa-"],
[data-menu="news"] .nl-act-btn i[class*="fa-"],
[data-menu="news"] .nl-view-btn i[class*="fa-"],
.news-portal-text-only .nph-root .nph-cats1-chip i[class*="fa-"],
.news-portal-text-only .jhi-main i[class*="fa-"]:not(.jhi-required-icon) {
  display: none !important;
}

[data-menu="news"] .np-txt,
.news-portal-text-only .np-txt {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

[data-menu="news"] .nl-pmode-btn,
[data-menu="news"] .nl-act-btn,
[data-menu="news"] .nl-view-btn,
.news-portal-text-only .nl-pmode-btn,
.news-portal-text-only .nl-act-btn,
.news-portal-text-only .nl-view-btn {
  min-width: auto;
  padding-inline: 0.65em;
  font-size: 14px;
  font-weight: 600;
}

[data-menu="news"] .nl-view-btn .np-txt,
.news-portal-text-only .nl-view-btn .np-txt {
  display: inline;
  font-weight: 700;
}

[data-menu="news"] .nl-pmode-btn:not(:has(.np-txt))::after,
.news-portal-text-only .nl-pmode-btn:not(:has(.np-txt))::after {
  content: attr(title);
}

[data-menu="news"] .nl-act-btn:not(:has(.np-txt))::after,
.news-portal-text-only .nl-act-btn:not(:has(.np-txt))::after {
  content: attr(title);
}

[data-menu="news"] .nl-view-btn:not(:has(.np-txt))::after,
.news-portal-text-only .nl-view-btn:not(:has(.np-txt))::after {
  content: attr(title);
}

[data-menu="news"] .nl-act,
.news-portal-text-only .nl-act {
  width: auto;
  min-width: 2.4em;
  padding: 0 7px;
  font-size: 14px;
  font-weight: 700;
}

[data-menu="news"] .nl-act .np-txt,
.news-portal-text-only .nl-act .np-txt {
  display: inline;
}

[data-menu="news"] .nd-ab-btn-label,
[data-menu="news"] .nd-ab-sns-label,
[data-menu="news"] .nd-ab-back,
[data-menu="news"] .nd-engage-react-label,
.news-portal-text-only .nd-ab-btn-label,
.news-portal-text-only .nd-ab-sns-label,
.news-portal-text-only .nd-ab-back,
.news-portal-text-only .nd-engage-react-label {
  display: inline !important;
}

[data-menu="news"] .nd-ab-back,
[data-menu="news"] .nd-ab-btn,
[data-menu="news"] .nd-ab-sns,
[data-menu="news"] .nd3-share-btn,
[data-menu="news"] .nf-cp-btn,
[data-menu="news"] .nf-sns-btn,
.news-portal-text-only .nd-ab-back,
.news-portal-text-only .nd-ab-btn,
.news-portal-text-only .nd-ab-sns,
.news-portal-text-only .nd3-share-btn,
.news-portal-text-only .nf-cp-btn,
.news-portal-text-only .nf-sns-btn {
  width: auto;
  min-width: 2.4em;
}

[data-menu="news"] .nd3-share-btn span,
[data-menu="news"] .nf-sns-btn .np-txt,
[data-menu="news"] .nf-cp-btn .np-txt,
.news-portal-text-only .nd3-share-btn span,
.news-portal-text-only .nf-sns-btn .np-txt,
.news-portal-text-only .nf-cp-btn .np-txt {
  display: inline !important;
  font-size: 14px;
  font-weight: 700;
}

[data-menu="news"] .nhx2-tree-icon,
.news-portal-text-only .nhx2-tree-icon {
  display: none !important;
}

[data-menu="news"] .nhx2-tree-caret,
.news-portal-text-only .nhx2-tree-caret {
  display: inline !important;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  margin-left: 4px;
}

[data-menu="news"] .nhx2-tree-caret:empty::after,
.news-portal-text-only .nhx2-tree-caret:empty::after {
  content: '▸';
}

/* jhi 필수 아이콘(섹션·퀵액션) — chrome 허용 목록에 포함 */
[data-menu="news"] .jhi-main .jhi-required-icon,
[data-menu="news"] .jhi-main .jhi-section-head i[class*="fa-"],
[data-menu="news"] .jhi-main .jhi-action-icon i[class*="fa-"],
.news-portal-text-only .jhi-main .jhi-required-icon {
  display: inline-block !important;
  font-style: normal;
}

/* ① 정체성 — 모바일 뉴스 라벨·YEOSU NEWS 차별화 */
@media (max-width: 768px) {
  [data-menu="news"] .nph-identity--news,
  .news-portal-text-only .nph-identity--news {
    align-items: flex-start;
    gap: 8px;
  }
  [data-menu="news"] .nph-identity--news .nph-identity-mark,
  .news-portal-text-only .nph-identity--news .nph-identity-mark {
    width: auto;
    min-width: 34px;
    height: 22px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 800;
    background: var(--nph-accent, #0857aa);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--nph-accent, #0857aa) 28%, transparent);
  }
  [data-menu="news"] .nph-identity--news .nph-identity-mark .np-txt,
  .news-portal-text-only .nph-identity--news .nph-identity-mark .np-txt {
    display: inline;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
  }
  [data-menu="news"] .nph-identity--news .nph-identity-text,
  .news-portal-text-only .nph-identity--news .nph-identity-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  [data-menu="news"] .nph-identity--news .nph-brand-en,
  .news-portal-text-only .nph-identity--news .nph-brand-en {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--nph-accent, #0857aa);
  }
  [data-menu="news"] .nph-identity--news .nph-identity-slogan,
  .news-portal-text-only .nph-identity--news .nph-identity-slogan {
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

@media (max-width: 480px) {
  [data-menu="news"] .nph-identity--news .nph-identity-mark,
  .news-portal-text-only .nph-identity--news .nph-identity-mark {
    min-width: 32px;
    height: 20px;
    padding: 0 7px;
  }
  [data-menu="news"] .nph-identity--news .nph-brand-en,
  .news-portal-text-only .nph-identity--news .nph-brand-en {
    font-size: 14px;
  }
}
