/* Nedclan Converter — frontend styles */

.nedclan-switcher {
	position: relative;
	display: inline-block;
	font-family: var(--nedclan-font-family, inherit);
	font-size: var(--nedclan-font-size-desktop, 14px);
}

.nedclan-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 1px solid rgba(0,0,0,0.15);
	border-radius: 6px;
	cursor: pointer;
	padding: var(--nedclan-padding-desktop, 6px 12px);
	margin: var(--nedclan-margin-desktop, 0);
	color: inherit;
	font: inherit;
	font-weight: var(--nedclan-font-weight, 400);
	transition: background-color 0.15s ease, color 0.15s ease;
}
.nedclan-trigger:hover,
.nedclan-trigger:focus-visible {
	background: var(--nedclan-trigger-hover-bg, transparent);
	color: var(--nedclan-trigger-hover-text, inherit);
}

.nedclan-flag {
	width: 24px;
	height: 18px;
	display: inline-block;
	border-radius: var(--nedclan-flag-radius, 3px);
	background-size: cover;
	background-position: center;
	overflow: hidden;
	flex: 0 0 auto;
}
.nedclan-flag.fi {
	border-radius: var(--nedclan-flag-radius, 3px);
	background-size: cover;
	width: 24px;
	height: 18px;
}
.nedclan-flag.fi::before {
	content: none; /* disable flag-icons' own aspect-ratio spacer; we size the box ourselves */
}
.nedclan-flag-img {
	width: 24px;
	height: 18px;
	object-fit: cover;
	border-radius: var(--nedclan-flag-radius, 3px);
}

.nedclan-chevron {
	transition: transform 0.15s ease;
	opacity: 0.7;
}
.nedclan-switcher.is-open .nedclan-chevron {
	transform: rotate(180deg);
}

.nedclan-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 260px;
	max-height: 340px;
	background: var(--nedclan-dropdown-bg, #fff);
	color: var(--nedclan-dropdown-text, #222);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
	z-index: 9999;
	padding: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.nedclan-dropdown[hidden] { display: none; }

.nedclan-search-wrap {
	position: relative;
	margin-bottom: 8px;
	flex: 0 0 auto;
}
.nedclan-search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px 8px 36px;
	border-radius: 6px;
	border: 1px solid rgba(0,0,0,0.15);
	background: var(--nedclan-search-bg, #fff);
	font-size: inherit;
}
.nedclan-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--nedclan-search-icon-color, #666);
	pointer-events: none;
}

.nedclan-options {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	font-size: var(--nedclan-dropdown-font-size, 14px);
}
.nedclan-option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	padding: 8px 10px;
	border-radius: 6px;
	cursor: pointer;
	font: inherit;
	color: inherit;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.nedclan-option:hover,
.nedclan-option.is-active {
	background: var(--nedclan-dropdown-hover-bg, #f5f0ea);
	color: var(--nedclan-dropdown-hover-text, #222);
}
.nedclan-option[hidden] { display: none; }

/* Floating widget */
.nedclan-floating {
	position: fixed;
	top: 50%;
	right: var(--nedclan-float-margin-right, 5px);
	transform: translateY(-50%);
	z-index: 99999;
	margin: var(--nedclan-float-margin, 0);
}

.nedclan-floating-trigger {
	width: var(--nedclan-float-icon-size, 40px);
	height: var(--nedclan-float-icon-size, 40px);
	background: var(--nedclan-float-bg-color, #1c1c1c);
	color: var(--nedclan-float-text-color, #fff);
	border: none;
	border-radius: var(--nedclan-float-radius, 8px);
	padding: var(--nedclan-float-padding, 10px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
	transition: background-color 0.15s ease;
}
.nedclan-floating-trigger:hover,
.nedclan-floating-trigger:focus-visible {
	background: var(--nedclan-float-hover-bg, #333333);
}
.nedclan-floating-symbol {
	font-size: 11px;
	font-weight: 600;
}

.nedclan-floating-dropdown {
	right: 0;
	left: auto;
	top: auto;
	bottom: calc(100% + 8px);
	min-width: 180px;
}

.nedclan-option.is-active {
	box-shadow: inset 3px 0 0 var(--nedclan-float-checked-color, #2c7a4b);
}

/* Responsive */
@media (max-width: 1024px) {
	.nedclan-trigger {
		font-size: var(--nedclan-font-size-tablet, 14px);
		padding: var(--nedclan-padding-tablet, 6px 10px);
		margin: var(--nedclan-margin-tablet, 0);
	}
}
@media (max-width: 600px) {
	.nedclan-trigger {
		font-size: var(--nedclan-font-size-mobile, 13px);
		padding: var(--nedclan-padding-mobile, 5px 8px);
		margin: var(--nedclan-margin-mobile, 0);
	}
	.nedclan-dropdown { min-width: 220px; }
}
