/**
 * 뉴스포털 — 문자(라벨) 전용 UI (헌법·판례·NEWS_PORTAL_UI.md)
 * data-menu="news" 및 .news-portal-text-only 범위에서 Font Awesome 전면 비표시.
 * @see docs/NEWS_PORTAL_UI.md · docs/PORTAL_PRECEDENTS.md 제1장 2항
 */

/* ── ① FA 아이콘 전면 숨김 (chrome·본문·검색·드로어 포함) ── */
[data-menu="news"] i[class*="fa-"],
[data-menu="news"] i[class*="fa-"]::before,
.news-portal-text-only i[class*="fa-"],
.news-portal-text-only i[class*="fa-"]::before {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* ── ② nhx2·통합탑바 — 문자 라벨 표시 ── */
[data-menu="news"] .nhx2-iconbtn .np-txt,
[data-menu="news"] .nhx2-cats-allbtn .np-txt,
[data-menu="news"] .nhx2-search-form button .np-txt,
[data-menu="news"] .nhx2-drawer-quick a span,
.news-portal-text-only .nhx2-iconbtn .np-txt,
.news-portal-text-only .nhx2-cats-allbtn .np-txt,
.news-portal-text-only .nhx2-search-form button .np-txt,
.news-portal-text-only .nhx2-drawer-quick a span {
  display: inline !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

[data-menu="news"] .nhx2-notice-label,
.news-portal-text-only .nhx2-notice-label {
  font-size: 14px;
  font-weight: 700;
}

[data-menu="news"] .nhx2-drawer-quick a,
.news-portal-text-only .nhx2-drawer-quick a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}

/* 아코디언·트리 캐럿 — CSS 문자 (FA 대체) */
[data-menu="news"] .g-arrow,
[data-menu="news"] .nhx2-tree-caret,
.news-portal-text-only .g-arrow,
.news-portal-text-only .nhx2-tree-caret {
  display: inline-block !important;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  margin-left: 4px;
  line-height: 1;
}

[data-menu="news"] .nms-group.open .g-arrow::after,
.news-portal-text-only .nms-group.open .g-arrow::after {
  content: '▾';
}

[data-menu="news"] .nms-group:not(.open) .g-arrow::after,
.news-portal-text-only .nms-group:not(.open) .g-arrow::after {
  content: '▸';
}

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

[data-menu="news"] details[open] > summary .nhx2-tree-caret::after,
.news-portal-text-only details[open] > summary .nhx2-tree-caret::after {
  content: '▾';
}

/* 푸터·RNB 아코디언 캐럿 — FA 대체 */
[data-menu="news"] .l14-rnb-l2-arrow::after,
[data-menu="news"] .l14-f1-legal-chev::after,
[data-menu="news"] .l14-community-chev::after,
[data-menu="news"] .l14-f1-chev::after,
[data-menu="news"] .fv4-f1-chev::after,
.news-portal-text-only .l14-rnb-l2-arrow::after,
.news-portal-text-only .l14-f1-legal-chev::after,
.news-portal-text-only .l14-community-chev::after,
.news-portal-text-only .l14-f1-chev::after {
  content: '▸';
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
}

[data-menu="news"] details[open] .l14-f1-legal-chev::after,
[data-menu="news"] details[open] .l14-community-chev::after,
[data-menu="news"] details[open] .l14-f1-chev::after,
[data-menu="news"] details[open] .fv4-f1-chev::after,
.news-portal-text-only details[open] .l14-f1-legal-chev::after,
.news-portal-text-only details[open] .l14-community-chev::after,
.news-portal-text-only details[open] .l14-f1-chev::after {
  content: '▾';
}

/* ── ③ nph·목록·상세 본문 — 장식 아이콘 숨김 (라벨 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-"],
[data-menu="news"] .nl-list-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-"],
[data-menu="news"] .nms-search-wrap i[class*="fa-"],
[data-menu="news"] .nms-filters i[class*="fa-"],
.news-portal-text-only .nph-root .nph-cats1-chip i[class*="fa-"],
.news-portal-text-only .jhi-main i[class*="fa-"],
.news-portal-text-only .nms-search-wrap i[class*="fa-"] {
  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"] .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;
}

/* 통통이 FAB — widget.php 가 FA 비의존 글리프(.cbw-ico)를 자체 제공.
   옛 ::after '챗' 폴백은 이중 표시·빈 버튼 원인이므로 비활성. */
[data-menu="news"] #cb-fab::after,
.news-portal-text-only #cb-fab::after {
  content: none !important;
}
[data-menu="news"] #cb-fab .cbw-ico,
[data-menu="news"] .cbw-hbtn .cbw-ico,
[data-menu="news"] .cbw-send .cbw-ico,
.news-portal-text-only #cb-fab .cbw-ico,
.news-portal-text-only .cbw-hbtn .cbw-ico,
.news-portal-text-only .cbw-send .cbw-ico {
  display: inline-flex !important;
  visibility: visible !important;
  width: auto !important;
  height: auto !important;
  font-size: inherit !important;
  line-height: 1 !important;
  color: inherit !important;
  overflow: visible !important;
}

[data-menu="news"] #fv4-totop::after,
[data-menu="news"] .fv4-totop::after,
.news-portal-text-only #fv4-totop::after,
.news-portal-text-only .fv4-totop::after {
  content: '↑';
  font-size: 16px;
  font-weight: 800;
}

/* ① 정체성 — 모바일 뉴스 라벨·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;
  }
}
