/* Searchable dropdown for dynamic selects with the "multiple" option. See searchable-select.js. */

.vcndf-ss {
	position: relative;
	width: 100%;
	text-align: left;
}

/* The real select: out of sight, but still in the form */
select.vcndf-ss-native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
}

.vcndf-ss-control {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	box-sizing: border-box;
	min-height: 41px;
	padding: 5px 32px 5px 10px;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: #fff;
	cursor: text;
}

.vcndf-ss-control::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 13px;
	width: 7px;
	height: 7px;
	margin-top: -6px;
	border-right: 1.5px solid #555;
	border-bottom: 1.5px solid #555;
	transform: rotate(45deg);
	pointer-events: none;
}

.vcndf-ss-control:focus-within {
	border-color: #0057a8;
}

select.wpcf7-not-valid ~ .vcndf-ss .vcndf-ss-control {
	border-color: #dc3232;
}

.vcndf-ss-chips {
	display: contents;
}

.vcndf-ss-chips[hidden] {
	display: none;
}

.vcndf-ss-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	padding: 3px 4px 3px 9px;
	border-radius: 6px;
	background: #e9f0f8;
	color: #1f2d3d;
	font-size: 13px;
	line-height: 1.35;
}

.vcndf-ss-remove {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #44566c;
	font-size: 16px;
	line-height: 20px;
	cursor: pointer;
}

.vcndf-ss-remove:hover {
	background: #d3e0ef;
	color: #000;
}

/* !important: the theme's general input rules would otherwise draw a second box in here */
.vcndf-ss input.vcndf-ss-input {
	flex: 1 1 120px;
	width: auto !important;
	min-width: 120px;
	height: 29px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: #1f2d3d;
	font-size: 14px;
}

.vcndf-ss-list {
	position: absolute;
	z-index: 1000;
	top: 100%;
	left: 0;
	right: 0;
	box-sizing: border-box;
	max-height: 260px;
	margin: 4px 0 0;
	padding: 4px;
	overflow-y: auto;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
	list-style: none;
}

.vcndf-ss.opens-up .vcndf-ss-list {
	top: auto;
	bottom: 100%;
	margin: 0 0 4px;
}

.vcndf-ss-list[hidden],
.vcndf-ss-list li[hidden] {
	display: none;
}

.vcndf-ss-list li {
	margin: 0;
	list-style: none;
	font-size: 14px;
	line-height: 1.4;
}

.vcndf-ss-list li::before,
.vcndf-ss-list li::marker {
	content: none;
}

.vcndf-ss-list .vcndf-ss-option {
	position: relative;
	padding: 7px 10px 7px 30px;
	border-radius: 5px;
	color: #1f2d3d;
	cursor: pointer;
}

.vcndf-ss-list .vcndf-ss-option:hover,
.vcndf-ss-list .vcndf-ss-option.is-active {
	background: #e9f0f8;
}

.vcndf-ss-list .vcndf-ss-option.is-selected {
	color: #0057a8;
	font-weight: 600;
}

.vcndf-ss-list .vcndf-ss-option.is-selected::before {
	content: "";
	position: absolute;
	top: 11px;
	left: 12px;
	width: 5px;
	height: 10px;
	border-right: 2px solid #0057a8;
	border-bottom: 2px solid #0057a8;
	transform: rotate(45deg);
}

.vcndf-ss-list .vcndf-ss-group {
	padding: 8px 10px 4px;
	color: #667;
	font-size: 12px;
	font-weight: 600;
}

.vcndf-ss-list .vcndf-ss-empty {
	padding: 8px 10px;
	color: #667;
}

/* 16px stops iPhones zooming the page when the search box gets the focus */
@media (max-width: 767px) {
	.vcndf-ss input.vcndf-ss-input {
		font-size: 16px;
	}
}
