/* TranslatePress — thanh gợi ý ngôn ngữ (Automatic User Language Detection, kiểu "hello bar").
   Thiết kế GỌN, MỘT HÀNG (cả di động): "🌐 View this page in  Tiếng Việt ⌄  [Switch]  ×".
   - Tên ngôn ngữ = chữ màu thương hiệu + mũi tên ⌄ (không ô viền); bấm → bảng chọn ngôn ngữ dạng thẻ nổi.
   - Nút Switch nhỏ; nút đóng × luôn hiện (plugin gốc ẩn trên di động).
   Nạp sau trp-popup-style (inc/assets.php). Chữ: site-structure.json → option_patches.trp_ald_settings.
   Biểu tượng: --bl-ald-globe / --bl-ald-chevron (inc/assets.php, từ assets/icons). */
#trp_no_text_popup_wrap {
	--bl-ald-h: calc(var(--wp--custom--touch-target) * .75);   /* chiều cao nút/ô trong thanh (~33px) */
	position: relative;
	z-index: 60;   /* trên header dính (50) để bảng ngôn ngữ không bị che */
	background: var(--wp--preset--color--brand-tint);
	border-bottom: var(--wp--custom--divider) solid var(--wp--preset--color--line);
	box-shadow: none;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	line-height: 1.2;
}
#trp_no_text_popup_wrap #trp_no_text_popup {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--30);
	border: 0;
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}
#trp_no_text_popup_wrap #trp_ald_not_text_popup_ls_and_button {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--20);
	flex: 1;
	min-width: 0;
	width: auto;
	max-width: none;
}
/* "🌐 View this page in" */
#trp_no_text_popup_wrap #trp_ald_no_text_popup_div {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
	flex: none;
	max-width: none;
	margin: 0;
	font-size: inherit;
	color: var(--wp--preset--color--ink-soft);
	white-space: nowrap;
}
#trp_no_text_popup_wrap #trp_ald_no_text_popup_div::before {
	content: "";
	flex: none;
	width: 1.15em;
	height: 1.15em;
	background: var(--wp--preset--color--brand);
	-webkit-mask: var(--bl-ald-globe) center / contain no-repeat;
	mask: var(--bl-ald-globe) center / contain no-repeat;
}
/* Tên ngôn ngữ + ⌄ — trông như liên kết, không ô viền. */
#trp_no_text_popup_wrap .trp_ald_ls_container {
	display: flex;
	flex: none;
	height: auto;   /* plugin đặt cứng height 50px */
	width: auto;
	max-width: none;
	margin: 0;
	font-size: inherit;
	color: var(--wp--preset--color--ink);
}
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-language-switcher-container { position: relative; width: auto; min-width: 0; height: var(--bl-ald-h); }
#trp_no_text_popup_wrap .trp_ald_ls_container [special-selector=trp_ald_popup_current_language],
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ls-shortcode-current-language {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);   /* cờ — tên ngôn ngữ */
	height: var(--bl-ald-h);
	padding: 0 calc(1.15em + var(--wp--preset--spacing--10)) 0 var(--wp--preset--spacing--10);
	border: 0;
	border-radius: var(--wp--custom--radius--sm);
	position: relative;
	background: transparent;
	color: var(--wp--preset--color--brand);
	font-size: inherit;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	overflow: visible;
}
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ls-shortcode-current-language::after {
	content: "";
	position: absolute;
	right: var(--wp--preset--spacing--10);
	top: 50%;
	width: 1em;
	height: 1em;
	transform: translateY(-50%);
	background: currentColor;   /* cùng màu chữ tên ngôn ngữ */
	-webkit-mask: var(--bl-ald-chevron) center / contain no-repeat;
	mask: var(--bl-ald-chevron) center / contain no-repeat;
	transition: transform var(--wp--custom--transition);
}
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ls-shortcode-current-language.trp-ls-clicked::after { transform: translateY(-50%) rotate(180deg); }
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ls-shortcode-current-language:hover { background-color: var(--wp--preset--color--brand-soft); }
/* Bảng chọn ngôn ngữ: thẻ nổi dưới tên ngôn ngữ. */
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ls-shortcode-language {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 61;
	min-width: 100%;
	width: max-content;
	max-height: min(22rem, 60vh);
	overflow-y: auto;
	margin-top: var(--wp--preset--spacing--10);
	padding: var(--wp--preset--spacing--10);
	border: var(--wp--custom--border--thin) solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--raised);
}
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ald-popup-select {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--sm);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ald-popup-select:hover,
#trp_no_text_popup_wrap .trp_ald_ls_container .trp-ls-shortcode-language > div:hover { background: var(--wp--preset--color--brand-soft); color: var(--wp--preset--color--brand); }
#trp_no_text_popup_wrap .trp_ald_ls_container img.trp-flag-image { width: 18px; height: auto; margin: 0; border-radius: 2px; }
/* Nút Switch nhỏ, dạng viên. */
#trp_no_text_popup_wrap .trp_ald_change_language_div { flex: none; min-width: 0; width: auto; margin: 0; }
#trp_no_text_popup_wrap #trp_ald_no_text_popup_change_language {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--bl-ald-h);
	min-height: 0;
	margin: 0;
	padding: 0 var(--wp--preset--spacing--40);
	border: 0;
	border-radius: var(--wp--custom--radius--pill);   /* dạng viên */
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--surface);
	font-size: inherit;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	transition: background var(--wp--custom--transition);
}
#trp_no_text_popup_wrap #trp_ald_no_text_popup_change_language:hover,
#trp_no_text_popup_wrap #trp_ald_no_text_popup_change_language:focus-visible { background: var(--wp--preset--color--ink); }
/* Nút đóng ×: luôn hiện. */
#trp_no_text_popup_wrap #trp_ald_no_text_popup_x { display: block; flex: none; width: auto; padding: 0; position: static; }
#trp_no_text_popup_wrap #trp_close {
	display: grid;
	place-items: center;
	width: var(--bl-ald-h);
	height: var(--bl-ald-h);
	border-radius: var(--wp--custom--radius--sm);
	cursor: pointer;
}
#trp_no_text_popup_wrap #trp_close::before {
	content: "\00d7";
	font: 400 1.35rem/1 var(--wp--preset--font-family--sans);
	color: var(--wp--preset--color--ink-soft) !important;   /* plugin đặt !important */
}
#trp_no_text_popup_wrap #trp_close:hover { background: var(--wp--preset--color--brand-soft); }
#trp_no_text_popup_wrap #trp_close:focus-visible { outline: var(--wp--custom--focus-ring) solid var(--wp--preset--color--brand); outline-offset: var(--wp--custom--focus-offset); }
#trp_no_text_popup_wrap #trp_ald_no_text_popup_x_button_and_textarea { display: none; }

/* Di động: vẫn MỘT hàng; bỏ quả địa cầu cho đủ chỗ; ghi đè quy tắc xếp dọc của plugin (≤ 780/937px). */
@media (max-width: 937px) {
	#trp_no_text_popup_wrap #trp_ald_not_text_popup_ls_and_button { display: flex; width: auto; max-width: none; justify-content: flex-start; }
	#trp_no_text_popup_wrap .trp_ald_ls_container { margin: 0; max-width: none; }
	#trp_no_text_popup_wrap #trp_ald_no_text_popup_select_container { display: block; }
	#trp_no_text_popup_wrap .trp_ald_change_language_div { width: auto; margin: 0; }
	#trp_no_text_popup_wrap #trp_ald_no_text_popup_change_language { margin: 0; height: var(--bl-ald-h); white-space: nowrap; }
	#trp_no_text_popup_wrap #trp_ald_no_text_popup_x { display: block; }
}
@media (max-width: 480px) {
	#trp_no_text_popup_wrap #trp_no_text_popup { padding-inline: var(--wp--preset--spacing--20); gap: var(--wp--preset--spacing--10); }
	#trp_no_text_popup_wrap #trp_ald_not_text_popup_ls_and_button { gap: var(--wp--preset--spacing--10); }
	#trp_no_text_popup_wrap #trp_ald_no_text_popup_div::before { display: none; }
}

