/* Atomic Elements – Currency Switcher (storefront) */

.atomel-currency-switcher {
	position: relative;
	display: inline-block;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	line-height: 1.5;
}

.atomel-currency-switcher * {
	box-sizing: border-box;
}

.atomel-currency-switcher.atomel-cs-loading {
	opacity: 0.6;
	pointer-events: none;
	z-index: 999;
}

/* Size variants */
.atomel-currency-switcher.atomel-cs-size-small {
	font-size: 12px;
}

.atomel-currency-switcher.atomel-cs-size-small .atomel-cs-selected,
.atomel-currency-switcher.atomel-cs-size-small .atomel-cs-option {
	padding: 5px 10px;
}

.atomel-currency-switcher.atomel-cs-size-small .atomel-cs-flag {
	width: 18px;
}

.atomel-currency-switcher.atomel-cs-size-medium {
	font-size: 14px;
}

.atomel-currency-switcher.atomel-cs-size-medium .atomel-cs-selected,
.atomel-currency-switcher.atomel-cs-size-medium .atomel-cs-option {
	padding: 8px 14px;
}

.atomel-currency-switcher.atomel-cs-size-medium .atomel-cs-flag {
	width: 24px;
}

.atomel-currency-switcher.atomel-cs-size-large {
	font-size: 16px;
}

.atomel-currency-switcher.atomel-cs-size-large .atomel-cs-selected,
.atomel-currency-switcher.atomel-cs-size-large .atomel-cs-option {
	padding: 10px 18px;
}

.atomel-currency-switcher.atomel-cs-size-large .atomel-cs-flag {
	width: 30px;
}

/* Common elements */
.atomel-cs-flag {
	display: inline-block;
	vertical-align: middle;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
	margin-right: 8px;
	flex-shrink: 0;
}

.atomel-cs-name {
	font-weight: 500;
}

.atomel-cs-short-name {
	font-weight: 500;
}

.atomel-cs-symbol {
	color: #666;
	margin-left: 4px;
}

.atomel-cs-code {
	color: #888;
	margin-left: 4px;
	font-size: 0.9em;
}

.atomel-cs-arrow {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	color: #999;
	transition: transform 0.2s ease;
}

/* Dropdown layout */
.atomel-cs-dropdown .atomel-cs-selected {
	display: flex;
	align-items: center;
	cursor: pointer;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	transition: border-color 0.2s, box-shadow 0.2s;
	user-select: none;
}

.atomel-cs-dropdown .atomel-cs-selected:hover {
	border-color: #999;
}

.atomel-cs-dropdown .atomel-cs-selected[aria-expanded="true"] {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.atomel-cs-dropdown .atomel-cs-selected[aria-expanded="true"] .atomel-cs-arrow {
	transform: rotate(180deg);
}

.atomel-cs-dropdown .atomel-cs-options {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1000;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	margin-top: 4px;
	max-height: 300px;
	overflow-y: auto;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	list-style: none;
	padding: 4px 0;
}

.atomel-cs-dropdown .atomel-cs-options.atomel-cs-open {
	display: block;
	animation: atomelCsFadeIn 0.15s ease;
}

.atomel-cs-dropdown .atomel-cs-option {
	display: flex;
	align-items: center;
	cursor: pointer;
	transition: background-color 0.15s;
	padding: 8px 14px;
}

.atomel-cs-dropdown .atomel-cs-option:hover {
	background-color: #f0f6fc;
}

.atomel-cs-dropdown .atomel-cs-option.atomel-cs-active {
	background-color: #e8f0fe;
	font-weight: 600;
}

/* Inline layout */
.atomel-cs-inline-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.atomel-cs-inline-list .atomel-cs-option {
	display: flex;
	align-items: center;
	padding: 6px 14px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.atomel-cs-inline-list .atomel-cs-option:hover {
	border-color: #2271b1;
	background-color: #f0f6fc;
}

.atomel-cs-inline-list .atomel-cs-option.atomel-cs-active {
	border-color: #2271b1;
	background-color: #2271b1;
	color: #fff;
}

.atomel-cs-inline-list .atomel-cs-option.atomel-cs-active .atomel-cs-symbol,
.atomel-cs-inline-list .atomel-cs-option.atomel-cs-active .atomel-cs-code {
	color: rgba(255, 255, 255, 0.8);
}

/* Sidebar layout */
.atomel-cs-sidebar-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.atomel-cs-sidebar-list .atomel-cs-option {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.15s;
}

.atomel-cs-sidebar-list .atomel-cs-option:last-child {
	border-bottom: none;
}

.atomel-cs-sidebar-list .atomel-cs-option:hover {
	background-color: #f8f9fa;
}

.atomel-cs-sidebar-list .atomel-cs-option.atomel-cs-active {
	background-color: #f0f6fc;
	border-left: 3px solid #2271b1;
	font-weight: 600;
}

/* Scrollbar for dropdown */
.atomel-cs-options::-webkit-scrollbar {
	width: 6px;
}

.atomel-cs-options::-webkit-scrollbar-track {
	background: transparent;
}

.atomel-cs-options::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.atomel-cs-options::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Single product wrapper */
.atomel-cs-single-product-wrap {
	margin: 12px 0;
}

/* Approximate price */
.atomel-cs-approx-price {
	display: inline-block;
	font-size: 0.85em;
	color: #666;
}

@keyframes atomelCsFadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
