/*
 * Satyar Gold language switcher (satyargold-i18n 1.0.0).
 * Logical properties only, so the same rules work in rtl (fa, ar, ckb) and ltr (en).
 * Light header (default, sgd-hdr-light): ink text on white. Dark header (sgd-bullion, sgd-hdr-dark): white text and the
 * gold of satyargold-design, the dropdown styled like the header sub-menus. #masthead raises specificity the same way
 * satyargold-design does (no !important).
 */
.sgi-switch {
	--sgi-ink: var(--ast-global-color-2, #1C1A17);
	--sgi-gold: var(--ast-global-color-0, #A88433);
	--sgi-line: var(--ast-global-color-7, #E9E1D0);
	--sgi-soft: var(--ast-global-color-5, #FBF8F2);
	--sgi-panel: var(--ast-global-color-4, #FFFFFF);
	--sgi-text: var(--sgi-ink);
	--sgi-pill-bg: var(--sgi-panel);
	--sgi-pill-line: var(--sgi-line);
	--sgi-hover: var(--sgi-soft);
	position: relative;
	display: inline-flex;
	align-items: center;
	align-self: center;
	margin-inline-end: 12px;
	font-family: inherit;
	line-height: 1.3;
}
:is(body.sgd-bullion, body.sgd-hdr-dark) #masthead .sgi-switch {
	--sgi-text: #fff;
	--sgi-gold: var(--sgd-mustard-lt, #c9b67f);
	--sgi-pill-bg: transparent;
	--sgi-pill-line: rgba(255, 255, 255, 0.28);
	--sgi-panel: var(--sgd-dark2, #2e2a42);
	--sgi-hover: rgba(255, 255, 255, 0.08);
	--sgi-line: rgba(255, 255, 255, 0.12);
}
#masthead .sgi-switch__btn {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 7px;
	box-sizing: border-box;
	min-block-size: 36px;
	padding-block: 0;
	padding-inline: 12px 11px;
	border: 1px solid var(--sgi-pill-line);
	border-radius: 999px;
	background: var(--sgi-pill-bg);
	color: var(--sgi-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
	cursor: pointer;
	list-style: none;
	user-select: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
#masthead .sgi-switch__btn::-webkit-details-marker { display: none; }
#masthead .sgi-switch__btn::marker { content: ""; }
#masthead .sgi-switch__btn:hover,
#masthead .sgi-switch[open] > .sgi-switch__btn {
	border-color: var(--sgi-gold);
	background: var(--sgi-hover);
}
#masthead .sgi-switch__btn:focus-visible {
	outline: 2px solid var(--sgi-gold);
	outline-offset: 2px;
}
.sgi-switch__globe {
	flex: none;
	inline-size: 17px;
	block-size: 17px;
	color: var(--sgi-gold, #A88433);
}
.sgi-switch__chev {
	flex: none;
	inline-size: 10px;
	block-size: 10px;
	opacity: 0.75;
	transition: transform 0.15s ease;
}
.sgi-switch[open] .sgi-switch__chev { transform: rotate(180deg); }
.sgi-switch__list,
.sgi-switch__list * {
	box-sizing: border-box; /* Astra's LTR stylesheet leaves lists in content-box */
}
.sgi-switch__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
#masthead .sgi-switch__list--pop {
	position: absolute;
	inset-block-start: calc(100% + 10px);
	inset-inline-end: 0;
	z-index: 1000;
	min-inline-size: 170px;
	padding-block: 6px;
	border: 1px solid var(--sgi-line);
	border-block-start: 2px solid var(--sgi-gold);
	border-radius: 2px;
	background: var(--sgi-panel);
	box-shadow: 0 12px 28px rgba(20, 16, 36, 0.18);
}
.sgi-switch__item { margin: 0; padding: 0; }
#masthead .sgi-switch .sgi-switch__link,
.sgi-drawer .sgi-switch__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-block-size: 40px;
	padding-block: 6px;
	padding-inline: 18px;
	color: var(--sgi-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	text-align: start;
	unicode-bidi: isolate;
}
#masthead .sgi-switch .sgi-switch__link:hover,
#masthead .sgi-switch .sgi-switch__link:focus-visible {
	background: var(--sgi-hover);
	color: var(--sgi-text);
	text-decoration: none;
}
#masthead .sgi-switch .sgi-switch__link:focus-visible,
.sgi-drawer .sgi-switch__link:focus-visible {
	outline: 2px solid var(--sgi-gold, #A88433);
	outline-offset: -2px;
}
#masthead .sgi-switch .sgi-switch__link[aria-current="true"] { font-weight: 600; }
.sgi-switch__check {
	flex: none;
	inline-size: 14px;
	block-size: 14px;
	color: var(--sgi-gold, #A88433);
}

/* Phone header: between the account icon and the hamburger; 44 px touch target. */
#masthead .sgi-switch--mobile { margin-inline: 2px 4px; }
#masthead .sgi-switch--mobile .sgi-switch__btn {
	min-block-size: 44px;
	min-inline-size: 44px;
	justify-content: center;
	gap: 6px;
	padding-inline: 11px;
	font-size: 14px;
}
#masthead .sgi-switch--mobile .sgi-switch__chev { display: none; }
#masthead .sgi-switch--mobile .sgi-switch__list--pop { min-inline-size: 184px; }
#masthead .sgi-switch--mobile .sgi-switch__link { min-block-size: 44px; font-size: 16px; }
/* Phones: the globe alone (the summary's aria-label names the language; the full list is at the end of the menu),
   so a long site title such as «Satyar Gold» keeps one line. Tablets keep the name. */
@media (max-width: 480px) {
	#masthead .sgi-switch--mobile .sgi-switch__cur { display: none; }
	#masthead .sgi-switch--mobile .sgi-switch__btn { padding-inline: 0; }
	#masthead .sgi-switch--mobile .sgi-switch__globe { inline-size: 20px; block-size: 20px; }
}

/* End of the phone menu (dropdown or drawer): the four names as chips. */
.sgi-drawer {
	--sgi-text: var(--ast-global-color-2, #1C1A17);
	--sgi-gold: var(--ast-global-color-0, #A88433);
	--sgi-line: var(--ast-global-color-7, #E9E1D0);
	--sgi-soft: var(--ast-global-color-5, #FBF8F2);
	--sgi-muted: var(--ast-global-color-8, #5F584E);
	margin: 0;
	padding-block: 16px 20px;
	padding-inline: 20px;
	border-block-start: 1px solid var(--sgi-line);
}
:is(body.sgd-bullion, body.sgd-hdr-dark) #masthead .sgi-drawer {
	--sgi-text: #fff;
	--sgi-gold: var(--sgd-mustard-lt, #c9b67f);
	--sgi-line: rgba(255, 255, 255, 0.14);
	--sgi-soft: rgba(255, 255, 255, 0.08);
	--sgi-muted: rgba(255, 255, 255, 0.7);
}
.sgi-drawer__title {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-block: 0 10px;
	margin-inline: 0;
	color: var(--sgi-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
}
.sgi-switch__list--drawer {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
#masthead .sgi-drawer .sgi-switch__link {
	min-block-size: 44px;
	padding-inline: 16px;
	border: 1px solid var(--sgi-line);
	border-radius: 999px;
	color: var(--sgi-text);
	font-size: 15px;
}
#masthead .sgi-drawer .sgi-switch__link[aria-current="true"] {
	border-color: var(--sgi-gold);
	background: var(--sgi-soft);
	font-weight: 600;
}
.sgi-drawer .sgi-switch__check { display: none; }

/* Without Astra. */
.sgi-switch-fallback { display: flex; justify-content: flex-end; padding-block: 8px; padding-inline: 16px; }
