/**
 * Jet Currency Switcher — front-end styles.
 *
 * Package: Jet_Currency_Switcher
 */

.jcs-switcher {
	position: relative;
	display: inline-block;
	font-size: 14px;
	line-height: 1.4;
	-webkit-user-select: none;
	user-select: none;
}

.jcs-switcher__toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #f5f5f5;
	border: 1px solid #dcdcdc;
	border-radius: 4px;
	padding: 6px 12px;
	cursor: pointer;
	color: inherit;
	font: inherit;
}

.jcs-switcher__arrow {
	width: 12px;
	height: 12px;
	position: relative;
	display: inline-block;
}

.jcs-switcher__arrow::before {
	content: "";
	position: absolute;
	top: 40%;
	left: 50%;
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translate(-50%, -50%) rotate(45deg);
	transition: transform 0.2s ease;
}

.jcs-switcher--open .jcs-switcher__arrow::before {
	transform: translate(-50%, -50%) rotate(225deg);
}

.jcs-switcher__list {
	position: absolute;
	z-index: 100;
	top: calc(100% + 4px);
	left: 0;
	min-width: 100%;
	width: 160px;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	display: none;
	max-height: 260px;
	overflow-y: auto;
}

.jcs-switcher--open .jcs-switcher__list {
	display: block;
}

.jcs-switcher--inline .jcs-switcher__toggle {
	display: none;
}

.jcs-switcher--inline .jcs-switcher__list {
	position: static;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border: none;
	box-shadow: none;
	padding: 0;
	width: auto;
}

.jcs-switcher--inline .jcs-switcher__item {
	border: 1px solid #dcdcdc;
	border-radius: 4px;
}

.jcs-switcher__item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.jcs-switcher__item:hover,
.jcs-switcher__item--active {
	background: #f0f0f0;
}

.jcs-switcher__flag {
	width: 18px;
	height: auto;
	border-radius: 2px;
	flex-shrink: 0;
}

.jcs-switcher__code {
	font-weight: 600;
}

.jcs-switcher__symbol {
	color: #888;
}

.jcs-price {
	display: inline-block;
	font-weight: 600;
	white-space: nowrap;
}

.jcs-price--empty {
	color: #999;
	font-style: italic;
	font-weight: normal;
}

.jcs-price__prefix {
	font-weight: normal;
	opacity: 0.8;
}
