/**
 * Show/hide audience + language elements (header, footer, single blog, anywhere).
 *
 * Audience — Advanced → CSS Classes:
 *   Home Use:    jat-menu-home-use  OR  jat-audience-home-use
 *   Commercial:  jat-menu-commercial OR  jat-audience-commercial
 *
 * Language — Advanced → CSS Classes:
 *   Chinese (Simplified): jat-lang-zh
 *   English (default):    jat-lang-en
 *   Legacy (Indonesian):  jat-lang-id — treated as Chinese content for show/hide.
 *
 * Note: jat-audience-* and jat-lang-* on <html>/<body> are added automatically
 * from the URL. Widget classes use the same names for show/hide.
 */

/* -------------------------------------------------------------------------
 * Audience
 * ---------------------------------------------------------------------- */

/* Hide Commercial-marked elements on Home Use pages */
html.jat-audience-home-use .jat-menu-commercial,
body.jat-audience-home-use .jat-menu-commercial,
html.jat-audience-home-use .jat-audience-commercial:not(html):not(body),
body.jat-audience-home-use .jat-audience-commercial:not(html):not(body) {
	display: none !important;
}

/* Hide Home Use-marked elements on Commercial pages */
html.jat-audience-commercial .jat-menu-home-use,
body.jat-audience-commercial .jat-menu-home-use,
html.jat-audience-commercial .jat-audience-home-use:not(html):not(body),
body.jat-audience-commercial .jat-audience-home-use:not(html):not(body) {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * Language (from URL: / = EN default, /zh/ = Chinese Simplified)
 * ---------------------------------------------------------------------- */

/* Hide English-marked elements on Chinese pages */
html.jat-lang-zh .jat-lang-en:not(html):not(body),
body.jat-lang-zh .jat-lang-en:not(html):not(body) {
	display: none !important;
}

/* Hide Chinese-marked (and legacy Indonesian-marked) elements on English pages */
html.jat-lang-en .jat-lang-zh:not(html):not(body),
body.jat-lang-en .jat-lang-zh:not(html):not(body),
html.jat-lang-en .jat-lang-id:not(html):not(body),
body.jat-lang-en .jat-lang-id:not(html):not(body) {
	display: none !important;
}

/* If the body somehow still carries the legacy jat-lang-id class, treat it like Chinese */
html.jat-lang-id .jat-lang-en:not(html):not(body),
body.jat-lang-id .jat-lang-en:not(html):not(body) {
	display: none !important;
}
