/* -----------------------------------------------------------------------------
   Bond BP search field (shared)
   Glass on the right, Bond clear to its left when typed. Used by group Members,
   Manage → Members, and other Nouveau search-form-has-reset fields that opt in
   via .bond-bp-search-field — one chrome, not per-screen layouts.
   ----------------------------------------------------------------------------- */

.bond-bp-search-field {
	position: relative;
	display: block;
	width: 285px;
	max-width: 100%;
	margin: 0;
	border: 0;
	float: none;
}

/* BuddyBoss paints a left-side glass via form.bp-dir-search-form:before — suppress. */
.bond-bp-search-field.bp-dir-search-form::before,
.bond-bp-search-field::before {
	content: none !important;
	display: none !important;
}

.bond-bp-search-field input[type="search"] {
	float: none !important;
	width: 100% !important;
	min-height: 41.5px;
	padding: 0.375rem 3.75rem 0.375rem 0.9375rem !important;
	border: 1px solid #989482;
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	color: #797667;
	font-size: 17px;
	font-family: "DINNextRoundedLTProRegular", arial, sans-serif !important;
	font-weight: 400;
	line-height: 25.5px;
	letter-spacing: 0;
}

.bond-bp-search-field input[type="search"]::placeholder {
	color: #797667;
	opacity: 1;
}

/* Native clear fights Bond’s .search-form_reset (BON-280). */
.bond-bp-search-field input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: none !important;
}

.bond-bp-search-field input[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.bond-bp-search-field input[type="search"]::-moz-search-clear-button {
	display: none;
}

.bond-bp-search-field input[type="search"]:hover {
	background: #f4f4f2;
	border-color: #37322d;
}

.bond-bp-search-field input[type="search"]:focus,
.bond-bp-search-field input[type="search"]:focus-visible {
	background: #f4f4f2;
	border: 1.5px solid #b6002d;
	outline: none;
}

/*
 * Visible glass. Prefer a decorative span (Manage) or an SVG inside submit
 * (Documents). The span is pointer-events:none; a co-located submit hit-target
 * sits on top when Nouveau needs .search-form_submit clicks.
 */
.bond-bp-search-field__icon {
	position: absolute;
	top: 50%;
	right: 0.75rem !important;
	left: auto !important;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	color: #545246;
	transform: translateY(-50%);
	pointer-events: none;
}

.bond-bp-search-field__icon .bb-icon-search {
	font-size: 18px;
	line-height: 1;
}

/* Invisible Nouveau submit hit-target over the glass (Members directory). */
.bond-bp-search-field__submit {
	position: absolute !important;
	top: 50%;
	right: 0.75rem;
	left: auto !important;
	z-index: 2;
	float: none !important;
	display: block !important;
	width: 18px !important;
	height: 18px !important;
	padding: 0 !important;
	margin: 0;
	border: 0;
	background: transparent !important;
	box-shadow: none;
	color: transparent;
	transform: translateY(-50%);
	cursor: pointer;
	visibility: visible !important;
	opacity: 1 !important;
}

.bond-bp-search-field__submit .bb-icon-search,
.bond-bp-search-field__submit .bp-screen-reader-text {
	/* Icon is the sibling .bond-bp-search-field__icon; keep submit chrome-free. */
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	border: 0 !important;
}

/*
 * BuddyBoss pins .search-form-has-reset .search-form_reset at right:12px —
 * same slot as the glass. Beat that so clear sits left of the icon.
 */
.buddypress .buddypress-wrap .bond-bp-search-field.search-form-has-reset .search-form_reset,
.buddypress .buddypress-wrap .bond-bp-search-field .bond-bp-search-field__clear,
.bond-bp-search-field__clear,
.bond-bp-search-field .search-form_reset {
	position: absolute !important;
	top: 50% !important;
	right: 2.6rem !important;
	left: auto !important;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #545246;
	transform: translateY(-50%);
	cursor: pointer;
	opacity: 1 !important;
}

.bond-bp-search-field:has(input[type="search"]:not(:placeholder-shown)) .bond-bp-search-field__clear:not([hidden]),
.bond-bp-search-field:has(input[type="search"]:not(:placeholder-shown)) .search-form_reset:not([hidden]) {
	display: inline-flex;
}

.bond-bp-search-field:has(input[type="search"]:placeholder-shown) .bond-bp-search-field__clear,
.bond-bp-search-field:has(input[type="search"]:placeholder-shown) .search-form_reset,
.bond-bp-search-field__clear[hidden],
.bond-bp-search-field .search-form_reset[hidden] {
	display: none;
}

.bond-bp-search-field__clear .bb-icon-rf::before,
.bond-bp-search-field .search-form_reset .bb-icon-rf::before {
	content: "\00d7";
	font-family: inherit;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
}

@media (max-width: 782px) {
	.bond-bp-search-field {
		width: 100%;
	}
}
