/**
 * Well Web Multilang Switcher Styles
 */

/* Base Switcher Styles */
.wwml-switcher {
	position: relative;
	display: inline-block;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
}

.wwml-flag {
	display: inline-block;
	vertical-align: middle;
	width: 20px;
	height: 15px;
	margin-right: 6px;
	border-radius: 2px;
	object-fit: cover;
}

.wwml-lang-name,
.wwml-lang-code {
	vertical-align: middle;
}

/* Dropdown Style */
.wwml-switcher-dropdown {
	min-width: 140px;
}

.wwml-dropdown-toggle {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: inherit;
	text-align: left;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wwml-dropdown-toggle:hover {
	border-color: #999;
}

.wwml-dropdown-toggle:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.wwml-dropdown-arrow {
	margin-left: auto;
	border: 5px solid transparent;
	border-top-color: #666;
	transition: transform 0.2s;
}

.wwml-switcher-dropdown.wwml-open .wwml-dropdown-arrow {
	transform: rotate(180deg);
}

.wwml-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1000;
	margin: 4px 0 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.wwml-switcher-dropdown.wwml-open .wwml-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.wwml-dropdown-item {
	margin: 0;
}

.wwml-dropdown-link {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	color: #333;
	text-decoration: none;
	transition: background-color 0.2s;
}

.wwml-dropdown-link:hover {
	background-color: #f5f5f5;
	color: #333;
	text-decoration: none;
}

.wwml-dropdown-item.wwml-current .wwml-dropdown-link {
	background-color: #f0f7ff;
	font-weight: 600;
}

/* Flags Style */
.wwml-switcher-flags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.wwml-flag-item {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	text-decoration: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wwml-flag-item:hover {
	border-color: #999;
	text-decoration: none;
	color: #333;
}

.wwml-flag-item.wwml-current {
	border-color: #0073aa;
	background-color: #f0f7ff;
}

.wwml-flag-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 15px;
	margin-right: 6px;
	background: #eee;
	border-radius: 2px;
	font-size: 10px;
	font-weight: 600;
}

.wwml-flag-label {
	font-size: 13px;
}

/* Text Links Style */
.wwml-switcher-text {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
}

.wwml-text-item {
	color: #333;
	text-decoration: none;
	padding: 4px 8px;
	transition: color 0.2s;
}

.wwml-text-item:hover {
	color: #0073aa;
	text-decoration: underline;
}

.wwml-text-item.wwml-current {
	font-weight: 600;
	color: #0073aa;
}

.wwml-separator {
	color: #999;
}

/* Inline Buttons Style */
.wwml-switcher-text .wwml-text-item {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin: 2px;
}

.wwml-switcher-text .wwml-text-item:hover {
	border-color: #999;
	text-decoration: none;
}

.wwml-switcher-text .wwml-text-item.wwml-current {
	background: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

/* Floating Style */
.wwml-switcher-floating {
	position: fixed;
	z-index: 9999;
}

.wwml-position-top-left {
	top: 20px;
	left: 20px;
}

.wwml-position-top-right {
	top: 20px;
	right: 20px;
}

.wwml-position-bottom-left {
	bottom: 20px;
	left: 20px;
}

.wwml-position-bottom-right {
	bottom: 20px;
	right: 20px;
}

.wwml-floating-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: #fff;
	border: none;
	border-radius: 50%;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}

.wwml-floating-toggle:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.wwml-floating-toggle:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3), 0 2px 12px rgba(0, 0, 0, 0.15);
}

.wwml-floating-toggle .wwml-flag {
	margin-right: 0;
	width: 24px;
	height: 18px;
}

.wwml-globe-icon {
	color: #333;
}

.wwml-floating-menu {
	position: absolute;
	bottom: 100%;
	right: 0;
	margin-bottom: 8px;
	min-width: 180px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.wwml-position-top-left .wwml-floating-menu,
.wwml-position-top-right .wwml-floating-menu {
	bottom: auto;
	top: 100%;
	margin-bottom: 0;
	margin-top: 8px;
	transform: translateY(-10px);
}

.wwml-position-top-left .wwml-floating-menu,
.wwml-position-bottom-left .wwml-floating-menu {
	right: auto;
	left: 0;
}

.wwml-switcher-floating.wwml-open .wwml-floating-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.wwml-floating-item {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	color: #333;
	text-decoration: none;
	border-bottom: 1px solid #eee;
	transition: background-color 0.2s;
}

.wwml-floating-item:first-child {
	border-radius: 8px 8px 0 0;
}

.wwml-floating-item:last-child {
	border-bottom: none;
	border-radius: 0 0 8px 8px;
}

.wwml-floating-item:only-child {
	border-radius: 8px;
}

.wwml-floating-item:hover {
	background-color: #f5f5f5;
	text-decoration: none;
	color: #333;
}

.wwml-floating-item.wwml-current {
	background-color: #f0f7ff;
}

.wwml-floating-label {
	flex: 1;
}

.wwml-check-icon {
	color: #0073aa;
	margin-left: 8px;
}

/* Mobile Only */
.wwml-mobile-only {
	display: none;
}

@media (max-width: 768px) {
	.wwml-mobile-only {
		display: block;
	}
}

/* RTL Support */
[dir="rtl"] .wwml-flag {
	margin-right: 0;
	margin-left: 6px;
}

[dir="rtl"] .wwml-dropdown-arrow {
	margin-left: 0;
	margin-right: auto;
}

[dir="rtl"] .wwml-floating-menu {
	right: auto;
	left: 0;
}

[dir="rtl"] .wwml-position-top-left .wwml-floating-menu,
[dir="rtl"] .wwml-position-bottom-left .wwml-floating-menu {
	left: auto;
	right: 0;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.wwml-dropdown-menu,
	.wwml-floating-menu,
	.wwml-dropdown-arrow,
	.wwml-floating-toggle,
	.wwml-dropdown-toggle,
	.wwml-dropdown-link,
	.wwml-flag-item,
	.wwml-text-item,
	.wwml-floating-item {
		transition: none;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.wwml-dropdown-toggle,
	.wwml-dropdown-menu,
	.wwml-flag-item,
	.wwml-floating-toggle,
	.wwml-floating-menu {
		background: #2d2d2d;
		border-color: #444;
		color: #eee;
	}

	.wwml-dropdown-link,
	.wwml-floating-item {
		color: #eee;
	}

	.wwml-dropdown-link:hover,
	.wwml-floating-item:hover {
		background-color: #3d3d3d;
		color: #fff;
	}

	.wwml-dropdown-item.wwml-current .wwml-dropdown-link,
	.wwml-floating-item.wwml-current {
		background-color: #1e3a5f;
	}

	.wwml-flag-item.wwml-current {
		background-color: #1e3a5f;
		border-color: #0073aa;
	}

	.wwml-text-item {
		color: #eee;
	}

	.wwml-text-item.wwml-current {
		color: #5cb3ff;
	}

	.wwml-separator {
		color: #666;
	}

	.wwml-globe-icon {
		color: #eee;
	}
}
