/*
 * Search field of the public directory, drawn like LocateAndFilter's filter card on this
 * site (leaflet-filters.css). The input selectors carry an element and three classes to
 * outweigh the theme's input:not([type="submit"]):not([type="checkbox"]) rule.
 */

.icmah-search[hidden] {
	display: none !important;
}

/* In the filter card: a whole row of its own, above Pays and Continent. */
.LA_filters .category-filters-container li.icmah-search--in-filters {
	flex: 1 1 100%;
	min-width: 0;
}

/* Fallback above the map, when the map template has no filter card. */
.icmah-search--card {
	background: #f8fafc;
	border: 1px solid #e6ebf2;
	border-radius: 12px;
	padding: 14px 16px;
	margin: 0 0 16px;
	box-sizing: border-box;
}

.icmah-search .icmah-search-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #5b6578;
	margin: 0 0 6px;
}

.icmah-search-field {
	position: relative;
	display: flex;
	align-items: center;
}

.icmah-search .icmah-search-field .icmah-search-icon {
	position: absolute;
	z-index: 1;
	left: 12px;
	color: #5b6578;
	pointer-events: none;
}

.icmah-search .icmah-search-field input.icmah-search-input {
	width: 100%;
	min-height: 44px;
	box-sizing: border-box;
	padding: 9px 46px 9px 42px;
	border: 1px solid #d5dce7;
	border-radius: 10px;
	background: #fff;
	color: #1f2a44;
	/* 16px keeps iOS from zooming into the field. */
	font: inherit;
	font-size: 16px;
	line-height: 1.3;
	-webkit-appearance: none;
	appearance: none;
}

.icmah-search .icmah-search-field input.icmah-search-input::placeholder {
	color: #6b7588;
	opacity: 1;
}

.icmah-search .icmah-search-field input.icmah-search-input::-webkit-search-cancel-button,
.icmah-search .icmah-search-field input.icmah-search-input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.icmah-search .icmah-search-field input.icmah-search-input:focus {
	/* Transparent rather than none: Windows high-contrast mode draws it. */
	outline: 2px solid transparent;
	border-color: #2d5be3;
	box-shadow: 0 0 0 3px rgba(45, 91, 227, 0.25);
}

.icmah-search .icmah-search-field button.icmah-search-clear {
	position: absolute;
	right: 2px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #5b6578;
	cursor: pointer;
}

.icmah-search .icmah-search-field button.icmah-search-clear[hidden] {
	display: none;
}

.icmah-search .icmah-search-field button.icmah-search-clear:hover {
	background: #eef2f8;
	color: #1f2a44;
}

.icmah-search .icmah-search-field button.icmah-search-clear:focus-visible {
	outline: 2px solid #2d5be3;
	outline-offset: 1px;
}

.icmah-search-status {
	margin: 8px 0 0;
	font-size: 14px;
	color: #1f2a44;
}

/* Kept in the accessibility tree when empty, so the first count is announced. */
.icmah-search-status:empty {
	margin: 0;
}
