/**
 * CloudLingo Language Switcher Frontend Styles.
 */

.cloudlingo-switcher {
	display: inline-block;
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
	z-index: 999;
}

/* Dropdown Style */
.cloudlingo-dropdown {
	position: relative;
}

.cloudlingo-dropdown .cloudlingo-current-lang {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ffffff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 6px 12px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: border-color 0.2s, box-shadow 0.2s;
	user-select: none;
}

.cloudlingo-dropdown .cloudlingo-current-lang:hover,
.cloudlingo-dropdown .cloudlingo-current-lang:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.cloudlingo-dropdown .cloudlingo-arrow {
	font-size: 10px;
	color: #646970;
	margin-left: 4px;
	transition: transform 0.2s ease;
}

.cloudlingo-dropdown .cloudlingo-options {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 140px;
	background: #ffffff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
	margin-top: 4px;
	padding: 4px 0;
	list-style: none;
	z-index: 1000;
}

.cloudlingo-dropdown:hover .cloudlingo-options,
.cloudlingo-dropdown:focus-within .cloudlingo-options {
	display: block;
}

.cloudlingo-dropdown:hover .cloudlingo-arrow {
	transform: rotate(180deg);
}

.cloudlingo-dropdown .cloudlingo-options li {
	margin: 0;
	padding: 0;
}

.cloudlingo-dropdown .cloudlingo-options a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	color: #1d2327;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.cloudlingo-dropdown .cloudlingo-options a:hover {
	background: #f0f6fc;
	color: #2271b1;
}

.cloudlingo-dropdown .cloudlingo-options li.is-active a {
	font-weight: 600;
	background: #f0f6fc;
	color: #135e96;
}

/* Flags Style */
.cloudlingo-flags {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cloudlingo-flag-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	padding: 4px;
	border-radius: 4px;
	text-decoration: none;
	transition: transform 0.15s ease, background 0.15s ease;
}

.cloudlingo-flag-item:hover {
	transform: scale(1.15);
}

.cloudlingo-flag-item.is-active {
	background: #e7f5ff;
	box-shadow: 0 0 0 1px #1971c2;
}

/* Native Select Style */
.cloudlingo-select-wrap select.cloudlingo-select {
	padding: 6px 10px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #ffffff;
	font-size: 14px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	outline: none;
}

.cloudlingo-select-wrap select.cloudlingo-select:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

/* Pills Style */
.cloudlingo-pills {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cloudlingo-pill-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #f0f0f1;
	color: #50575e;
	text-decoration: none;
	padding: 4px 10px;
	border-radius: 14px;
	font-size: 12px;
	font-weight: 500;
	transition: background 0.2s, color 0.2s;
}

.cloudlingo-pill-item:hover {
	background: #e0e0e0;
	color: #1d2327;
}

.cloudlingo-pill-item.is-active {
	background: #2271b1;
	color: #ffffff;
}

/* Common elements */
.cloudlingo-flag {
	font-size: 16px;
	line-height: 1;
}

.cloudlingo-name {
	font-size: 13px;
}

.cloudlingo-code {
	font-size: 11px;
	opacity: 0.8;
}
