/* ChaoAcademy global UI refinements. */

/* HumiGat floating switcher: compact, premium, one-line pill. */
.hg-switcher--floating {
	right: 16px !important;
	bottom: 16px !important;
	width: auto !important;
	max-width: min(92vw, 560px) !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: transparent !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	animation: none !important;
}

.hg-switcher--floating .hg-switcher__top,
.hg-switcher--floating .hg-switcher__hint,
.hg-switcher--floating .hg-switcher__noscript {
	display: none !important;
}

.hg-switcher--floating .hg-switcher__chips {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 3px !important;
	padding: 5px !important;
	border: 1px solid rgba(195, 157, 82, 0.46) !important;
	border-radius: 999px !important;
	background: rgba(11, 34, 57, 0.94) !important;
	box-shadow: 0 12px 34px rgba(2, 6, 23, 0.22) !important;
	backdrop-filter: blur(14px) !important;
}

.hg-switcher--floating .hg-switcher__chip {
	min-width: 0 !important;
	min-height: 28px !important;
	padding: 0 9px !important;
	border: 1px solid transparent !important;
	border-radius: 999px !important;
	background: transparent !important;
	color: #c7d3e2 !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0.02em !important;
	box-shadow: none !important;
	transform: none !important;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
}

.hg-switcher--floating .hg-switcher__chip em {
	margin-left: 2px !important;
	font-size: 9px !important;
	opacity: 0.62 !important;
}

.hg-switcher--floating .hg-switcher__chip:hover {
	border-color: rgba(195, 157, 82, 0.56) !important;
	background: rgba(255, 255, 255, 0.07) !important;
	color: #fff !important;
	box-shadow: none !important;
	transform: none !important;
}

.hg-switcher--floating .hg-switcher__chip.is-active {
	border-color: transparent !important;
	background: linear-gradient(135deg, #e8d7b0, #c39d52) !important;
	color: #0b2239 !important;
	box-shadow: 0 2px 10px rgba(195, 157, 82, 0.28) !important;
}

.hg-switcher--floating .hg-switcher__chip.is-active em {
	opacity: 0.8 !important;
}

@media (max-width: 768px) {
	.hg-switcher--floating {
		left: auto !important;
		right: 10px !important;
		bottom: 10px !important;
		max-width: calc(100vw - 20px) !important;
	}

	.hg-switcher--floating .hg-switcher__chips {
		max-height: 38vh !important;
		overflow-y: auto !important;
		border-radius: 18px !important;
	}

	.hg-switcher--floating .hg-switcher__chip {
		min-height: 26px !important;
		padding: 0 8px !important;
		font-size: 10px !important;
	}
}

/* Keep the floating switcher away from the primary reading column. */
.hg-switcher--floating {
	left: 16px !important;
	right: auto !important;
}

/* Cart and checkout show the switcher inline in the hero instead. */
body.woocommerce-cart .hg-switcher--floating,
body.woocommerce-checkout .hg-switcher--floating {
	display: none !important;
}

.ca-cart-hero .hg-switcher--inline,
.ca-checkout-hero .hg-switcher--inline {
	margin: 0 !important;
}

.ca-cart-hero .hg-switcher--inline .hg-switcher__chips,
.ca-checkout-hero .hg-switcher--inline .hg-switcher__chips {
	justify-content: flex-end;
	gap: 4px;
}

.ca-cart-hero .hg-switcher--inline .hg-switcher__chip,
.ca-checkout-hero .hg-switcher--inline .hg-switcher__chip {
	min-height: 28px;
	padding: 4px 9px;
	font-size: 10px;
}

.ca-currency-label {
	display: inline-block;
	margin-right: 3px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.03em;
	line-height: 1.2;
	white-space: nowrap;
	vertical-align: 1px;
	opacity: 0.58;
}

@media (max-width: 768px) {
	.hg-switcher--floating {
		left: 10px !important;
		right: auto !important;
	}

	.ca-cart-hero .hg-switcher--inline .hg-switcher__chips,
	.ca-checkout-hero .hg-switcher--inline .hg-switcher__chips {
		justify-content: flex-start;
	}
}

.ca-cart-hero .hg-switcher--inline,
.ca-checkout-hero .hg-switcher--inline {
	--hg-switcher-color: var(--ca-cart-navy, #0b2239);
	--hg-switcher-border: var(--ca-cart-line, #e7dfd1);
	--hg-switcher-active-bg: var(--ca-cart-navy, #0b2239);
	--hg-switcher-active-text: #fff;
	--hg-switcher-active-border: var(--ca-cart-navy, #0b2239);
}

/* Cart / checkout currency selector (no-refresh, full labels). */
.ca-currency-switch {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	max-width: 100%;
}

.ca-currency-switch__label {
	margin-right: 2px;
	color: var(--ca-cart-muted, #6b7280);
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ca-currency-chip {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	min-height: 28px;
	padding: 4px 9px;
	border: 1px solid var(--ca-cart-line, #e7dfd1);
	border-radius: 999px;
	background: var(--ca-cart-paper, #fffdf8);
	color: var(--ca-cart-navy, #0b2239);
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.01em;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.ca-currency-chip em {
	font-style: normal;
	font-size: 9px;
	opacity: 0.56;
}

.ca-currency-chip:hover {
	border-color: var(--ca-cart-gold, #c39d52);
	color: #8a6428;
}

.ca-currency-chip.is-active {
	border-color: var(--ca-cart-navy, #0b2239);
	background: var(--ca-cart-navy, #0b2239);
	color: #fff;
}

.ca-currency-chip.is-active em {
	opacity: 0.78;
}

.ca-currency-chip:focus-visible {
	outline: 2px solid var(--ca-cart-gold, #c39d52);
	outline-offset: 2px;
}

.ca-currency-switch__status {
	flex-basis: 100%;
	min-height: 0;
	color: #b42318;
	font-size: 9.5px;
	line-height: 1.4;
	text-align: right;
}

.ca-cart-hero__currency .ca-currency-switch,
.ca-checkout-hero__currency .ca-currency-switch {
	justify-content: flex-end;
}

@media (max-width: 960px) {
	.ca-cart-hero__currency .ca-currency-switch,
	.ca-checkout-hero__currency .ca-currency-switch {
		justify-content: flex-start;
	}

	.ca-currency-switch__status {
		text-align: left;
	}
}

/* Sales-page (CA Offer) currency selector on mobile. */
@media (max-width: 560px) {
	.ca-offer-currency-switcher .hg-switcher__inline-trigger {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 42px;
		padding: 8px 14px;
		border: 1px solid rgba(195, 157, 82, 0.55);
		border-radius: 999px;
		background: #fffdf8;
		color: #0b2239;
		font: inherit;
		font-size: 12px;
		font-weight: 700;
		box-shadow: 0 8px 22px rgba(11, 34, 57, 0.08);
		cursor: pointer;
	}

	.ca-offer-currency-switcher .hg-switcher__inline-trigger span {
		color: #6b7280;
		font-size: 10px;
		font-weight: 800;
		letter-spacing: 0.06em;
		opacity: 1;
	}

	.ca-offer-currency-switcher .hg-switcher__inline-trigger strong {
		color: #0b2239;
		font-size: 12px;
		font-weight: 800;
	}

	.ca-offer-currency-switcher .hg-switcher--inline .hg-switcher__chips {
		max-height: 54vh;
		padding: 14px;
		border: 1px solid rgba(195, 157, 82, 0.42);
		border-radius: 18px;
		background: #fffdf8;
		box-shadow: 0 22px 60px rgba(11, 34, 57, 0.22);
		overflow-y: auto;
	}

	.ca-offer-currency-switcher .hg-switcher--inline .hg-switcher__chips .hg-switcher__chip {
		min-height: 44px;
		border-color: #e7dfd1;
		background: #fff;
		color: #0b2239;
		font-size: 11px;
		font-weight: 700;
	}

	.ca-offer-currency-switcher .hg-switcher--inline .hg-switcher__chips .hg-switcher__chip.is-active {
		border-color: #c39d52;
		background: #0b2239;
		color: #fff;
		box-shadow: 0 0 0 1px #c39d52;
	}

	.ca-offer-currency-switcher .hg-switcher--inline .hg-switcher__chips .hg-switcher__chip.is-active em {
		color: #e8d7b0;
		opacity: 1;
	}

	.ca-offer-sticky__currency {
		min-height: 24px;
		padding: 2px 9px;
		background: #fffdf8;
		font-size: 10px;
	}
}
