/* Ston Currency Switcher
 * Theme it with these variables on .ston-cs (or any parent):
 * --ston-cs-color, --ston-cs-bg, --ston-cs-border, --ston-cs-active-color,
 * --ston-cs-active-bg, --ston-cs-menu-bg, --ston-cs-radius, --ston-cs-font-size, --ston-cs-gap
 */
.ston-cs {
	--ston-cs-color: currentColor;
	--ston-cs-bg: transparent;
	--ston-cs-border: rgba(127, 127, 127, .35);
	--ston-cs-active-color: currentColor;
	--ston-cs-active-bg: rgba(127, 127, 127, .2);
	--ston-cs-menu-bg: #fff;
	--ston-cs-menu-color: #1d2327;
	--ston-cs-radius: 999px;
	--ston-cs-font-size: 13px;
	--ston-cs-gap: 2px;
	position: relative;
	display: inline-flex;
	align-items: center;
	font-size: var(--ston-cs-font-size);
	line-height: 1;
	color: var(--ston-cs-color);
	vertical-align: middle;
}

.ston-cs a.ston-cs__option {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.ston-cs a.ston-cs__option:focus-visible,
.ston-cs__toggle:focus-visible,
.ston-cs__select:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Pills */
.ston-cs--pills {
	gap: var(--ston-cs-gap);
	padding: 2px;
	border: 1px solid var(--ston-cs-border);
	border-radius: var(--ston-cs-radius);
	background: var(--ston-cs-bg);
}

.ston-cs--pills .ston-cs__option {
	padding: 6px 11px;
	border-radius: var(--ston-cs-radius);
	opacity: .65;
	transition: opacity .2s, background-color .2s;
}

.ston-cs--pills .ston-cs__option:hover {
	opacity: 1;
}

.ston-cs--pills .ston-cs__option.is-active {
	opacity: 1;
	color: var(--ston-cs-active-color);
	background: var(--ston-cs-active-bg);
}

/* Inline links */
.ston-cs--links {
	gap: .9em;
}

.ston-cs--links .ston-cs__option {
	opacity: .6;
	transition: opacity .2s;
}

.ston-cs--links .ston-cs__option:hover,
.ston-cs--links .ston-cs__option.is-active {
	opacity: 1;
}

.ston-cs--links .ston-cs__option.is-active {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Native select */
.ston-cs__select {
	font: inherit;
	font-size: var(--ston-cs-font-size);
	color: inherit;
	background: var(--ston-cs-bg);
	border: 1px solid var(--ston-cs-border);
	border-radius: 6px;
	padding: 5px 8px;
	cursor: pointer;
}

/* Dropdown */
.ston-cs__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 7px 12px;
	font: inherit;
	font-size: var(--ston-cs-font-size);
	line-height: 1;
	color: inherit;
	background: var(--ston-cs-bg);
	border: 1px solid var(--ston-cs-border);
	border-radius: 8px;
	cursor: pointer;
}

.ston-cs__caret {
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .2s;
}

.ston-cs--dropdown.is-open .ston-cs__caret {
	transform: translateY(1px) rotate(-135deg);
}

.ston-cs__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 99999;
	min-width: 100%;
	margin: 0;
	padding: 4px;
	list-style: none;
	color: var(--ston-cs-menu-color);
	background: var(--ston-cs-menu-bg);
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}

.ston-cs--dropdown.is-open .ston-cs__menu,
.ston-cs--dropdown:focus-within .ston-cs__menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.ston-cs__menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ston-cs__menu .ston-cs__option {
	display: block;
	padding: 8px 12px;
	border-radius: 6px;
}

.ston-cs__menu .ston-cs__option:hover,
.ston-cs__menu .ston-cs__option:focus,
.ston-cs__menu .ston-cs__option.is-active {
	background: rgba(127, 127, 127, .14);
}

.ston-cs__menu .ston-cs__option.is-active {
	font-weight: 600;
}

/* Floating switcher */
.ston-cs-floating {
	position: fixed;
	bottom: 20px;
	z-index: 99998;
}

.ston-cs-floating--bottom-left {
	left: 20px;
}

.ston-cs-floating--bottom-right {
	right: 20px;
}

.ston-cs-floating .ston-cs__toggle {
	color: #1d2327;
	background: #fff;
	border-color: rgba(0, 0, 0, .1);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.ston-cs-floating .ston-cs__menu {
	top: auto;
	bottom: calc(100% + 6px);
}

.ston-cs-floating--bottom-left .ston-cs__menu {
	right: auto;
	left: 0;
}

/* Menu item */
.ston-cs-menu-item {
	display: flex;
	align-items: center;
}

/* While switching */
.ston-cs-loading .price,
.ston-cs-loading [data-ston-price],
.ston-cs-loading .woocommerce-Price-amount,
.ston-cs-loading .cart_totals {
	opacity: .45;
	transition: opacity .2s;
}

.ston-cs-loading [data-ston-switcher] {
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.ston-cs *,
	.ston-cs-loading * {
		transition: none !important;
	}
}
