/**
 * //JW 2026/09/04 {V1,727} online header 會員資訊（身份＋隱碼姓名＋點數）
 * - 版型比照 {V4,727} 官網：右下角紅點的人頭 icon、紅字卡別、隱碼姓名；online 另外多一行 P 點數
 * - Desktop：人頭從放大鏡右邊移到左邊，並展開成兩行資訊
 * - Mobile：原本沒有人頭，改成直接把資訊放在放大鏡左邊，空間很擠所以另外收斂 logo 與間距
 */

/* ==================== 會員資訊區塊（web / mobile 共用） ==================== */
.v1-member-info {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    line-height: 1.2;
    color: var(--header_main_f_color, #212121);
    text-decoration: none;
}

.v1-member-info:hover {
    text-decoration: none;
}

.v1-member-info:hover path {
    fill: var(--header_link_hover_color, #d0343d);
}

/* //JW 2026/09/04 人頭 icon 固定 32px，紅點是用固定 px 定位，icon 尺寸跟著變會對不準 */
.v1-member-icon {
    position: relative;
    display: inline-block;
    line-height: 0;
    flex: 0 0 auto;
}

.v1-member-icon svg {
    width: 32px;
    height: 32px;
}

/* //JW 2026/09/04 登入後人頭 icon 右下角小紅點，數值沿用 {V4,727} 的 header_member_v4.css */
.v1-member-icon--dot::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    right: 6px;
    bottom: 6px;
    border-radius: 50%;
    background: var(--header_link_hover_color, #d0343d);
    border: 2px solid #fff;
    pointer-events: none;
}

.v1-member-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

.v1-member-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-size: 14px;
    white-space: nowrap;
}

.v1-member-level {
    font-weight: 600;
    flex: 0 0 auto;
}

/* //JW 2026/09/04 姓名是唯一長度不可控的欄位，寬度不夠時只讓它縮，不要把點數擠掉 */
.v1-member-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* //JW 2026/09/04 header2.css 有 .header-main-menu img{height:32px/52px}（那是給 logo 用的），
   點數 icon 必須用更高的權重蓋回來，否則 P icon 會被撐到 logo 尺寸 */
.menu-right .v1-member-point-icon {
    width: 16px;
    height: 16px;
    max-width: none;
    flex: 0 0 auto;
}

.v1-member-point-value {
    font-weight: 600;
}

/* //JW 2026/09/04 沒有點數時顯示減號，此時「點」字要收起來 */
.v1-member-point-unit.is-hidden {
    display: none;
}

/* ==================== Mobile：右側空間很擠，收斂 logo 與間距 ==================== */
@media (max-width: 743px) {
    .header__mobile .header-main-menu.has-v1-member {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
    }

    .header__mobile .header-main-menu.has-v1-member ul {
        gap: 8px;
        min-width: 0;
        overflow: hidden;
    }

    /* //JW 2026/09/04 header2.css 的 li.logo-area 是寫死 width:214px，右邊放會員資訊後左欄一定爆版，
       這裡改成可壓縮，並讓 logo 依比例縮（height:auto 才不會變形） */
    .header__mobile .header-main-menu.has-v1-member ul li.logo-area {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }

    .header__mobile .header-main-menu.has-v1-member ul li:first-child {
        flex: 0 0 auto;
    }

    .header__mobile .header-main-menu.has-v1-member ul li.logo-area img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 26px;
    }

    .header__mobile .header-main-menu.has-v1-member .menu-right {
        gap: 6px;
    }

    .header__mobile .header-main-menu.has-v1-member .menu-right .icon-style svg {
        height: 30px;
    }

    .header__mobile .v1-member-icon svg {
        width: 28px;
        height: 28px;
    }

    .header__mobile .v1-member-icon--dot::after {
        width: 9px;
        height: 9px;
        right: 5px;
        bottom: 5px;
    }

    .header__mobile .v1-member-row {
        font-size: 12px;
        gap: 3px;
    }

    .header__mobile .menu-right .v1-member-point-icon {
        width: 14px;
        height: 14px;
    }

    .header__mobile .v1-member-name {
        max-width: 60px;
    }
}

/* //JW 2026/09/04 超窄機型（iPhone SE 等）連姓名都放不下，只留卡別與點數 */
@media (max-width: 374px) {
    .header__mobile .v1-member-name {
        display: none;
    }
}

/* //JW 2026/09/04 未登入只有一顆人頭 icon，尺寸交給既有的 .menu-right .icon-style svg 控制，這裡不再重複定義 */
