
/* ── Desktop View (แถบประกาศ gradient ด้านบนสุด) ── */
#c2s-lsw2 {
    position: absolute;
    top: 0; right: 18px;
    height: 40px;
    display: flex; align-items: center; gap: 7px;
    z-index: 99999;
    font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Thai', sans-serif;
    font-size: 13px; font-weight: 700; letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
body.admin-bar #c2s-lsw2 { top: 32px; }

#c2s-lsw2 a { 
    text-decoration: none; 
    transition: opacity .15s; 
    cursor: pointer;
}
#c2s-lsw2 .c2s-lsw2-sep { color: #ffffff !important; opacity: 0.4 !important; }

/* 🌟 สลับเส้นใต้ด้วย CSS ทะลวงแคช! 🌟 */
/* 1. ค่าเริ่มต้น (ภาษาไทยทำงาน) */
#c2s-lsw2 .c2s-lang-th { color: #ffffff !important; opacity: 1 !important; text-decoration: underline !important; text-underline-offset: 3px; }
#c2s-lsw2 .c2s-lang-en { color: #ffffff !important; opacity: 0.65 !important; text-decoration: none !important; }

/* 2. เมื่อแปลเป็นภาษาอังกฤษ (Weglot จะเปลี่ยนแท็กเป็น lang="en") */
html[lang^="en"] #c2s-lsw2 .c2s-lang-th { opacity: 0.65 !important; text-decoration: none !important; }
html[lang^="en"] #c2s-lsw2 .c2s-lang-en { opacity: 1 !important; text-decoration: underline !important; text-underline-offset: 3px; }

/* Hover ให้สว่างขึ้น */
#c2s-lsw2 a:hover { opacity: 1 !important; }

/* ซ่อน Widget ลอยเดิมของ Weglot */
aside.country-selector, .weglot-container, .wg-default { display: none !important; }

/* ── Mobile View (ใน Header ขาว) ── */
@media (max-width: 782px) {
    #c2s-lsw2.c2s-in-header {
        position: absolute !important;
        top: 78% !important; /* ค่าที่คุณปรับแต่งไว้สวยเป๊ะ */
        transform: translateY(-50%) !important;
        right: 55px !important;
        height: auto !important;
        text-shadow: none !important;
        z-index: 999999 !important;
    }
    
    /* เปลี่ยนอักษรเป็นสีน้ำเงินในมือถือ */
    #c2s-lsw2.c2s-in-header .c2s-lang-th,
    #c2s-lsw2.c2s-in-header .c2s-lang-en { color: #012d5e !important; }
    #c2s-lsw2.c2s-in-header .c2s-lsw2-sep { color: #012d5e !important; opacity: 0.3 !important; }
}
