/* Themex Currency Selector (block / Elementor / shortcode) */

.themx-wcmc-cs {
	--themx-wcmc-cs-flag-w: 22px;
	--themx-wcmc-cs-flag-h: 16px;
	display: block;
	max-width: 100%;
	box-sizing: border-box;
}

.themx-wcmc-cs .themx-wcmc-flag {
	width: var(--themx-wcmc-cs-flag-w, 22px);
	height: var(--themx-wcmc-cs-flag-h, 16px);
	object-fit: cover;
	flex-shrink: 0;
}

.themx-wcmc-cs__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.themx-wcmc-cs--vertical .themx-wcmc-cs__list {
	flex-direction: column;
	align-items: flex-start;
}

.themx-wcmc-cs--horizontal .themx-wcmc-cs__list {
	flex-direction: row;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__list {
	flex-wrap: nowrap;
	overflow-x: auto;
	max-width: 100%;
	width: max-content;
	gap: 0;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: var(--themx-wcmc-cs-bg, #ffffff);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	align-items: stretch;
	list-style: none;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__list::-webkit-scrollbar {
	display: none;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__li {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: stretch;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item {
	position: relative;
	z-index: auto;
	gap: 5px;
	min-width: 42px;
	min-height: 36px;
	padding: 7px 16px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--themx-wcmc-cs-text, #222222) !important;
	box-shadow: none !important;
	justify-content: center;
	align-items: center;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, padding 0.18s ease;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item .themx-wcmc-cs__code {
	display: none;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	letter-spacing: 0.01em;
	color: var(--themx-wcmc-cs-text, #111111) !important;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item .themx-wcmc-cs__symbol {
	font-weight: 500;
	font-size: 15px;
	line-height: 1;
	color: var(--themx-wcmc-cs-text, #222222) !important;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item {
	background: var(--themx-wcmc-cs-bg, #ffffff) !important;
	border-color: #cfcfcf !important;
	border-radius: 999px;
	color: var(--themx-wcmc-cs-text, #111111) !important;
	box-shadow: none !important;
	padding: 7px 14px;
	min-width: 60px;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__li_left {
	margin-right: -30px;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__li_left .themx-wcmc-cs__item {
	justify-content: flex-start;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__li_right {
	margin-left: -30px;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__li_right .themx-wcmc-cs__item {
	justify-content: flex-end;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item.is-active {
	background: var(--themx-wcmc-cs-active-bg, #ffffff) !important;
	border-color: #cfcfcf !important;
	color: var(--themx-wcmc-cs-active-text, #111111) !important;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item.is-active .themx-wcmc-cs__code {
	display: inline;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item.is-active .themx-wcmc-cs__symbol {
	font-weight: 600;
	color: var(--themx-wcmc-cs-active-text, #111111) !important;
}

.themx-wcmc-cs--slide .themx-wcmc-cs__item:hover .themx-wcmc-cs__code,
.themx-wcmc-cs--slide .themx-wcmc-cs__item:hover .themx-wcmc-cs__symbol,
.themx-wcmc-cs--slide .themx-wcmc-cs__item.is-active .themx-wcmc-cs__code,
.themx-wcmc-cs--slide .themx-wcmc-cs__item.is-active .themx-wcmc-cs__symbol {
	color: var(--themx-wcmc-cs-active-text, #111111) !important;
}

.themx-wcmc-cs__li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.themx-wcmc-cs__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid var(--themx-wcmc-product-border, #dddddd);
	border-radius: 3px;
	background: var(--themx-wcmc-cs-bg, var(--themx-wcmc-product-bg, #ffffff));
	color: var(--themx-wcmc-cs-text, var(--themx-wcmc-admin-text, #1d2327)) !important;
	cursor: pointer;
	line-height: 1.2;
	font: inherit;
	white-space: nowrap;
	box-sizing: border-box;
}

.themx-wcmc-cs__item:hover,
.themx-wcmc-cs__item.is-active {
	background: var(--themx-wcmc-cs-active-bg, var(--themx-wcmc-accent, #f78080));
	border-color: var(--themx-wcmc-cs-active-bg, var(--themx-wcmc-accent, #f78080));
	color: var(--themx-wcmc-cs-active-text, var(--themx-wcmc-text-on-light, #ffffff)) !important;
}

.themx-wcmc-cs__item:hover .themx-wcmc-cs__code,
.themx-wcmc-cs__item:hover .themx-wcmc-cs__symbol,
.themx-wcmc-cs__item.is-active .themx-wcmc-cs__code,
.themx-wcmc-cs__item.is-active .themx-wcmc-cs__symbol {
	color: inherit !important;
}

.themx-wcmc-cs__code,
.themx-wcmc-cs__symbol {
	color: var(--themx-wcmc-cs-text, var(--themx-wcmc-admin-text, #1d2327));
	font-weight: 500;
}

.themx-wcmc-cs--circle .themx-wcmc-cs__item {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	justify-content: center;
}

.themx-wcmc-cs--circle .themx-wcmc-cs__symbol {
	font-size: 1em;
}

/* Listbox / vertical click dropdown */
.themx-wcmc-cs--dropdown,
.themx-wcmc-cs--listbox {
	position: relative;
	display: inline-block;
	max-width: 100%;
	z-index: 5;
}

.themx-wcmc-cs__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 10px 15px;
	min-width: 66px;
	border: 1px solid var(--themx-wcmc-product-border, #dddddd);
	border-radius: 3px;
	background: var(--themx-wcmc-cs-bg, var(--themx-wcmc-product-bg, #ffffff));
	color: var(--themx-wcmc-cs-text, var(--themx-wcmc-admin-text, #1d2327)) !important;
	cursor: pointer;
	font: inherit;
	line-height: 1.2;
	box-sizing: border-box;
}

.themx-wcmc-cs__toggle:hover {
	background: var(--themx-wcmc-cs-active-bg, transparent);
	border-color: var(--themx-wcmc-cs-active-text, var(--themx-wcmc-accent, #f78080));
	color: var(--themx-wcmc-cs-active-text, var(--themx-wcmc-admin-text, #1d2327)) !important;
}

.themx-wcmc-cs--circle.themx-wcmc-cs--dropdown .themx-wcmc-cs__toggle {
	min-width: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	justify-content: center;
	gap: 0;
}

.themx-wcmc-cs--circle.themx-wcmc-cs--dropdown .themx-wcmc-cs__caret {
	display: none;
}

.themx-wcmc-cs__toggle-inner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.themx-wcmc-cs__caret {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.7;
	transition: transform 0.15s ease;
}

.themx-wcmc-cs--dropdown.is-open .themx-wcmc-cs__caret {
	transform: rotate(180deg);
}

.themx-wcmc-cs__menu {
	display: none;
	position: absolute;
	z-index: 30;
	min-width: 100%;
	width: max-content;
	margin: 0;
	padding: 4px;
	border: 1px solid var(--themx-wcmc-product-border, #dddddd);
	border-radius: 3px;
	background: var(--themx-wcmc-cs-bg, var(--themx-wcmc-product-bg, #ffffff));
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	flex-direction: column;
	gap: 2px;
	box-sizing: border-box;
}

/* Open only on click (.is-open), not hover. */
.themx-wcmc-cs--dropdown.is-open .themx-wcmc-cs__menu {
	display: flex;
}

.themx-wcmc-cs--dir-bottom .themx-wcmc-cs__menu {
	top: calc(100% + 4px);
	left: 0;
}

.themx-wcmc-cs--dir-top .themx-wcmc-cs__menu {
	bottom: calc(100% + 4px);
	left: 0;
}

.themx-wcmc-cs--dir-left .themx-wcmc-cs__menu {
	right: calc(100% + 4px);
	top: 0;
}

.themx-wcmc-cs--dir-right .themx-wcmc-cs__menu {
	left: calc(100% + 4px);
	top: 0;
}

.themx-wcmc-cs--dropdown .themx-wcmc-cs__item {
	display: flex;
	width: 100%;
	border-color: transparent;
}

.themx-wcmc-cs--dropdown .themx-wcmc-cs__item:hover,
.themx-wcmc-cs--dropdown .themx-wcmc-cs__item.is-active {
	background: var(--themx-wcmc-cs-active-bg, var(--themx-wcmc-accent, #f78080));
	color: var(--themx-wcmc-cs-active-text, var(--themx-wcmc-text-on-light, #ffffff)) !important;
}

.themx-wcmc-cs--circle.themx-wcmc-cs--dropdown .themx-wcmc-cs__menu .themx-wcmc-cs__item {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	justify-content: center;
}

.themx-wcmc-cs.themx-wcmc-cs--layout7 .themx-wcmc-cs__toggle {
	min-width: 60px;
}

.themx-wcmc-cs.themx-wcmc-cs--layout7 .themx-wcmc-cs__menu .themx-wcmc-cs__item {
	justify-content: center;
}

/*
 * Elementor / theme button resets.
 * Themes (e.g. Merto) and Elementor Kit often style bare <button> with dark fills;
 * without these overrides the editor preview shows black blocks instead of the selector.
 */
.elementor-widget-themx-wcmc-currency-selector .themx-wcmc-cs,
.elementor-element .themx-wcmc-cs {
	max-width: 100%;
}

.elementor-widget-themx-wcmc-currency-selector .themx-wcmc-cs button.themx-wcmc-cs__toggle,
.elementor-widget-themx-wcmc-currency-selector .themx-wcmc-cs button.themx-wcmc-cs__item,
.elementor-element .themx-wcmc-cs button.themx-wcmc-cs__toggle,
.elementor-element .themx-wcmc-cs button.themx-wcmc-cs__item,
.themx-wcmc-cs button.themx-wcmc-cs__toggle,
.themx-wcmc-cs button.themx-wcmc-cs__item {
	background-color: var(--themx-wcmc-cs-bg, var(--themx-wcmc-product-bg, #ffffff)) !important;
	background-image: none !important;
	color: var(--themx-wcmc-cs-text, var(--themx-wcmc-admin-text, #1d2327)) !important;
	border: 1px solid var(--themx-wcmc-product-border, #dddddd) !important;
	border-radius: 3px !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: 1.2 !important;
	min-height: 0 !important;
	height: auto !important;
	width: auto !important;
	max-width: 100% !important;
	padding: 6px 10px !important;
	margin: 0 !important;
	fill: currentColor;
	transition: none;
}

.themx-wcmc-cs button.themx-wcmc-cs__toggle,
.elementor-element .themx-wcmc-cs button.themx-wcmc-cs__toggle {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 8px !important;
	padding: 10px 15px !important;
	min-width: 66px !important;
}

.themx-wcmc-cs--dropdown .themx-wcmc-cs__menu,
.elementor-element .themx-wcmc-cs--dropdown .themx-wcmc-cs__menu {
	display: none !important;
	position: absolute !important;
	z-index: 30 !important;
	flex-direction: column !important;
	gap: 2px !important;
	min-width: 100% !important;
	width: max-content !important;
	margin: 0 !important;
	padding: 4px !important;
	border: 1px solid var(--themx-wcmc-product-border, #dddddd) !important;
	border-radius: 3px !important;
	background: var(--themx-wcmc-cs-bg, var(--themx-wcmc-product-bg, #ffffff)) !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
	box-sizing: border-box !important;
}

.themx-wcmc-cs--dropdown.is-open .themx-wcmc-cs__menu,
.elementor-element .themx-wcmc-cs--dropdown.is-open .themx-wcmc-cs__menu {
	display: flex !important;
}

.themx-wcmc-cs--dropdown .themx-wcmc-cs__item,
.elementor-element .themx-wcmc-cs--dropdown .themx-wcmc-cs__item {
	display: flex !important;
	width: 100% !important;
	border-color: transparent !important;
}

.themx-wcmc-cs button.themx-wcmc-cs__item:hover,
.themx-wcmc-cs button.themx-wcmc-cs__item.is-active,
.elementor-element .themx-wcmc-cs button.themx-wcmc-cs__item:hover,
.elementor-element .themx-wcmc-cs button.themx-wcmc-cs__item.is-active {
	background-color: var(--themx-wcmc-cs-active-bg, var(--themx-wcmc-accent, #f78080)) !important;
	border-color: var(--themx-wcmc-cs-active-bg, var(--themx-wcmc-accent, #f78080)) !important;
	color: var(--themx-wcmc-cs-active-text, var(--themx-wcmc-text-on-light, #ffffff)) !important;
}

.themx-wcmc-cs button.themx-wcmc-cs__toggle:hover,
.elementor-element .themx-wcmc-cs button.themx-wcmc-cs__toggle:hover {
	background-color: var(--themx-wcmc-cs-active-bg, transparent) !important;
	border-color: var(--themx-wcmc-cs-active-text, var(--themx-wcmc-accent, #f78080)) !important;
	color: var(--themx-wcmc-cs-active-text, var(--themx-wcmc-admin-text, #1d2327)) !important;
}

/* Rates / convertor / current (shortcodes) */
.themx-wcmc-rates__table {
	width: 100%;
	max-width: 420px;
	border-collapse: collapse;
}

.themx-wcmc-rates__table th,
.themx-wcmc-rates__table td {
	padding: 8px 10px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
}

.themx-wcmc-convertor {
	max-width: 420px;
	box-sizing: border-box;
	font-family: inherit;
	color: #111111;
}

.themx-wcmc-convertor__title {
	margin: 0 0 18px;
	padding: 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: #111111;
}

.themx-wcmc-convertor__field {
	margin: 0 0 14px;
}

.themx-wcmc-convertor__label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.3;
	color: #222222;
}

.themx-wcmc-convertor__amount,
.themx-wcmc-convertor__from,
.themx-wcmc-convertor__to {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 12px 14px;
	border: none;
	border-radius: 8px;
	background: #f2f3f5;
	color: #111111;
	font: inherit;
	font-size: 0.9375rem;
	line-height: 1.4;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
}

.themx-wcmc-convertor__amount:focus {
	outline: 2px solid #c8ccd0;
	outline-offset: 1px;
}

.themx-wcmc-convertor .nice-select {
	float: none;
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 46px;
	margin: 0;
	padding: 12px 36px 12px 14px;
	border: none;
	border-radius: 8px;
	background-color: #f2f3f5;
	line-height: 1.4;
	font-size: 0.9375rem;
	color: #111111;
	box-sizing: border-box;
}

.themx-wcmc-convertor .nice-select:hover,
.themx-wcmc-convertor .nice-select:focus,
.themx-wcmc-convertor .nice-select.open {
	border-color: transparent;
	background-color: #f2f3f5;
}

.themx-wcmc-convertor .nice-select:after {
	right: 14px;
	border-color: #555555;
}

.themx-wcmc-convertor .nice-select .current {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.themx-wcmc-convertor .nice-select .list {
	width: 100%;
	margin-top: 4px;
	border: none;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 220px;
	overflow-y: auto;
}

.themx-wcmc-convertor .nice-select .option {
	padding: 10px 14px;
	min-height: 0;
	line-height: 1.4;
	font-size: 0.9375rem;
}

.themx-wcmc-convertor .nice-select .option:hover,
.themx-wcmc-convertor .nice-select .option.focus,
.themx-wcmc-convertor .nice-select .option.selected.focus {
	background-color: #f2f3f5;
}

.themx-wcmc-convertor .nice-select .option.selected {
	font-weight: 600;
}

.themx-wcmc-convertor__field:has(.nice-select.open) {
	position: relative;
	z-index: 20;
}

.themx-wcmc-convertor__result {
	margin: 16px 0 0;
	padding: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	color: #111111;
}

.themx-wcmc-current {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.themx-wcmc-cs__name {
	margin: 0 4px;
}
