/* ============================================================
   MEMBER PROFILE — shared shell for a single person's profile.
   [2026-08-17] Extracted from GuestPostMember.aspx inline <style>
   so BOTH the public profile (/thanh-vien) AND the own-account
   page (/tai-khoan, Customer.aspx) use ONE source. Edit once,
   both pages follow. Only the .cq-member-* / .cq-work-* /
   .cq-liked-* profile rules live here; listing-only rules
   (.cq-community-*, .cq-mem-card grid) stay on their page.
   ============================================================ */

.cq-member-public { padding: 8px 0 32px; }

.cq-member-shell {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.cq-member-card {
    background: #fff;
    border-radius: 34px;
    box-shadow: 0 20px 48px rgba(18, 56, 91, 0.08);
    overflow: hidden;
}

.cq-member-sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.cq-member-main {
    grid-column: 2 / 5;
    display: contents;
}

.cq-member-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 34px;
    object-fit: cover;
    display: block;
    margin-bottom: 18px;
    box-shadow: 0 14px 30px rgba(18, 56, 91, 0.12);
    background: #fff;
}

.cq-member-name {
    margin: 0 0 10px;
    color: var(--cq-navy);
    font-size: 30px;
    line-height: 1.08;
    font-weight: 800;
}

.cq-member-follow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid #d6e3ee;
    background: var(--cq-navy);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    margin: 0;
}

.cq-member-follow.true {
    background: #007b73;
    border-color: #007b73;
}

.cq-member-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 20px;
}

.cq-member-status-pill,
.cq-member-account-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: #eef5f8;
    color: var(--cq-navy);
    font-size: 14px;
    font-weight: 700;
}

.cq-member-account-pill {
    margin-bottom: 8px;
}

.cq-member-status-pill.verified {
    background: #e8f4fd;
    color: #0c6cb0;
    gap: 6px;
}

.cq-member-hero {
    position: relative;
    margin-bottom: 18px;
}

.cq-member-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    aspect-ratio: 8 / 1;
    border-radius: 0;
    background: linear-gradient(120deg, #0d5a7c 0%, var(--cq-green) 55%, #4bb06a 100%);
}

.cq-member-hero-avatar {
    position: absolute;
    left: 0;
    top: 0;
    width: 12.5vw;
    height: 12.5vw;
    object-fit: cover;
    border-radius: 0;
    background: #fff;
}

.cq-member-sidebar .cq-member-avatar {
    display: none;
}

.cq-member-hero-lv {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    line-height: 0;
}

.cq-member-hero-lv .n,
.cq-member-hero-lv .p {
    display: none;
}

.cq-member-hero-lv .cq-lv-ring {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 6px rgba(0, 0, 0, .3);
}

.cq-member-hero-name {
    position: absolute;
    left: calc(12.5vw + 26px);
    bottom: 18px;
    right: 24px;
    z-index: 3;
    color: #fff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .3);
}

.cq-member-hero-nametop {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 30px;
    font-weight: 800;
}

.cq-member-hero-title {
    font-size: 15px;
    font-weight: 500;
    margin-top: 3px;
}

.cq-hero-tick {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
}

.cq-member-sidebar .cq-member-name,
.cq-member-action-row .cq-member-status-pill {
    display: none;
}

.cq-member-follow-count {
    margin: 12px 0 4px;
    color: #5b6e83;
    font-size: 15px;
}

.cq-member-follow-count b {
    color: var(--cq-navy);
    font-size: 18px;
    font-weight: 800;
}

.cq-member-link-web .cq-ext {
    margin-left: 5px;
    font-size: 11px;
    color: #9aa8b6;
}

.cq-liked-empty,
.cq-liked-loading {
    padding: 30px 10px;
    text-align: center;
    color: #8593a3;
    font-size: 15px;
}

.cq-work-role {
    margin-bottom: 8px;
    color: var(--cq-navy);
}

.cq-work-org {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    color: var(--cq-navy);
    text-decoration: none;
}

.cq-work-org:hover .cq-work-name {
    text-decoration: underline;
}

.cq-work-logo {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    object-fit: cover;
    flex: 0 0 auto;
    background: #eef3f7;
}

.cq-work-name {
    font-size: 14px;
    font-weight: 600;
}

.cq-work-item {
    margin-bottom: 12px;
}

.cq-work-item:last-child {
    margin-bottom: 0;
}

.cq-work-sub {
    margin: 1px 0 0 44px;
    color: #5b6e83;
    font-size: 13px;
}

.cq-work-logo-txt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: var(--cq-green);
    background: #e4f1ec;
}

.cq-member-tabs-shell .datalist-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.cq-member-tabs-shell .item-3,
.cq-member-tabs-shell .item-2,
.cq-member-tabs-shell .datalist-content > .item {
    width: auto;
    float: none;
    margin: 0;
}

/* "Da danh dau" dung bo CARD TRANG CHU (.item-4). Lay theo luoi giong .datalist-content. */
.cq-member-tabs-shell .cq-liked-wrap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.cq-member-tabs-shell .cq-liked-wrap > .item-4,
.cq-member-tabs-shell .cq-liked-wrap > .item-idea {
    width: auto;
    float: none;
    margin: 0;
}

.cq-member-tabs-shell .cq-liked-loading,
.cq-member-tabs-shell .cq-liked-empty {
    grid-column: 1 / -1;
}

.cq-member-follow-stat {
    text-align: center;
    padding: 10px 0;
}

.cq-member-follow-num {
    font-size: 34px;
    font-weight: 800;
    color: var(--cq-navy);
    line-height: 1;
}

.cq-member-follow-lbl {
    margin-top: 6px;
    color: #5b6e83;
    font-size: 14px;
    font-weight: 600;
}

.cq-member-section h3,
.cq-member-stats-panel h3 {
    margin: 0 0 18px;
    color: var(--cq-navy);
    font-size: 20px;
    font-weight: 800;
}

.cq-member-row {
    display: block;
    padding: 13px 0;
    border-top: 1px solid #edf3f8;
}

.cq-member-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.cq-member-label {
    display: block;
    margin-bottom: 8px;
    color: #5b6e83;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cq-member-value {
    color: #173e63;
    font-size: 16px;
    line-height: 1.65;
}

.cq-member-value.muted {
    color: #6f8398;
}

.cq-member-stats-panel {
    grid-column: 2 / 5;
    padding: 26px;
    min-height: var(--cq-member-avatar-size, 320px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cq-member-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.cq-member-stat-box {
    padding: 18px 16px;
    border-radius: 24px;
    background: #f6fafc;
    border: 1px solid #e4edf4;
}

.cq-member-stat-box .cq-member-stat-label {
    display: block;
    margin-bottom: 10px;
}

.cq-member-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cq-member-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #173e63;
    text-decoration: none;
    word-break: break-word;
}

.cq-member-link i {
    color: #007b73;
}

.cq-member-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cq-member-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eef5f8;
    color: var(--cq-navy);
    font-size: 14px;
    font-weight: 600;
}

.cq-member-stat-label {
    color: #6f8398;
    font-size: 14px;
}

.cq-member-stat-value {
    color: var(--cq-navy);
    font-size: 18px;
    font-weight: 800;
    text-align: right;
}

.cq-member-level-html {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf3f8;
}

.cq-member-level-html .level-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cq-member-level-html .level-box img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.cq-member-tabs-shell {
    grid-column: 2 / 5;
    padding: 26px;
}

.cq-member-public .tab-style3 {
    margin-top: 0;
}

/* ---- Own-account extras (Customer.aspx): hero avatar as wrapper + action buttons ---- */
/* Tren trang cong khai .cq-member-hero-avatar CHINH la <img>; o trang tai khoan no
   la <div> boc <img> (vi asd:Image khong chac nhan CssClass) -> style ca 2. */
.cq-member-hero-avatar > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cq-member-edit,
.cq-member-action-row .cq-member-upload {
    /* !important: CSS cu .btn-upload-avartar dat position absolute -> nut bay len de breadcrumb */
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid #d6e3ee;
    background: var(--cq-navy);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.cq-member-edit:hover,
.cq-member-action-row .cq-member-upload:hover {
    background: #0d2c48;
}

/* FileUpload render nut/label ben trong: ep no khoi ke thua nen/vien la. */
.cq-member-action-row .cq-member-upload * {
    background: none !important;
    border: 0 !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    font: inherit !important;
}

@media (max-width: 1100px) {
    .cq-member-shell {
        grid-template-columns: 1fr;
    }

    .cq-member-sidebar,
    .cq-member-stats-panel,
    .cq-member-tabs-shell {
        grid-column: 1;
        grid-row: auto;
    }

    .cq-member-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .cq-member-tabs-shell .datalist-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cq-member-tabs-shell .cq-liked-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .cq-member-hero-title { font-size: 12px; }
    .cq-member-hero-name { left: calc(20vw + 16px); bottom: 10px; font-size: 18px; gap: 6px; }
    /* [2026-08-17] FIX: luat 18px o tren bi luat rieng cua nametop (30px) DE —
       ep thang vao nametop de ten dai khong choan het banner 75px. */
    .cq-member-hero-name .cq-member-hero-nametop { font-size: 18px; gap: 6px; }
    .cq-hero-tick { width: 18px; height: 18px; }
    .cq-member-hero-lv { top: 5px; left: 5px; }
    .cq-member-banner { aspect-ratio: 5 / 1; }
    .cq-member-hero-avatar { width: 20vw; height: 20vw; }
}

@media (max-width: 560px) {
    .cq-member-tabs-shell .datalist-content { grid-template-columns: 1fr; }
    .cq-member-tabs-shell .cq-liked-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .cq-member-public { padding: 0 0 24px; }
    .cq-member-avatar { border-radius: 28px; }
    .cq-member-name { font-size: 26px; }
    .cq-member-tabs-shell,
    .cq-member-stats-panel,
    .cq-member-sidebar { padding: 20px 14px; }
    .cq-member-stats-grid { grid-template-columns: 1fr; }

    /* [2026-08-17] MOBILE UX:
       1. TAC PHAM len TRUOC — khoi thong tin (~650px) xuong SAU, nguoi xem
          khong phai cuon qua ca trang info moi thay bai. */
    .cq-member-tabs-shell { order: -1; }

    /* 3. Nut hanh dong (Chinh sua / Doi anh) chia deu 1 hang, gon co */
    .cq-member-action-row { gap: 8px; }
    .cq-member-action-row .cq-member-edit,
    .cq-member-action-row .cq-member-upload { flex: 1 1 0; min-width: 0; height: 42px; font-size: 13.5px; padding: 0 10px; }

    /* 4. Thanh tab: cuon ngang muot, GIAU thanh cuon xam */
    .cq-member-tabs-shell .tab-style3 { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .cq-member-tabs-shell .tab-style3::-webkit-scrollbar,
    .cq-member-tabs-shell .tab-style3 *::-webkit-scrollbar { display: none; }

    /* 2. Thong tin GON bang ICON: bo nhan chu to (THONG TIN LIEN HE...),
          giu icon dan dau moi dong; khit dong lai cho do doi du. */
    .cq-member-label { display: none; }
    .cq-member-row { padding: 8px 0; }
    .cq-member-value { font-size: 14px; line-height: 1.55; }
    .cq-member-links { gap: 7px; }
    .cq-member-link i { width: 16px; text-align: center; flex: 0 0 16px; }
    .cq-member-follow-count { font-size: 13.5px; margin: 8px 0 2px; }
    .cq-work-sub { margin-left: 44px; }
}

/* [2026-08-17] CHONG GIAT (CLS 1.18 -> muc tieu <0.1): GIU CHO san cho anh card
   trong tab truoc khi anh tai xong — het canh card nhay cho luc mo trang. */
.cq-member-tabs-shell .c-portfolio { display: block; }
.cq-member-tabs-shell .c-portfolio img { aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: cover; display: block; background: var(--cq-light, #f2f5f7); }
/* Anh card tab Tap Chi (400x250) — thu pham CLS 0.59 theo Lighthouse: giu cho 8:5 */
.cq-member-tabs-shell .news-item .img { display: block; }
.cq-member-tabs-shell .news-item .img img { aspect-ratio: 8 / 5; width: 100%; height: auto; object-fit: cover; display: block; background: var(--cq-light, #f2f5f7); }
.cq-member-tabs-shell .guest-item .img img { background: var(--cq-light, #f2f5f7); }

/* ============================================================
   [2026-08-17] DAP-XAY-LAI MOBILE (chot voi chu web):
   header avatar TRON de mep banner + ten duoi + 3 SO DAM +
   thanh tab = ICON chia deu (khong tran man) + DINH khi cuon +
   thong tin thu vao accordion. Desktop GIU NGUYEN.
   Di kem member-profile.js (dung hang so + boc accordion).
   ============================================================ */

/* Hang SO LIEU 3 cot (JS dung tu .cq-member-follow-count) */
.cq-mstats { display: flex; margin: 12px 0 4px; }
.cq-mstats__item { flex: 1 1 0; min-width: 0; text-align: center; color: #5b6e83; font-size: 12.5px; cursor: pointer; text-decoration: none; }
.cq-mstats__item b { display: block; color: var(--cq-dark, var(--cq-navy)); font-size: 20px; font-weight: 800; line-height: 1.15; }

/* Accordion "Thong tin chi tiet" (JS boc <details>) */
.cq-member-more { margin-top: 6px; }
.cq-member-more summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0; color: var(--cq-dark, var(--cq-navy)); font-size: 14.5px; font-weight: 700; cursor: pointer; border-top: 1px solid #edf3f8; }
.cq-member-more summary::-webkit-details-marker { display: none; }
.cq-member-more summary::after { content: "\25BE"; margin-left: auto; color: #5b6e83; transition: transform .2s ease; }
.cq-member-more[open] summary::after { transform: rotate(180deg); }
@media (min-width: 768px) {
    /* Desktop: luon mo, an nut bung */
    .cq-member-more summary { display: none; }
}

@media (max-width: 767px) {
    /* [2026-08-17] HERO GIU NGUYEN THIET KE GOC (avatar VUONG de banner la co tinh
       — chot cua chu web); chi con cac phan duoi day la lam moi. */

    /* Nut "Them Y tuong/Tuyen dung/Cau hoi..." trong tab: AN tren mobile —
       nut FAB (+) goc phai da lo viec tao bai (FAB chi hien mobile nen desktop giu nut). */
    .cq-member-tabs-shell .btn-style { display: none; }

    /* ---- TAB = ICON chia deu, DINH khi cuon ----
       Cau truc that: .tab-style3(div.TabBox) > UL.tabbox-name > a.TabName + .TabContent
       -> flex + sticky phai dat vao UL, KHONG phai .tab-style3 (lam ul sap 0). */
    .cq-member-tabs-shell { overflow: visible; }   /* card overflow:hidden lam sticky chet */
    .cq-member-tabs-shell .tabbox-name {
        position: -webkit-sticky; position: sticky; top: 0; z-index: 20;
        background: #ffffff;
        display: flex; align-items: stretch;
        width: 100%; margin: 0; padding: 0; list-style: none;
        overflow: visible; overflow-x: visible;
    }
    .cq-member-tabs-shell .tabbox-name > li { flex: 1 1 0; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; }
    .cq-member-tabs-shell .tabbox-name .TabName {
        flex: 1 1 0; min-width: 0; width: 100%;
        display: inline-flex; align-items: center; justify-content: center;
        font-size: 0 !important; padding: 12px 0 !important; margin: 0 !important;
        white-space: nowrap;
    }
    .cq-member-tabs-shell .tabbox-name .TabName::before {
        font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 17px;
    }
    .cq-member-tabs-shell .tab-idea::before { content: "\f0eb"; }        /* Y tuong / Cong dong */
    .cq-member-tabs-shell .menutapchi::before,
    .cq-member-tabs-shell .tab-tapchi::before { content: "\f1ea"; }      /* Tap chi */
    .cq-member-tabs-shell .menuportfolio::before,
    .cq-member-tabs-shell .tab-portfolio::before { content: "\f07c"; }   /* Nang luc */
    .cq-member-tabs-shell .tab-saved::before { content: "\f02e"; }       /* Da danh dau */
}
