/* ---- Combined Switcher — Izola Bank Header Style ---- */

.cp-combined-switcher-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: inherit;
}

/* ---- FLAG BUTTON (country dropdown trigger) ---- */
.cp-custom-dropdown {
	position: relative;
	display: inline-block;
	cursor: pointer;
	user-select: none;
}

.cp-dropdown-selected {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0 8px;
	height: 32px;
	box-sizing: border-box;
	background: transparent;
	border: none;
	border-radius: 4px;
	white-space: nowrap;
	position: relative;
	z-index: 99999;
}

/* Flag image */
.cp-dropdown-selected img {
	display: block;
	width: 22px;
	height: 15px;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
	flex-shrink: 0;
}

/* Chevron arrow on flag button — replace text char with SVG */
.cp-dropdown-selected .cp-arrow {
	display: flex;
	align-items: center;
	font-size: 0;
	line-height: 1;
	flex-shrink: 0;
}

.cp-dropdown-selected .cp-arrow::after {
	content: '';
	display: block;
	width: 10px;
	height: 6px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23005691' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 10px 6px;
	transition: transform .2s ease;
}

/* Rotate arrow when open */
.cp-dropdown-list.show~.cp-dropdown-selected .cp-arrow::after,
.cp-custom-dropdown.open .cp-dropdown-selected .cp-arrow::after,
.cp-custom-dropdown:hover .cp-dropdown-selected .cp-arrow::after {
	transform: rotate(180deg);
}

/* ---- FLAG DROPDOWN PANEL ---- */
.cp-dropdown-list {
	position: absolute;
	top: 0;
	left: 0;
	min-width: 100%;
	background: #ffffff;
	border: none;
	border-radius: 4px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
	z-index: 99998;
	display: none;
	overflow: hidden;
	padding-top: 32px;
}

.cp-dropdown-list.show,
.cp-custom-dropdown:hover .cp-dropdown-list {
	display: block;
	animation: cp-slide-in .16s ease forwards;
}

@keyframes cp-slide-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.cp-dropdown-item {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background .15s;
}

.cp-dropdown-item:last-child {
	border-bottom: none;
}

.cp-dropdown-item:hover {
	background: #f5f7fa;
}

.cp-dropdown-item img {
	display: block;
	width: 22px;
	height: 15px;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

/* ---- LANGUAGE DROPDOWN (Hover based) ---- */
.cp-lang-dropdown {
	position: relative;
	display: inline-block;
	cursor: pointer;
	user-select: none;
	font-family: inherit;
}

.cp-lang-selected {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 10px;
	height: 32px;
	box-sizing: border-box;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #005691;
	background: transparent;
	border: none;
	border-radius: 4px;
	white-space: nowrap;
	position: relative;
	z-index: 99999;
}

.cp-lang-selected .cp-arrow {
	display: flex;
	align-items: center;
	font-size: 0;
	line-height: 1;
	flex-shrink: 0;
}

.cp-lang-selected .cp-arrow::after {
	content: '';
	display: block;
	width: 10px;
	height: 6px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23005691' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 10px 6px;
	transition: transform .2s ease;
}

.cp-lang-dropdown:hover .cp-lang-selected .cp-arrow::after {
	transform: rotate(180deg);
}

.cp-lang-list {
	position: absolute;
	top: 0;
	left: 0;
	min-width: 100%;
	background: #ffffff;
	border: none;
	border-radius: 4px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
	z-index: 99998;
	display: none;
	overflow: hidden;
	padding-top: 32px;
}

.cp-lang-dropdown:hover .cp-lang-list {
	display: block;
	animation: cp-slide-in .16s ease forwards;
}

.cp-lang-item {
	display: block;
	padding: 10px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background .15s, color .15s;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #005691;
	text-align: center;
	white-space: nowrap;
}

.cp-lang-item:last-child {
	border-bottom: none;
}

.cp-lang-item:hover {
	background: #f5f7fa;
	color: #003d68;
}

/* ---- Mobile View (below 1200px) ---- */
.cp-mobile-label {
	display: none;
}

@media (max-width: 1199px) {
	.cp-combined-switcher-wrap {
		display: grid !important;
		grid-template-columns: auto 1fr;
		grid-template-rows: auto auto;
		column-gap: 30px;
		row-gap: 8px;
		align-items: center;
		width: 100%;
		padding: 10px 15px; /* Adjust padding as needed for mobile menu */
	}

	.cp-mobile-label {
		display: block !important;
		color: var(--mobile-label-color, #ffffff) !important;
		font-family: var(--mobile-label-font-family, inherit) !important;
		font-size: var(--mobile-label-font-size, 14px) !important;
		font-weight: normal;
	}

	.cp-country-label {
		grid-column: 1;
		grid-row: 1;
	}

	.cp-lang-label {
		grid-column: 2;
		grid-row: 1;
	}

	.cp-custom-dropdown {
		grid-column: 1;
		grid-row: 2;
		display: flex !important;
		align-items: center;
		gap: 8px;
	}

	.cp-lang-dropdown {
		grid-column: 2;
		grid-row: 2;
		display: flex !important;
		align-items: center;
		gap: 15px;
		flex-wrap: wrap;
	}

	/* Unwrap the absolute lists so they flow inside the flex containers */
	.cp-dropdown-list,
	.cp-lang-list {
		position: static !important;
		display: contents !important;
	}

	.cp-arrow {
		display: none !important;
	}

	/* Reset selected and items styling */
	.cp-dropdown-selected,
	.cp-dropdown-item {
		padding: 0 !important;
		height: auto !important;
		border: none !important;
		background: transparent !important;
	}

	.cp-dropdown-selected img,
	.cp-dropdown-item img {
		width: var(--mobile-flag-size, 22px) !important;
		height: auto !important;
		aspect-ratio: 22 / 15;
	}

	.cp-dropdown-selected img {
		opacity: var(--mobile-active-country-opacity, 1) !important;
		box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) !important;
	}

	.cp-dropdown-item img {
		opacity: var(--mobile-inactive-country-opacity, 0.5) !important;
		transition: opacity 0.2s;
		box-shadow: none !important;
	}

	.cp-lang-selected,
	.cp-lang-item {
		padding: 0 !important;
		height: auto !important;
		border: none !important;
		background: transparent !important;
		text-transform: none !important;
		letter-spacing: 0 !important;
		font-family: var(--mobile-lang-font-family, inherit) !important;
		font-size: var(--mobile-lang-font-size, 14px) !important;
		font-weight: var(--mobile-lang-font-weight, 400) !important;
	}

	.cp-lang-selected {
		color: var(--mobile-active-lang-color, #ffffff) !important;
	}

	.cp-lang-item {
		color: var(--mobile-inactive-lang-color, rgba(255, 255, 255, 0.5)) !important;
	}
}