/*
 * cda-currency.css
 *
 * Styles frontend du mu-plugin cda-currency-switcher.
 *
 * Fournit :
 *   - un mécanisme anti-flash pour cacher les prix tant que la conversion JS
 *     n'a pas eu lieu (classe `cda-currency-loading` posée en <head>) ;
 *   - des styles de base (minimaux et discrets) pour le switcher ;
 *   - un hook `.cda-price.cda-converted` pour du styling custom par le thème.
 */

/* -- Anti-flash --------------------------------------------------------- */
html.cda-currency-loading .cda-price {
	visibility: hidden;
}

/* -- Switcher (styles de base, à customiser par le thème) --------------- */
.cda-currency-switcher {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: 0.9em;
}

.cda-currency-switcher select {
	padding: 0.3em 0.5em;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font: inherit;
}

/* Variante boutons (si le thème préfère exposer des <button data-cda-set-currency>) */
.cda-currency-switcher [data-cda-set-currency] {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
	padding: 0.3em 0.6em;
	cursor: pointer;
	font: inherit;
}

.cda-currency-switcher [data-cda-set-currency].is-active {
	background: currentColor;
	color: #fff;
}

/* -- Hook de styling sur les prix convertis ----------------------------- */
.cda-price.cda-converted {
	/* rien par défaut ; hook pour styling custom */
}
