/* (11/11/2026) เมนูผู้ใช้ (ชี้ชิปรหัสสมาชิก .sud-) + เมนูเลือกภาษา (.language-dropdown) แถบหัว shopping — markup ใน shopping/header-top.php
   สีจาก configmlm > ตั้งค่าสี (Member) ผ่าน --shd-* · โหลดจาก shopping/includes/shop_header_head.php */

/* ================= เมนูผู้ใช้ ================= */
.cart-dropdown-wrap.account-dropdown.sud {
    width: 300px !important;
    padding: 0 !important;
    border: 1px solid var(--shd-line, #e5e9f0);
    border-radius: 16px;
    box-shadow: 0 18px 40px -16px rgba(15, 40, 70, .35), 0 2px 6px rgba(15, 40, 70, .06);
    overflow: hidden;
    text-align: left;
}
/* หัว: รูป + ชื่อ + รหัส·ประเภท */
.sud .sud-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 16px 14px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--shd-c1, #2cabe3) 12%, #fff), #fff 70%);
}
.sud .sud-av {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--shd-c1, #2cabe3); font-size: 26px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--shd-c1, #2cabe3) 40%, #fff);
}
.sud .sud-av img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; display: block; }
.sud .sud-av i { color: inherit !important; font-size: 26px !important; line-height: 1; }
.sud .sud-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sud .sud-who b {
    font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--shd-text, #1f2937);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sud .sud-who span { font-size: 12.5px; color: var(--shd-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ยอดคงเหลือ */
.sud .sud-wallet {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
    padding: 0 16px 14px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--shd-c1, #2cabe3) 12%, #fff), #fff 70%);
}
.sud .sud-w {
    min-width: 0; padding: 9px 12px; border-radius: 12px;
    background: #fff; border: 1px solid var(--shd-line, #e5e9f0);
    display: flex; flex-direction: column; gap: 2px;
}
.sud .sud-w:only-child, .sud .sud-w:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sud .sud-w span { font-size: 12px; color: var(--shd-muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sud .sud-w b { font-size: 15px; font-weight: 700; color: var(--shd-c2, #0a4069); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* รายการเมนู */
.sud .sud-menu { padding: 6px 8px; border-top: 1px solid var(--shd-line, #e5e9f0); }
.sud .sud-menu a, .sud .sud-sub > summary {
    display: flex !important; align-items: center; gap: 12px;
    margin: 0 !important; padding: 10px 10px !important; border-radius: 10px;
    font-size: 14px !important; font-weight: 500; line-height: 1.3 !important;
    color: var(--shd-text, #1f2937) !important; text-decoration: none !important; cursor: pointer;
    transition: background .15s, color .15s;
}
.sud .sud-menu a > i, .sud .sud-sub > summary > i:first-child {
    flex: 0 0 20px; width: 20px; margin: 0 !important; text-align: center;
    font-size: 15px !important; line-height: 1; color: var(--shd-muted, #6b7280) !important; transition: color .15s;
}
.sud .sud-menu a:hover, .sud .sud-sub > summary:hover { background: var(--shd-soft, #f3f6f9); color: var(--shd-c1, #2cabe3) !important; }
.sud .sud-menu a:hover > i, .sud .sud-sub > summary:hover > i { color: var(--shd-c1, #2cabe3) !important; }
.sud .sud-menu a > span, .sud .sud-sub > summary > span { flex: 1 1 auto; min-width: 0; }

/* PDPA กางในกล่อง */
.sud .sud-sub > summary { list-style: none; }
.sud .sud-sub > summary::-webkit-details-marker { display: none; }
.sud .sud-sub .sud-caret { flex: 0 0 auto; font-size: 11px !important; color: #9aa4b2 !important; transition: transform .2s; }
.sud .sud-sub[open] .sud-caret { transform: rotate(180deg); }
.sud .sud-sub > a {
    padding: 8px 10px 8px 42px !important; font-size: 13.5px !important; color: var(--shd-muted, #6b7280) !important; white-space: normal;
}

/* ออกจากระบบ */
.sud .sud-foot { padding: 6px 8px 8px; border-top: 1px solid var(--shd-line, #e5e9f0); }
.sud .sud-foot a.sud-out {
    display: flex !important; align-items: center; gap: 12px; margin: 0 !important; padding: 10px 10px !important; border-radius: 10px;
    font-size: 14px !important; font-weight: 600; color: var(--shd-cancel, #ef4444) !important; text-decoration: none !important;
    transition: background .15s;
}
.sud .sud-foot a.sud-out i { flex: 0 0 20px; width: 20px; margin: 0 !important; text-align: center; font-size: 15px !important; color: inherit !important; }
.sud .sud-foot a.sud-out:hover { background: color-mix(in srgb, var(--shd-cancel, #ef4444) 10%, #fff); }

/* ================= เมนูเลือกภาษา ================= */
header.header-area .header-info > ul > li > ul.language-dropdown {
    left: auto !important; right: 0 !important;
    min-width: 168px; margin-top: 0 !important; padding: 6px !important;
    border: 1px solid var(--shd-line, #e5e9f0); border-radius: 14px;
    box-shadow: 0 18px 40px -16px rgba(15, 40, 70, .35), 0 2px 6px rgba(15, 40, 70, .06);
    background: #fff; z-index: 99;
}
header.header-area .header-info > ul > li:hover > ul.language-dropdown { top: calc(100% + 8px) !important; }
/* ช่องว่างระหว่างปุ่มกับกล่อง ไม่ให้เมนูหายตอนเลื่อนเมาส์ลง */
header.header-area .header-info > ul > li > ul.language-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
header.header-area .header-info > ul > li > ul.language-dropdown > li { width: auto !important; margin: 0 !important; padding: 0 !important; }
header.header-area .header-info > ul > li > ul.language-dropdown > li + li { margin-top: 2px !important; }
header.header-area .header-info > ul > li > ul.language-dropdown > li > a {
    display: flex !important; align-items: center; gap: 10px;
    padding: 9px 10px !important; border-radius: 10px;
    font-size: 14px !important; font-weight: 500; line-height: 1.2 !important;
    color: var(--shd-text, #1f2937) !important; text-decoration: none !important; transition: background .15s;
}
header.header-area .header-info > ul > li > ul.language-dropdown > li > a img {
    width: 24px !important; height: 16px; margin: 0 !important; object-fit: cover; border-radius: 3px;
    box-shadow: 0 0 0 1px var(--shd-line, #e5e9f0);
}
header.header-area .header-info > ul > li > ul.language-dropdown > li > a span { flex: 1 1 auto; }
header.header-area .header-info > ul > li > ul.language-dropdown > li > a i { margin: 0 !important; font-size: 12px !important; line-height: 1; color: var(--shd-c1, #2cabe3) !important; }
header.header-area .header-info > ul > li > ul.language-dropdown > li > a:hover { background: var(--shd-soft, #f3f6f9); }
header.header-area .header-info > ul > li > ul.language-dropdown > li.is-on > a {
    background: color-mix(in srgb, var(--shd-c1, #2cabe3) 10%, #fff); color: var(--shd-c1, #2cabe3) !important; font-weight: 700;
}
