/* Ẩn UI mặc định xấu của Google Website Translator, tránh layout shift. */
.goog-te-banner-frame.skiptranslate {
	display: none !important;
}

body {
	top: 0 !important;
}

.goog-text-highlight {
	background: none !important;
	box-shadow: none !important;
}

.theanmarket-google-translate-element {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

/*
 * Toggle "VI | EN" cố định góc trên-phải trên mọi viewport. Theme này không
 * override header của theme cha (Nitro/WooRockets) nên không có điểm chèn an
 * toàn nào trong nav — render fixed qua wp_footer là lựa chọn chắc chắn nhất,
 * không phụ thuộc layout header nào đang active.
 *
 * Màu dùng --default-color-green (#08e097, turquoise thương hiệu The An) làm
 * nền active, chữ navy-blue (--default-color-navy-blue) để đủ tương phản —
 * theo đúng gợi ý phối màu ghi trong css/custom.css của theme này.
 */
.theanmarket-lang-switch {
	display: inline-flex;
	align-items: center;
	padding: 2px;
	border: 1px solid var(--default-color-green, #08e097);
	border-radius: 999px;
	background: var(--default-color-white, #fff);
	line-height: 1;
	/*
	 * Nitro applies `position: relative; z-index: 1` to every div after the
	 * header. The switcher is rendered in wp_footer, so without this override
	 * it is pushed to the bottom of single-product pages.
	 */
	position: fixed !important;
	top: 50px;
	right: 12px;
	z-index: 2147483647 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.theanmarket-lang-switch:hover,
.theanmarket-lang-switch:focus-within {
	opacity: 1;
}

.theanmarket-lang-switch__option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--default-color-navy-blue, #001f3f);
	font-family: "Oswald", sans-serif;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.5px;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.theanmarket-lang-switch__option[aria-pressed="true"] {
	background: var(--default-color-green, #08e097);
	color: var(--default-color-navy-blue, #001f3f);
	cursor: default;
}

.theanmarket-lang-switch__option[aria-pressed="false"]:hover {
	background: rgba(8, 224, 151, 0.15);
}

/* Non-blocking feedback while Google Translate applies the selected language. */
.theanmarket-lang-switch__notice {
	position: fixed !important;
	top: 96px;
	right: 12px;
	z-index: 2147483647 !important;
	padding: 9px 12px;
	border-radius: 6px;
	background: var(--default-color-navy-blue, #001f3f);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	color: var(--default-color-white, #fff);
	font-family: "Oswald", sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.3px;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.theanmarket-lang-switch__notice.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 768px) {
	.theanmarket-lang-switch {
		top: 50px;
		right: 8px;
	}

	.theanmarket-lang-switch__notice {
		right: 8px;
	}
}
