/*
 * "Clear" button for the site's search fields (search-clear.js). Loaded on every page because
 * the header search is on every page. Selectors start with `body button` to beat Elementor's
 * `.elementor-search-form button` (grey background) and the theme reset's pink hover.
 */

/* The browser's own "x" (blue in Chrome) is replaced by the Clear button. */
.elementor-search-form input[type="search"]::-webkit-search-cancel-button,
.lc-ss-form input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

body button.lc-search-clear {
	flex: 0 0 auto;
	align-self: center;
	margin: 0;
	padding: 0 10px;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-family: 'Work Sans', Arial, sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #ffffff;
	opacity: 0.85;
	cursor: pointer;
	box-shadow: none;
}

body button.lc-search-clear[hidden] {
	display: none !important;
}

body button.lc-search-clear:hover,
body button.lc-search-clear:focus-visible {
	background: transparent;
	color: #ffffff;
	opacity: 1;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body button.lc-search-clear:focus-visible {
	outline: 1px solid #cfaf58;
	outline-offset: 2px;
}

/* Full-screen search pop-up: larger, under the field's right end. The field sits near the
   top of the pop-up (search-suggest.css: 14vh, phones 12vh). */
body .elementor-search-form--skin-full_screen button.lc-search-clear {
	position: absolute;
	top: calc(14vh + 70px);
	right: 15%;
	padding: 6px 0;
	font-size: 13px;
	letter-spacing: 2px;
}

/* Results page field: white box, so dark text inside the field's gold frame. */
@media (max-width: 767px) {
	body .elementor-search-form--skin-full_screen button.lc-search-clear {
		top: calc(12vh + 46px);
	}
}

body .lc-ss-form button.lc-search-clear {
	align-self: stretch;
	height: auto;
	padding: 0 14px;
	border-top: 1px solid #cfaf58;
	border-bottom: 1px solid #cfaf58;
	background: #ffffff;
	color: #74825f;
	opacity: 1;
}

body .lc-ss-form button.lc-search-clear:hover,
body .lc-ss-form button.lc-search-clear:focus-visible {
	background: #ffffff;
	color: #2f3528;
}
