/**
 * ============================================================================
 *  MILTONCAT MANAGED FILE - DO NOT EDIT ON THE SERVER
 * ----------------------------------------------------------------------------
 *  Owner : Getfused (git repo: miltoncat)
 *  Deploy: SFTP overwrites this file wholesale. Server-side edits WILL BE
 *          LOST without warning, with no backup and no notification.
 *
 *  Site code belongs in one of these instead. Neither is ever written by a
 *  Getfused deploy, so anything you put there is safe:
 *      themes/miltoncat-gp/functions.php   (below the SITE CUSTOMIZATIONS marker)
 *      themes/miltoncat-gp/style.css       (below the SITE CUSTOMIZATIONS marker)
 *
 *  Full ownership map: _OWNERSHIP.md in the theme root.
 * ============================================================================
 *
 *
 * Find Equipment / Find a Location panels (inc/finders.php) - the homepage
 * hero and the [mc_find_location] / [mc_find_equipment] shortcodes. Prints
 * before homepage.css and style.css, so same-specificity overrides there win.
 *
 * The panels set their own type (the comp's, as body.mc-type gives theme
 * pages), so they look the same on Elementor pages, where the kit's fonts
 * apply. Title and field rules carry two classes (+ an element) to outrank
 * the kit's ".elementor-kit-N h2" / form styles (0,1,1).
 */

.mc-finder {
	display: grid;
	/* minmax(0, ...) so a long <select> option can't widen the column. */
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-body);
	line-height: var(--mc-lh-body);
}

.mc-finder__panel {
	margin: 0;
	padding: 24px;
	background: #000;
	color: #fff;
}

/* Same size whatever the heading level (shortcode heading="h3"). */
.mc-finder .mc-finder__title {
	margin: 0 0 12px;
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-h2);
	font-weight: 700;
	line-height: var(--mc-lh-tight);
	color: #fff!important;
}

.mc-finder__fields {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
}

.mc-finder__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
	flex: 1 1 150px
}

.mc-finder__field select,
.mc-finder__field input {
	max-width: 100%;
}

.mc-finder__field label,
.mc-finder__field legend {
	font-size: 0.875rem;
	padding: 0;
}

/* Dark fields on the black panels (comp): Input Fill / Input Border tokens.
   #797979 border is 4.5:1 against the #000 panel, so the field edge passes
   non-text contrast. */
.mc-finder .mc-finder__field select,
.mc-finder .mc-finder__field input[type="text"] {
	box-sizing: border-box;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--mc-input-border);
	border-radius: 0;
	background-color: var(--mc-input-fill);
	color: var(--mc-white);
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-body);
}

/* Select: yellow chevron box on the right. */
.mc-finder .mc-finder__field select {
	min-width: 220px;
	padding-right: 56px;
	-webkit-appearance: none;
	appearance: none;
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E"),
		linear-gradient(var(--mc-cat-yellow), var(--mc-cat-yellow));
	background-repeat: no-repeat, no-repeat;
	background-position: right 13px center, right top;
	background-size: 14px 9px, 40px 100%;
}

.mc-finder .mc-finder__field select option {
	background: var(--mc-white);
	color: var(--mc-ink);
}

/* Three classes: outranks the homepage's ".mc-home :focus-visible" (Ink). */
.mc-finder .mc-finder__panel :focus-visible {
	outline: 2px solid var(--mc-cat-yellow);
	outline-offset: 2px;
}

.mc-finder .mc-finder__submit {
	min-height: 44px;
}

.mc-finder__toggle {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

.mc-finder__toggle legend {
	width: 100%;
	margin-bottom: 4px;
}

.mc-finder__toggle label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px 6px 0;
	border: 0;
	background: none;
	color: var(--mc-white);
	font-family: var(--mc-font-condensed);
	font-size: var(--mc-fs-label-used);
	font-weight: 700;
}

.mc-finder__toggle input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--mc-cat-yellow);
}

.mc-finder__zip-input {
	display: flex;
	border: 1px solid var(--mc-input-border);
    border-radius: 0;
    background-color: var(--mc-input-fill);
}

.mc-finder__zip-input input {
	width: 9em;
}

.mc-finder .mc-finder__locate {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	padding: 0;
	border: 1px solid var(--mc-input-border);
	border-left: 0;
	background: var(--mc-input-fill);
	color: var(--mc-white);
}

/* display:flex / inline-flex above would otherwise beat the hidden attribute. */
.mc-finder__field[hidden],
.mc-finder .mc-finder__locate[hidden] {
	display: none;
}

/* Comp: fields and button share one row on desktop. */
.mc-finder__family,
.mc-finder__panel--location .mc-finder__field:not(.mc-finder__zip) {
	flex: 1 1 242px;
}

.mc-finder .mc-finder__field select {
	width: 100%;
}

/* "(New)" / "(Used)" only matter when both lists show (no JavaScript). */
.mc-finder__panel.is-enhanced .mc-finder__qualifier {
	display: none;
}

.mc-finder__note {
	margin: 12px 0 0;
	font-size: 0.875rem;
}

/* The finder note's link uses the icon-link style (site-style.css); white on
   the black panel. */
.mc-finder__panel {
	--mc-icon-link-color: var(--mc-white);
}

#mc-find-zip {
	background: url("/wp-content/uploads/map-geo.svg") calc(100% - 10px) center / 18px no-repeat;
	width: 100%;
}

@media (max-width: 640px) {
	.mc-finder__field:not(.mc-finder__toggle):not(.mc-finder__zip) {
		flex: 1 1 100%;
	}
}
