/* KimPlast Bilingual - Frontend Styles */

/* Language Switcher Base */
.kpbi-language-switcher {
	display: inline-block;
	position: relative;
}

/* Dropdown Style */
.kpbi-style-dropdown select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
	cursor: pointer;
	min-width: 150px;
}

.kpbi-style-dropdown select:hover {
	border-color: #999;
}

.kpbi-style-dropdown select:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

/* Flags Style */
.kpbi-style-flags .kpbi-language-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 10px;
}

.kpbi-style-flags .kpbi-language-item {
	display: inline-block;
}

.kpbi-style-flags .kpbi-language-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	padding: 5px 10px;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.kpbi-style-flags .kpbi-flag {
	font-size: 24px;
	line-height: 1;
}

.kpbi-style-flags .kpbi-language-link:hover {
	background: rgba(0, 0, 0, 0.05);
	transform: scale(1.1);
}

.kpbi-style-flags .kpbi-active .kpbi-language-link {
	background: rgba(34, 113, 177, 0.1);
	border: 2px solid #2271b1;
}

/* Menu Style */
.kpbi-style-menu .kpbi-language-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 5px;
}

.kpbi-style-menu .kpbi-language-item {
	display: inline-block;
}

.kpbi-style-menu .kpbi-language-link {
	display: flex;
	align-items: center;
	gap: 5px;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 4px;
	transition: all 0.3s ease;
	color: inherit;
}

.kpbi-style-menu .kpbi-flag {
	font-size: 18px;
	line-height: 1;
}

.kpbi-style-menu .kpbi-name {
	font-size: 14px;
}

.kpbi-style-menu .kpbi-language-link:hover {
	background: rgba(0, 0, 0, 0.05);
}

.kpbi-style-menu .kpbi-active .kpbi-language-link {
	background: rgba(34, 113, 177, 0.1);
	font-weight: 600;
}

/* Menu Integration */
.menu-item.kpbi-language-switcher-menu {
	position: relative;
}

.menu-item.kpbi-language-switcher-menu .kpbi-language-switcher {
	display: block;
}

/* Widget */
.widget_kpbi_language_widget .kpbi-language-switcher {
	display: block;
	width: 100%;
}

.widget_kpbi_language_widget select {
	width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
	.kpbi-style-menu .kpbi-name {
		display: none;
	}
	
	.kpbi-style-menu .kpbi-language-link {
		padding: 8px;
	}
	
	.kpbi-style-dropdown select {
		min-width: 120px;
		font-size: 13px;
	}
}

/* Divi Theme Compatibility */
.et_pb_section .kpbi-language-switcher,
.et_pb_row .kpbi-language-switcher,
.et_pb_column .kpbi-language-switcher {
	margin: 10px 0;
}

.et_pb_text .kpbi-language-switcher {
	display: block;
	margin: 15px 0;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.kpbi-style-dropdown select {
		background: #1e1e1e;
		color: #fff;
		border-color: #444;
	}
	
	.kpbi-style-menu .kpbi-language-link,
	.kpbi-style-flags .kpbi-language-link {
		color: #fff;
	}
	
	.kpbi-style-menu .kpbi-language-link:hover,
	.kpbi-style-flags .kpbi-language-link:hover {
		background: rgba(255, 255, 255, 0.1);
	}
}

/* Accessibility */
.kpbi-language-link:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

select#kpbi-language-select:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Animation */
.kpbi-language-switcher {
	animation: kpbi-fade-in 0.3s ease;
}

@keyframes kpbi-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
