/*
 * Tab "Tin tức" (/tin-tuc/) + trang chi tiết tin tự động.
 *
 * Phần dùng chung với hub (thanh tab .gcl-seg, chip, .gcl-card, .gcl-newsrow, .gcl-tagchip, .gcl-latest,
 * panel Lịch kinh tế) nằm ở news-analysis.css — file này chỉ chứa phần riêng của Tin tức. Màu lấy từ
 * mockup *GCL Trading Platform*: navy #142F3D · vàng #F0AF2B · chữ phụ #68808C · viền #E3E8EB.
 */

.gcl-mnews,
.gcl-mnews *,
.gcl-mnews-single,
.gcl-mnews-single * {
    font-family: var(--gcl-font);
    text-shadow: none;
}

.gcl-mnews,
.gcl-mnews-single {
    color: #2C4553;
    padding-top: 14px;
}

/* Trang chi tiết mở bằng link "Quay lại" nhỏ, không có <h1> lớn như danh sách — đệm thêm 14px là hở thừa. */
.gcl-mnews-single { padding-top: 0; }

/* ── Danh sách ──────────────────────────────────────────────────────────── */

/* Cùng tỉ lệ với hub /nhan-dinh/: panel Lịch kinh tế cần ~420px mới không vỡ cột. */
.gcl-mnews__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.gcl-mnews__main { min-width: 0; }

.gcl-mnews__row { position: relative; }
.gcl-mnews__row:hover .gcl-mnews__link { color: #B07E14; }

/* Dòng vừa được JS chèn (tin mới khi trang đang mở): nền vàng nhạt rồi tắt dần. */
.gcl-mnews__row { transition: background-color 1.2s ease; }
.gcl-mnews__row.is-fresh { background-color: rgba(253, 185, 36, 0.14); }

/* Tiêu đề dòng là <h2> (trang chỉ có một <h1>) — xoá cỡ/lề h2 của theme, giữ đúng nhịp của hub. */
.gcl-mnews .gcl-newsrow__title {
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
    margin: 0 0 4px;
    color: #142F3D;
    letter-spacing: 0;
    text-transform: none;
}

.gcl-mnews__link {
    color: inherit;
    text-decoration: none;
}

/* Cả dòng bấm được nhưng chỉ có MỘT link (tiêu đề) — trình đọc màn hình không nghe hai link trùng. */
.gcl-mnews__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.gcl-mnews__link:focus-visible {
    outline: 2px solid #F0AF2B;
    outline-offset: 2px;
    border-radius: 2px;
}

.gcl-mnews .gcl-newsrow__sum {
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.gcl-mnews .gcl-newsrow__foot .gcl-tag { font-size: 11px; }

/* Nhãn tin tự động xanh dương như mockup — .gcl-tag.is-b dùng chung của hub là xám-navy, lẫn vào hàng tagchip. */
.gcl-mnews .gcl-tag.is-b,
.gcl-mnews-single .gcl-tag.is-b {
    background: #E8F1FA;
    color: #1F5AA6;
    border: 1px solid #B7D3EE;
    border-radius: 7px;
    padding: 2px 9px;
}

.gcl-mnews__srcline {
    margin: 4px 0 0;
    font-size: 12px;
    color: #68808C;
}

.gcl-mnews .gcl-newsrow__thumb {
    width: 120px;
    height: 72px;
}

.gcl-mnews .gcl-newsrow__thumb.has-img { background: #F5F4EF; }

.gcl-mnews__pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 16px 0 8px;
    border-top: 1px solid #EEF2F4;
}

.gcl-mnews__pages .page-numbers {
    position: relative;
    z-index: 1;
}

.gcl-mnews__pages .screen-reader-text,
.gcl-mnews .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.gcl-news-hub__empty a { color: #B07E14; font-weight: 600; }

/* ── Cột phải ───────────────────────────────────────────────────────────── */

.gcl-mnews__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.gcl-mnews__h2 {
    font-size: 15px;
    font-weight: 700;
    color: #142F3D;
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}

.gcl-mnews__cardhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.gcl-mnews__cardhead .gcl-mnews__h2 { margin: 0; }

.gcl-mnews__clear {
    font-size: 12.5px;
    font-weight: 600;
    color: #B07E14;
    text-decoration: none;
}

.gcl-mnews__ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

a.gcl-chip {
    display: inline-block;
    text-decoration: none;
    line-height: 1.3;
}

a.gcl-chip:hover { border-color: #142F3D; color: #142F3D; }
a.gcl-chip.is-on:hover { color: #fff; }

.gcl-mnews__datepick {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 0;
}

.gcl-mnews__datelabel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #68808C;
}

.gcl-mnews__date {
    height: 36px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #C8D3D9;
    border-radius: 6px;
    font-size: 13px;
    color: #142F3D;
    background: #fff;
    box-shadow: none;
    width: 100%;
}

/* Theme ép input trần cao ~50px, chữ 16px — ghim lại cỡ ô theo mockup (.inp). */
.gcl-mnews input.gcl-mnews__date {
    height: 38px !important;
    min-height: 0 !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
}

.gcl-mnews input.gcl-mnews__date:focus { border-color: #142F3D; outline: none; box-shadow: 0 0 0 2px rgba(240, 175, 43, .35) !important; }

.gcl-mnews__go {
    height: 36px;
    margin: 0;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: #142F3D;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* JS tự chuyển trang khi đổi ngày; nút chỉ còn cho trình duyệt tắt JS. */
.gcl-mnews-js .gcl-mnews__go { display: none; }

.gcl-mnews__count {
    margin: 10px 0 0;
    font-size: 12px;
    color: #68808C;
    line-height: 1.5;
}

.gcl-mnews__datecard { padding: 18px 20px; }
.gcl-mnews__top { padding: 18px 0 6px; }
.gcl-mnews__top .gcl-mnews__h2 { padding: 0 20px; }

.gcl-mnews__toplist { list-style: none; margin: 0; padding: 0; }

.gcl-mnews__topitem {
    display: flex;
    gap: 12px;
    padding: 10px 20px;
    border-top: 1px solid #EEF2F4;
    margin: 0;
}

.gcl-mnews__topn {
    width: 18px;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: #E4C88A;
}

.gcl-mnews__topbody { flex: 1; min-width: 0; }

.gcl-mnews__topbody a {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: #142F3D;
    text-decoration: none;
}

.gcl-mnews__topbody a:hover { color: #B07E14; }

.gcl-mnews__topmeta {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #68808C;
}

/* Hàng lọc ngày trên danh sách chỉ dành cho MB; PC đã có thẻ ở cột phải. */
.gcl-mnews__datebar { display: none; }

/* ── Chi tiết ───────────────────────────────────────────────────────────── */

.gcl-mnews__back {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #68808C;
    text-decoration: none;
}

.gcl-mnews__back:hover { color: #142F3D; }

.gcl-mnews-single__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

.gcl-mnews-article { padding: 28px 30px; min-width: 0; }

.gcl-mnews-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

/* Chip đầu bài to hơn chip trong danh sách một bậc, như mockup — đây là nhãn của cả bài. */
.gcl-mnews-article__tags .gcl-tag,
.gcl-mnews-article__tags .gcl-tagchip {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 7px;
}

.gcl-mnews-article__title {
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #142F3D;
    margin: 0;
    text-transform: none;
}

.gcl-mnews-article__byline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 0;
    border-top: 1px solid #EEF2F4;
    border-bottom: 1px solid #EEF2F4;
}

.gcl-mnews-article__author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #142F3D;
}

.gcl-mnews-article__author strong { display: block; font-weight: 700; }

.gcl-mnews-article__avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
    flex-shrink: 0;
    background: #F0AF2B;
    color: #142F3D;
}

.gcl-mnews-article__when {
    display: block;
    font-size: 12px;
    color: #68808C;
}

.gcl-mnews-share { display: flex; flex-wrap: wrap; gap: 8px; }

.gcl-mnews-share__btn {
    display: inline-flex;
    align-items: center;
    height: 30px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #C8D3D9;
    border-radius: 6px;
    background: #fff;
    color: #142F3D;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    min-height: 0;
}

.gcl-mnews-share__btn:hover { border-color: #142F3D; color: #142F3D; }
.gcl-mnews-share__btn.is-zalo { color: #0068FF; border-color: #B7D3EE; }
.gcl-mnews-share__btn[hidden] { display: none; }

.gcl-mnews-share__btn:focus-visible,
.gcl-mnews-trade__btn:focus-visible {
    outline: 2px solid #F0AF2B;
    outline-offset: 2px;
}

.gcl-mnews-article__sapo {
    margin: 18px 0 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.7;
    color: #3A3A38;
}

.gcl-mnews-article__chart { margin: 20px 0 20px; }

.gcl-mnews-article__chart img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #E8E6DF;
    border-radius: 12px;
    background: #fff;
}

.gcl-mnews-article__chart figcaption {
    margin-top: 6px;
    font-size: 12px;
    color: #68808C;
    text-align: left;
}

.gcl-mnews-article__body {
    font-size: 15.5px;
    line-height: 1.85;
    color: #2E2E2C;
}

.gcl-mnews-article__body p { margin: 0 0 16px; }
.gcl-mnews-article__body ul,
.gcl-mnews-article__body ol { margin: 0 0 16px 20px; }

.gcl-mnews-article__sec { margin-top: 26px; }
.gcl-mnews-article__sec .gcl-mnews__h2 { font-size: 17px; }

.gcl-mnews-article__tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gcl-mnews-impact {
    width: 100%;
    min-width: 520px;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
}

.gcl-mnews-impact th,
.gcl-mnews-impact td {
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #EEF2F4;
    text-align: left;
    vertical-align: middle;
}

.gcl-mnews-impact th {
    font-size: 12px;
    font-weight: 600;
    color: #68808C;
}

.gcl-mnews-impact .is-code { font-weight: 700; color: #142F3D; white-space: nowrap; }
.gcl-mnews-impact .is-note { color: #68808C; }

.gcl-mnews-dir {
    display: inline-block;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 7px;
    border: 1px solid transparent;
    padding: 3px 10px;
}

.gcl-mnews-dir.is-up { background: #E5F1E5; color: #2C6E2F; border-color: #B7D9B8; }
.gcl-mnews-dir.is-mild { background: #FBEED2; color: #7A5A15; border-color: #E4C88A; }
.gcl-mnews-dir.is-down { background: #F5DDD9; color: #8B3529; border-color: #E1B4AB; }
.gcl-mnews-dir.is-flat { background: #E8F1FA; color: #1F5AA6; border-color: #B7D3EE; }

.gcl-mnews-trade {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    background: #FCF8EE;
    border: 1px solid #E4C88A;
    border-radius: 10px;
}

.gcl-mnews-trade__lbl {
    flex: 1;
    min-width: 200px;
    font-size: 13px;
    font-weight: 700;
    color: #142F3D;
}

.gcl-mnews-trade .gcl-btn { margin-top: 0; }

.gcl-mnews-sources {
    padding-top: 16px;
    border-top: 1px solid rgba(20, 20, 20, .1);
}

.gcl-mnews-sources__list {
    margin: 0 0 0 20px;
    padding: 0;
    font-size: 13px;
    line-height: 1.6;
}

.gcl-mnews-sources__list li { margin: 0 0 4px; overflow-wrap: anywhere; }
.gcl-mnews-sources__list a { color: #2F5C97; }

.gcl-mnews-sources__note {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #68808C;
}

.gcl-mnews-article__disclaimer {
    margin: 20px 0 0;
    padding: 12px 14px;
    background: #FCF8EE;
    border: 1px solid #E4C88A;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: #3A3A38;
}

.gcl-mnews-article__disclaimer a { color: #B07E14; font-weight: 600; }

.gcl-mnews-related {
    padding: 0;
    overflow: hidden;
    position: sticky;
    top: 16px;
}

.gcl-mnews-related__lbl {
    margin: 0;
    padding: 14px 14px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: #68808C;
}

.gcl-mnews-related .gcl-tagchip {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 7px;
    padding: 2px 9px;
}

.gcl-mnews-related__list { list-style: none; margin: 0; padding: 0; }

.gcl-mnews-related__item {
    position: relative;
    margin: 0;
    padding: 12px 14px;
    border-top: 1px solid #EEF2F4;
}

.gcl-mnews-related__item:hover { background: #FAFBFC; }

.gcl-mnews-related__title {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    color: #142F3D;
    text-decoration: none;
}

.gcl-mnews-related__title::after { content: ""; position: absolute; inset: 0; }
.gcl-mnews-related__title:hover { color: #B07E14; }

.gcl-mnews-related__meta {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #68808C;
}

/* ── Thắng rule heading của theme ──────────────────────────────────────────
   renew/styles.css ép mọi h2 ngoài header/footer về 32px bằng
   `body:not(.home):not(.page-template-renew-page-full) > :not(...) h2` (≈0,4,2), nạp SAU file này. Không selector
   gọn nào thắng được nó, nên khối này dùng !important — chỉ cho đúng các class heading của Tin tức. */
.sub-page .gcl-mnews h2.gcl-newsrow__title,
.sub-page .gcl-mnews h2.gcl-newsrow__title:not(:last-child) {
    font-size: 15px !important;
    line-height: 1.45 !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
}

.sub-page h2.gcl-mnews__h2,
.sub-page h2.gcl-mnews__h2:not(:last-child) {
    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
}

.sub-page .gcl-mnews__cardhead h2.gcl-mnews__h2 { margin: 0 !important; }
.sub-page .gcl-mnews-article__sec h2.gcl-mnews__h2 { font-size: 17px !important; }

.sub-page h2.gcl-mnews-related__lbl,
.sub-page h2.gcl-mnews-related__lbl:not(:last-child) {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.sub-page h1.gcl-mnews-article__title,
.sub-page h1.gcl-mnews-article__title:not(:last-child) {
    font-size: 26px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

/* renew/styles.css đặt `p, li, td, th… { font-size: 160% }` (responsive.css 140%) cho thẻ trần — chữ thân bài,
   bảng, nguồn phình gấp rưỡi. Ghim lại theo khối chứa; class đủ thắng rule thẻ trần, không cần !important. */
.gcl-mnews-article__body p,
.gcl-mnews-article__body li,
.gcl-mnews-article__body blockquote {
    font-size: 15.5px;
    line-height: 1.85;
}

.gcl-mnews-impact th,
.gcl-mnews-impact td { font-size: 13px; }
/* Theme kẻ viền đậm + nền xám cho bảng trần — mockup chỉ có vạch mảnh giữa các hàng, đầu cột không nền. */
.gcl-mnews-impact th,
.gcl-mnews-impact td {
    border: 0 !important;
    border-bottom: 1px solid #EEF2F4 !important;
    background: transparent !important;
}

.gcl-mnews-impact th {
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #68808C !important;
}

.gcl-mnews-sources__list li { font-size: 13px; }

/* Bullet của theme đến từ `body:not(.home)… li { list-style: disc }` (≈0,4,2) — chỉ !important mới gỡ được. */
.gcl-mnews-related__list,
.gcl-mnews-related__item,
.gcl-mnews__toplist,
.gcl-mnews__topitem {
    list-style: none !important;
}

/* Cùng rule đó lùi ul vào ~20px — dòng tin liên quan lệch lề so với nhãn "Tin liên quan". */
.gcl-mnews-related__list,
.gcl-mnews__toplist {
    margin: 0 !important;
    padding: 0 !important;
}

.gcl-mnews-related__item,
.gcl-mnews__topitem { font-size: 13px; }

/* Theme đệm `section` và `table` cho trang nội dung thường — trong thẻ bài thì thành khoảng trống thừa.
   Chừa .gcl-card: thẻ danh sách / lọc ngày cũng là <section>, gỡ đệm của nó là chữ dính sát viền. */
.gcl-mnews-single section:not(.gcl-card),
.gcl-mnews section:not(.gcl-card) { padding: 0; }

/* Khối Nguồn tham khảo kẻ vạch trên — giữ đệm dưới vạch, rule gỡ đệm ở trên đè mất thì tiêu đề dính sát vạch. */
.gcl-mnews-single section.gcl-mnews-sources { padding-top: 16px; }
.gcl-mnews-article__tablewrap table { margin: 0; }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .gcl-mnews__grid,
    .gcl-mnews-single__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* MB: chip ngày gom thành một hàng ngay trên danh sách; thẻ ở cột phải ẩn để không lặp. */
    .gcl-mnews__datebar {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    .gcl-mnews__datebar .gcl-mnews__ranges { margin-bottom: 0; }
    .gcl-mnews__datecard { display: none; }

    .gcl-mnews-related { position: static; }
}

@media (max-width: 782px) {
    .gcl-mnews .gcl-seg { min-width: 0; max-width: none; width: 100%; }
    .gcl-mnews .gcl-news-hub__bar { gap: 10px; }
    .gcl-mnews .gcl-news-hub__chips { width: 100%; }

    .gcl-mnews .gcl-card.gcl-mnews__list { padding: 4px 14px; }

    .gcl-mnews .gcl-newsrow { gap: 10px; }

    .gcl-mnews .gcl-newsrow__thumb {
        width: 84px;
        height: 56px;
    }

    .sub-page .gcl-mnews h2.gcl-newsrow__title { font-size: 14px !important; }
    .gcl-mnews .gcl-newsrow__sum { -webkit-line-clamp: 2; }

    .gcl-mnews-article { padding: 18px 16px; }
    .sub-page h1.gcl-mnews-article__title { font-size: 21px !important; }
    .gcl-mnews-article__sapo { font-size: 15px; }
    .gcl-mnews-article__body,
    .gcl-mnews-article__body p,
    .gcl-mnews-article__body li { font-size: 15px; line-height: 1.75; }
    .gcl-mnews-share { width: 100%; }
}
