/* Styles for the custom font picker (WAI-ARIA listbox pattern) used by
 * templates/hmOptionPickerWidget/fontOptions.html. Scoped via the
 * `input-field-select--custom` modifier so it does not affect other
 * `.input-field-select` widgets in the project. */

.input-field-select--custom { position: relative; }

.input-field-select--custom .font-select-button {
	position: relative;
	display: block;
	width: 100%;
	min-height: 40px;
	padding: 8px 32px 8px 12px;
	text-align: left;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 2px;
	cursor: pointer;
	font: inherit;
	color: inherit;
	line-height: 1.4;
	appearance: none;
	-webkit-appearance: none;
}

.input-field-select--custom .font-select-button:focus {
	outline: 2px solid #005fcc;
	outline-offset: 1px;
}

.input-field-select--custom .font-select-button .selected-value {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.input-field-select--custom .font-select-button .font-select-caret {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	font-size: 12px;
	line-height: 1;
}

.input-field-select--custom .font-listbox {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 260px;
	overflow-y: auto;
	margin: 2px 0 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 2px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	z-index: 20;
}

.input-field-select--custom .font-listbox li { margin: 0; padding: 0; }

.input-field-select--custom .font-listbox button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 8px 12px;
	background: none;
	border: 0;
	font: inherit;
	cursor: pointer;
	color: inherit;
}

.input-field-select--custom .font-listbox button:hover,
.input-field-select--custom .font-listbox button:focus {
	background: #f2f2f2;
	outline: none;
}

.input-field-select--custom .font-listbox button[aria-selected="true"] {
	font-weight: 700;
	background: #e9e9e9;
}

/* Hide the leftover external caret span (kept for markup parity). */
.input-field-select--custom > .fa.fa-icon { display: none; }
