/**
 * Near search, map pins, nearby pros and the city index.
 * Loaded with the main stylesheet; kept apart so these features are easy to find.
 */

/* ---------- Near: ZIP code or city ---------- */
.stm-near { display: inline-flex; align-items: center; gap: 0.5rem; }
.stm-near input {
	width: 12.5rem; max-width: 100%; min-height: 2.25rem; padding: 0.35rem 0.8rem; box-sizing: border-box;
	border: 1px solid var(--wp--preset--color--border); border-radius: 999px; background: var(--wp--preset--color--base);
	font: inherit; color: var(--wp--preset--color--contrast);
}
.stm-near input:focus { outline: none; border-color: var(--wp--preset--color--apricot); box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.25); }
.wpdt-search__near { row-gap: 0.6rem; }
.wpdt-search__near-status:not(:empty) { font-weight: 600; color: var(--wp--preset--color--bronze); }
@media (max-width: 560px) {
	.stm-near { flex: 1 1 100%; }
	.stm-near input { flex: 1; width: auto; }
}

/* ---------- Map pins ---------- */
.stm-pin { background: none; border: 0; }
.stm-pin svg { display: block; overflow: visible; filter: drop-shadow(0 2px 3px rgba(59, 36, 24, 0.35)); transition: transform 0.15s ease; transform-origin: 50% 100%; }
.stm-pin path { fill: var(--wp--preset--color--bronze, #b8743d); stroke: #fff; stroke-width: 2; }
.stm-pin circle { fill: var(--wp--preset--color--peach, #ffcb94); }
.stm-pin:hover svg, .stm-pin:focus svg { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .stm-pin svg { transition: none; } }
.wpdt-map .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--stm-shadow); }
.wpdt-map .leaflet-popup-content { margin: 12px 16px; font-family: var(--wp--preset--font-family--body, inherit); font-weight: 700; font-size: 0.95rem; }
.wpdt-map .leaflet-popup-content a { color: var(--wp--preset--color--accent); text-decoration: none; }
.wpdt-map .leaflet-popup-content a::after { content: " \2192"; }

/* ---------- All-states page: the directory map ---------- */
.stm-map-section .stm-listings-map { border-radius: 12px; overflow: hidden; }
.stm-map-section h2, .stm-city-section h2 { margin-bottom: 0.25em; }

/* ---------- City pages: nearby pros ---------- */
.stm-nearby { padding-top: var(--wp--preset--spacing--60); border-top: 1px solid var(--wp--preset--color--border); }
.stm-nearby__title { margin: 0; }
.stm-nearby__lede { margin: 0.4em 0 1.4em; color: var(--wp--preset--color--muted); }

/* ---------- City index ---------- */
.stm-city-index { columns: 4 14rem; column-gap: 28px; }
.stm-city-index__state { break-inside: avoid; margin: 0 0 22px; }
.stm-city-index__state h3 { margin: 0 0 6px; font-size: 1.35rem; }
.stm-city-index__state h3 a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.stm-city-index__state h3 a:hover { color: var(--wp--preset--color--bronze); }
.stm-city-index__state ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stm-city-index__state li a {
	display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--surface); color: var(--wp--preset--color--cocoa); font-size: 0.9rem; font-weight: 600; text-decoration: none;
}
.stm-city-index__state li a:hover { border-color: var(--wp--preset--color--apricot); color: var(--wp--preset--color--contrast); }

/* ---------- Distance on cards (near searches, nearby pros) ---------- */
.stm-card__where .wpdt-distance { font-weight: 600; color: var(--wp--preset--color--muted); }
.stm-card__where .wpdt-distance::before { content: "\00b7"; margin: 0 0.4em; }
