/**
 * DPT Multilingual Frontend Switcher Styles
 */

/* Dropdown Switcher */
.dpt-switcher-dropdown {
	position: relative;
	display: inline-block;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.4;
	text-align: left;
}

.dpt-dropdown-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	margin: 0;
	min-height: 0;
	line-height: 1.4;
	text-transform: none;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 20px;
	cursor: pointer;
	user-select: none;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	color: #1e293b;
}

.dpt-dropdown-toggle:hover,
.dpt-switcher-dropdown.dpt-is-open .dpt-dropdown-toggle {
	background: #f8fafc;
	border-color: rgba(0, 0, 0, 0.2);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dpt-selected-lang {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
}

.dpt-arrow-icon {
	display: inline-flex;
	align-items: center;
	transition: transform 0.25s ease;
	opacity: 0.6;
}

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

.dpt-dropdown-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 140px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	padding: 5px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
	z-index: 9999;
	display: none;
	flex-direction: column;
	gap: 2px;
	transform-origin: top right;
	animation: dptDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dpt-switcher-dropdown.dpt-is-open .dpt-dropdown-menu {
	display: flex;
}

@keyframes dptDropdownFadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.dpt-dropdown-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	text-decoration: none !important;
	color: #334155 !important;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.15s ease;
}

.dpt-dropdown-item:hover {
	background: #f1f5f9;
	color: #0284c7 !important;
}

.dpt-dropdown-item.active {
	background: #f0f9ff;
	color: #0369a1 !important;
	font-weight: 600;
}

.dpt-dropdown-item .dpt-check-icon {
	margin-left: auto;
	font-size: 12px;
	color: #0284c7;
	font-weight: 700;
}

/* Horizontal Flags Style */
.dpt-switcher-flags ul.dpt-flags-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.dpt-flag-item {
	display: inline-block;
}

.dpt-flag-link {
	display: inline-flex;
	align-items: center;
	padding: 2px;
	border-radius: 4px;
	border: 2px solid transparent;
	transition: all 0.2s ease;
	line-height: 1;
}

.dpt-flag-link:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.dpt-flag-item.active .dpt-flag-link {
	border-color: #0284c7;
	box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.2);
}

/* Horizontal Both Style */
.dpt-switcher-both .dpt-both-list {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.dpt-both-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 16px;
	background: rgba(0, 0, 0, 0.04);
	color: #475569 !important;
	text-decoration: none !important;
	font-size: 12px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.dpt-both-link:hover {
	background: rgba(0, 0, 0, 0.08);
	color: #0f172a !important;
}

.dpt-both-link.active {
	background: #0284c7;
	color: #ffffff !important;
	font-weight: 600;
}

/* Floating Switcher */
.dpt-floating-switcher {
	position: fixed;
	z-index: 99999;
}

.dpt-floating-switcher.dpt-pos-bottom-right {
	bottom: 25px;
	right: 25px;
}

.dpt-floating-switcher.dpt-pos-bottom-left {
	bottom: 25px;
	left: 25px;
}

.dpt-floating-switcher.dpt-pos-top-right {
	top: 80px;
	right: 25px;
}

.dpt-floating-switcher .dpt-dropdown-toggle {
	padding: 7px 12px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.dpt-floating-switcher .dpt-dropdown-toggle:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.dpt-floating-switcher.dpt-pos-bottom-right .dpt-dropdown-menu,
.dpt-floating-switcher.dpt-pos-bottom-left .dpt-dropdown-menu {
	top: auto;
	bottom: calc(100% + 8px);
	transform-origin: bottom right;
}

/* Menu Item Integration */
li.menu-item-dpt-switcher {
	display: inline-flex !important;
	align-items: center !important;
}

li.menu-item-dpt-switcher .dpt-dropdown-toggle {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0 8px;
}

li.menu-item-dpt-switcher .dpt-dropdown-toggle:hover {
	background: rgba(0, 0, 0, 0.04);
}
