/**
 * ============================================================================
 *  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.
 * ============================================================================
 *
 * The three finder pages (comp "Locations"): Locations Listing, AMD
 * Locations Listing and Parts Dropbox Listing (inc/locations-listing.php,
 * inc/amd-listing.php, inc/dropbox-listing.php; one shared page body).
 *
 *   Dark band: breadcrumb, title, Intro | Top Additional Info (black box)
 *   White:     filters + Search | list (300px) beside the map | two panels
 *
 * Prints before style.css, so same-specificity overrides there win. Rules
 * carry two classes to outrank the Elementor kit's ".elementor-kit-N h2 / a".
 */

.mc-locations {
	box-sizing: border-box;
	background: var(--mc-bg);
	color: var(--mc-ink);
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-body);
	line-height: var(--mc-lh-body);
}

.mc-locations .mc-listing-inner {
	box-sizing: content-box;
	max-width: var(--mc-container);
	margin: 0 auto;
	padding: 0 var(--mc-page-padding);
}

/* ---- 1. Dark band: breadcrumb, title, intro | top info ------------------- */
.mc-locations__hero {
	padding: 32px 0 64px;
	background: var(--mc-ink);
	color: var(--mc-white);
}

.mc-locations__crumbs ol {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
}

.mc-locations__crumbs li {
	margin: 0;
}

.mc-locations__crumbs li + li::before {
	content: "\203A";
	margin: 0 8px;
	color: var(--mc-cat-gray);
}

.mc-locations .mc-locations__crumbs a {
	color: #c3cace; /* 9.9:1 on Ink */
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mc-locations .mc-locations__crumbs a:is(:hover, :focus-visible) {
	color: var(--mc-white);
	text-decoration-color: var(--mc-cat-yellow);
}

.mc-locations .mc-locations__crumbs [aria-current] {
	color: var(--mc-white);
}

.mc-locations .mc-locations__title {
	margin: 0 0 32px;
	color: var(--mc-white);
}

.mc-locations__head {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--mc-gap) 40px;
	align-items: start;
}

/* The intro alone (no Top Additional Info) keeps to the left column. */
.mc-locations .mc-listing-info {
	margin: 0;
}

.mc-locations .mc-listing-info__content > :last-child {
	margin-bottom: 0;
}

.mc-locations .mc-listing-info--intro {
	color: var(--mc-white);
	font-size: var(--mc-fs-lead);
}

/* First line of the intro reads as a bold lead (comp). */
.mc-locations .mc-listing-info--intro .mc-listing-info__content > :first-child {
	margin: 0 0 16px;
	color: var(--mc-white);
	font-family: var(--mc-font-body);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: var(--mc-lh-tight);
}

.mc-locations .mc-listing-info--intro a:not(.mc-btn) {
	color: var(--mc-white);
	text-decoration: underline;
	text-decoration-color: var(--mc-cat-yellow);
	text-underline-offset: 3px;
}

.mc-locations .mc-listing-info--top {
	padding: 24px;
	background: #000;
	color: var(--mc-white);
}

.mc-locations .mc-listing-info--top :is(h2, h3, h4) {
	margin: 0 0 16px;
	color: var(--mc-white);
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-h2);
	font-weight: 700;
	line-height: var(--mc-lh-tight);
}

.mc-locations .mc-listing-info--top a:not(.mc-btn) {
	color: var(--mc-white);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* List items get the yellow map-pin bullet (comp: Service Levels Explained). */
.mc-locations .mc-listing-info--top ul {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.mc-locations .mc-listing-info--top ul:last-child {
	margin-bottom: 0;
}

.mc-locations .mc-listing-info--top li {
	position: relative;
	margin: 0 0 16px;
	padding-left: 36px;
}

.mc-locations .mc-listing-info--top li:last-child {
	margin-bottom: 0;
}

.mc-locations .mc-listing-info--top li::before {
	content: "";
	position: absolute;
	top: -4px;
	left: -2px;
	width: 32px;
	height: 32px;
	background: url("../img/map-pin-yellow.svg") no-repeat center / contain;
}

/* AMD: the two bullets explain the two map pins, in the comp's order
   (Full-Service: ink pin; Maintenance-Level: yellow pin). */
.mc-amd .mc-listing-info--top li:first-child::before {
	background-image: url("../img/map-pin-dark.svg");
}

/* ---- 2. White body ------------------------------------------------------- */
.mc-locations__body {
	padding: 88px 0;
}

/* Filters */
.mc-locations__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 20px;
	margin: 0 0 20px;
}

.mc-locations__filter {
	min-width: 0;
}

.mc-locations .mc-locations__label {
	margin: 0 0 6px;
	font-size: var(--mc-fs-body);
	font-weight: 400;
}

.mc-locations .facetwp-facet {
	margin: 0;
}

.mc-locations__filters .facetwp-location,
.mc-locations__filters .facetwp-dropdown {
	box-sizing: border-box;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--mc-input-border);
	border-radius: 0;
	background-color: var(--mc-surface);
	color: var(--mc-ink);
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-body);
}

.mc-locations__filters .facetwp-input-wrap {
	position: relative;
	display: block;
}

/* Your Location: as wide as the list column below it. */
.mc-locations__filters .facetwp-location {
	width: 300px;
	max-width: 100%;
	padding-right: 44px;
}

/* FacetWP's "use my location" crosshair, inside the field on the right. */
.mc-locations__filters .facetwp-type-proximity .locate-me {
	position: absolute;
	top: 50%;
	right: 12px;
	left: auto;
	transform: translateY(-50%);
	cursor: pointer;
}

.mc-locations__filters .location-results {
	position: absolute;
	z-index: 20;
	right: 0;
	left: 0;
	border: 1px solid var(--mc-border);
	background: var(--mc-white);
	box-shadow: var(--mc-shadow);
}

/* Select: plain ink chevron on the right (comp). */
.mc-locations__filters .facetwp-dropdown {
	min-width: 260px;
	padding-right: 44px;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231A1E22' stroke-width='1.8'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px 8px;
}

.mc-locations .mc-locations__search.mc-btn {
	box-sizing: border-box;
	align-self: flex-end;
	height: 44px;
	min-height: 44px;
	padding-block: 0;
}

/* Map pin key (AMD: Full Service / Maintenance), end of the filter row. */
.mc-locations__key {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 0 0 0 auto;
	padding: 0 0 12px;
	list-style: none;
	font-size: 0.875rem;
}

.mc-locations__key li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

/* The map's own pins (assets/img/map-pin-*.svg). */
.mc-pin {
	display: inline-block;
	flex: none;
	width: 28px;
	height: 28px;
	background: url("../img/map-pin-yellow.svg") no-repeat center / contain;
}

.mc-pin--dark {
	background-image: url("../img/map-pin-dark.svg");
}

/* Results: list (300px, scrolls) | map */
.mc-locations__results {
	--mc-locations-height: 800px;
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 20px;
}

.mc-locations__listing {
	box-sizing: border-box;
	max-height: var(--mc-locations-height);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-top: 1px solid var(--mc-border-strong);
	border-bottom: 1px solid var(--mc-border-strong);
}

.mc-locations__map {
	height: var(--mc-locations-height);
	background: var(--mc-panel);
}

.mc-locations__map .facetwp-facet,
.mc-locations__map .facetwp-facet > div:first-child {
	height: 100%;
}

/* The comp has no "Enable map filtering" button. */
.mc-locations__map .facetwp-map-filtering {
	display: none;
}

/* Cards */
.mc-loc-card {
	padding: 16px 16px 16px 0;
}

.mc-locations .mc-loc-card__title {
	margin: 0 0 6px;
	color: var(--mc-ink);
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-h4);
	font-weight: 700;
	line-height: var(--mc-lh-tight);
}

.mc-locations .mc-loc-card__title a {
	color: var(--mc-ink);
	text-decoration: none;
}

.mc-locations .mc-loc-card__title a:is(:hover, :focus-visible) {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mc-locations .mc-loc-card__distance {
	margin: 0 0 4px;
	color: var(--mc-text-secondary);
	font-size: 0.875rem;
	font-weight: 500;
}

.mc-locations :is(.mc-loc-card__address, .mc-loc-card__phone, .mc-loc-card__hours, .mc-loc-card__notes) {
	margin: 0;
	color: var(--mc-text-secondary);
}

.mc-locations .mc-loc-card__phone a,
.mc-loc-marker__phone a {
	color: inherit;
	text-decoration: none;
}

.mc-locations .mc-loc-card__phone a:is(:hover, :focus-visible),
.mc-loc-marker__phone a:is(:hover, :focus-visible) {
	text-decoration: underline;
}

/* Chips: Locations' capabilities, AMD service level. */
.mc-loc-card__caps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.mc-locations .mc-loc-card__level,
.mc-loc-marker__level {
	margin: 8px 0 0;
}

.mc-loc-card__caps li,
.mc-chip {
	display: inline-block;
	margin: 0;
	padding: 3px 8px;
	background: var(--mc-neutral-tint);
	color: var(--mc-ink);
	font-size: var(--mc-fs-badge);
	font-weight: 700;
	line-height: 1.3;
}

.mc-chip--full_service {
	background: var(--mc-ink);
	color: var(--mc-cat-yellow);
}

.mc-chip--maintenance {
	background: var(--mc-cat-yellow);
	color: var(--mc-ink);
}

/* Links: each in a <span> so it stays inline (a flex item would be
   blockified, stretching the icon-link underline past the text), and each
   on one line; the row wraps between links. */
.mc-locations .mc-loc-card__links,
.mc-loc-marker__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
	margin: 10px 0 0;
}

.mc-locations .mc-loc-card__links > span,
.mc-loc-marker__links > span {
	white-space: nowrap;
}

.mc-locations__empty {
	margin: 0;
	padding: 20px 20px 20px 0;
}

/* Map info window */
.mc-loc-marker {
	max-width: 260px;
	color: var(--mc-ink);
	font-family: var(--mc-font-body);
	font-size: 0.875rem;
	line-height: 1.4;
}

.mc-loc-marker p {
	margin: 0 0 2px;
}

.mc-loc-marker .mc-loc-marker__title {
	margin-bottom: 4px;
	font-size: var(--mc-fs-h4);
	font-weight: 700;
}

.mc-loc-marker__type {
	color: var(--mc-text-secondary);
}

/* Bottom: two gray panels, outlined dark buttons */
.mc-locations__bottom {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 80px;
}

.mc-locations__bottom:empty {
	display: none;
}

.mc-locations .mc-listing-info--bottom {
	padding: 32px;
	background: var(--mc-panel);
}

.mc-locations .mc-listing-info--bottom :is(h2, h3, h4) {
	margin: 0 0 12px;
	color: var(--mc-ink);
	font-family: var(--mc-font-body);
	font-size: var(--mc-fs-h2);
	font-weight: 700;
	line-height: var(--mc-lh-tight);
}

.mc-locations .mc-listing-info--bottom a:not(.mc-btn) {
	color: var(--mc-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mc-locations .mc-listing-info--bottom .mc-btn.mc-btn {
	--mc-btn-color: var(--mc-ink);
	--mc-btn-bg: transparent;
	--mc-btn-border: var(--mc-ink);
	--mc-btn-hover-bg: var(--mc-ink);
	--mc-btn-hover-border: var(--mc-ink);
	--mc-btn-hover-color: var(--mc-cat-yellow);
	margin-top: 20px;
}

/* Keyboard focus: ink ring on white, white ring in the dark band. */
.mc-locations :focus-visible {
	outline: 2px solid var(--mc-focus);
	outline-offset: 2px;
}

.mc-locations__hero :focus-visible {
	outline-color: var(--mc-white);
}

/* ---- Tablet / phone ------------------------------------------------------ */
@media (max-width: 1024px) {
	.mc-locations__head {
		grid-template-columns: minmax(0, 1fr);
	}

	.mc-locations__results {
		--mc-locations-height: 600px;
		grid-template-columns: 260px minmax(0, 1fr);
	}

	.mc-locations__body {
		padding: 56px 0;
	}

	.mc-locations__bottom {
		margin-top: 56px;
	}
}

/* Phone: map above the list, the list unboxed. */
@media (max-width: 768px) {
	.mc-locations__hero {
		padding: 24px 0 40px;
	}

	.mc-locations .mc-locations__title {
		margin-bottom: 24px;
	}

	.mc-locations__body {
		padding: 40px 0;
	}

	.mc-locations__results {
		grid-template-columns: minmax(0, 1fr);
	}

	.mc-locations__map {
		order: -1;
		height: 320px;
	}

	.mc-locations__listing {
		max-height: none;
		overflow: visible;
	}

	.mc-loc-card {
		padding-right: 0;
	}

	.mc-locations__bottom {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 40px;
	}

	.mc-locations .mc-listing-info--bottom {
		padding: 24px;
	}

	.mc-locations__filters > .mc-locations__filter,
	.mc-locations__filters .facetwp-location,
	.mc-locations__filters .facetwp-dropdown {
		width: 100%;
	}

	.mc-locations__filters > .mc-locations__filter {
		flex: 1 1 100%;
	}

	.mc-locations__key {
		margin-left: 0;
	}
}
