/**
 * WPML Language Selector Widget Styles
 */

/* Widget Container */
.wpml-language-selector-widget {
	position: relative;
	display: inline-block;
	font-family: 'Outfit', sans-serif;
	width: auto;
}

/* Remove underlines from all links */
.wpml-language-selector-widget a,
.wpml-language-selector-widget a:hover,
.wpml-language-selector-widget a:focus,
.wpml-language-selector-widget a:active,
.wpml-language-selector-widget a:visited {
	text-decoration: none !important;
}

/* Dropdown Style */
.wpml-language-selector.wpml-dropdown {
	position: relative;
	width: auto;
	min-width: 65px;
	display: inline-block;
}

/* Expanded width when dropdown is active */
.wpml-language-selector.wpml-dropdown.active .wpml-dropdown-menu {
	min-width: 200px;
}

/* Current Language Display */
.wpml-selector-current {
	padding: 10px 15px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 15px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	white-space: nowrap;
	display: block;
	box-sizing: border-box;
}

.wpml-selector-current:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.wpml-current-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	color: #ffffff;
	white-space: nowrap;
}

/* Dropdown Menu */
.wpml-dropdown-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 200px;
	width: max-content;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 15px;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	z-index: 1000;
	max-height: 300px;
	overflow-y: auto;
}

/* Show dropdown on hover or click */
.wpml-dropdown:hover .wpml-dropdown-menu,
.wpml-dropdown.active .wpml-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Dropdown Items */
.wpml-dropdown-item {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	color: #ffffff;
	text-decoration: none;
	transition: all 0.2s ease;
}

.wpml-dropdown-item:hover {
	background: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

/* Language Name */
.wpml-lang-name {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

/* Language Code */
.wpml-lang-code {
	opacity: 0.7;
	font-size: 0.85em;
	margin-left: 4px;
}

/* Flags */
.wpml-flag {
	width: 20px;
	height: auto;
	margin-right: 8px;
	border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Pure CSS Dropdown Arrow - No SVG */
.wpml-dropdown-arrow-css {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 8px;
	vertical-align: middle;
	border-style: solid;
	border-width: 5px 4px 0 4px;
	border-color: #ffffff transparent transparent transparent;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.wpml-dropdown:hover .wpml-dropdown-arrow,
.wpml-dropdown.active .wpml-dropdown-arrow,
.wpml-dropdown:hover .wpml-dropdown-arrow-css,
.wpml-dropdown.active .wpml-dropdown-arrow-css {
	transform: rotate(180deg);
}

/* Inline Style */
.wpml-language-selector.wpml-inline {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.wpml-inline-item {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	color: #ffffff;
	text-decoration: none;
	transition: all 0.3s ease;
}

.wpml-inline-item:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
	text-decoration: none;
}

.wpml-inline-item.current-lang {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.4);
	pointer-events: none;
}

/* Scrollbar Styling for Dropdown */
.wpml-dropdown-menu::-webkit-scrollbar {
	width: 4px;
}

.wpml-dropdown-menu::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 10px;
}

.wpml-dropdown-menu::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 10px;
}

.wpml-dropdown-menu::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Editor Notice */
.wpml-not-active-notice {
	padding: 20px;
	background: rgba(255, 200, 0, 0.1);
	border: 1px solid rgba(255, 200, 0, 0.3);
	border-radius: 8px;
	color: #ff9900;
	text-align: center;
	font-family: 'Outfit', sans-serif;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
	.wpml-language-selector.wpml-dropdown {
		width: auto;
		min-width: 100px;
	}

	.wpml-selector-current {
		padding: 10px 14px;
		font-size: 14px;
	}

	.wpml-dropdown-item {
		padding: 8px 14px;
		font-size: 14px;
	}

	.wpml-flag {
		width: 18px;
	}
}

/* Responsive - Mobile */
@media (max-width: 480px) {
	.wpml-language-selector.wpml-dropdown {
		width: auto;
		min-width: 80px;
	}

	.wpml-selector-current {
		padding: 8px 12px;
		font-size: 13px;
	}

	.wpml-dropdown-item {
		padding: 8px 12px;
		font-size: 13px;
	}

	.wpml-flag {
		width: 16px;
	}

	.wpml-dropdown-arrow {
		width: 10px;
		height: 6px;
	}

	/* Force CSS arrow visibility on mobile */
	.wpml-dropdown-arrow-css {
		border-top-color: #ffffff !important;
		opacity: 1 !important;
	}

	.wpml-inline-item {
		padding: 6px 12px;
		font-size: 13px;
	}
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.wpml-selector-current,
	.wpml-dropdown-menu,
	.wpml-inline-item {
		background: rgba(0, 0, 0, 0.3);
		border-color: rgba(255, 255, 255, 0.15);
	}

	.wpml-selector-current:hover,
	.wpml-inline-item:hover {
		background: rgba(0, 0, 0, 0.4);
		border-color: rgba(255, 255, 255, 0.25);
	}

	.wpml-dropdown-item:hover {
		background: rgba(255, 255, 255, 0.08);
	}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.wpml-selector-current,
	.wpml-dropdown-menu,
	.wpml-dropdown-item,
	.wpml-inline-item,
	.wpml-dropdown-arrow {
		transition: none;
	}
}

/* Focus States for Accessibility */
.wpml-selector-current:focus-visible,
.wpml-dropdown-item:focus-visible,
.wpml-inline-item:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

/* Safari/Webkit specific fixes */
@supports (-webkit-appearance: none) {
	.wpml-dropdown-arrow-css {
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
	}
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
	/* Increase touch target on mobile */
	.wpml-selector-current {
		min-height: 44px;
		display: flex;
		align-items: center;
	}
}