/* FPM Dealer Locator — inherits theme fonts; tweak the variables to match your brand. */
.fpm-dl, .fpm-dl-apply {
	--fpm-dl-accent: #111;
	--fpm-dl-accent-text: #fff;
	--fpm-dl-border: #d9d9d9;
	--fpm-dl-muted: #666;
	--fpm-dl-bg: #fff;
	--fpm-dl-hover: #f5f5f5;
	box-sizing: border-box;
}
.fpm-dl *, .fpm-dl-apply * { box-sizing: border-box; }

/* Search bar */
.fpm-dl-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.fpm-dl-q { flex: 1 1 220px; min-width: 0; }
.fpm-dl-q, .fpm-dl-radius,
.fpm-dl-form input, .fpm-dl-form select, .fpm-dl-form textarea {
	padding: 10px 12px; border: 1px solid var(--fpm-dl-border); border-radius: 4px;
	font: inherit; width: auto;
}
/* Search controls use a light field; application-form fields keep the theme's own field colors. */
.fpm-dl-q, .fpm-dl-radius { background: var(--fpm-dl-bg); color: #1a1a1a; }
.fpm-dl-btn {
	padding: 10px 18px; border: 1px solid var(--fpm-dl-accent); border-radius: 4px;
	background: var(--fpm-dl-accent); color: var(--fpm-dl-accent-text);
	font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.fpm-dl-btn:hover { opacity: .88; }
.fpm-dl-btn-alt { background: transparent; color: var(--fpm-dl-accent); }
.fpm-dl-status { font-size: .9em; color: var(--fpm-dl-muted); min-height: 1.4em; margin-bottom: 8px; }

/* List + map */
.fpm-dl-body {
	display: grid; grid-template-columns: minmax(240px, 340px) 1fr;
	height: var(--fpm-dl-h, 560px); border: 1px solid var(--fpm-dl-border); border-radius: 6px; overflow: hidden;
}
.fpm-dl-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-right: 1px solid var(--fpm-dl-border); background: var(--fpm-dl-bg); }
.fpm-dl-item { padding: 14px 16px; border-bottom: 1px solid var(--fpm-dl-border); cursor: pointer; margin: 0; }
.fpm-dl-item:hover, .fpm-dl-item:focus { background: var(--fpm-dl-hover); outline: none; }
.fpm-dl-item.is-active { box-shadow: inset 3px 0 0 var(--fpm-dl-accent); background: var(--fpm-dl-hover); }
.fpm-dl-name { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.fpm-dl-dist { font-weight: 400; color: var(--fpm-dl-muted); font-size: .9em; white-space: nowrap; }
.fpm-dl-addr { font-size: .92em; color: var(--fpm-dl-muted); margin: 4px 0 6px; line-height: 1.4; }
.fpm-dl-links { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .9em; }
.fpm-dl-links a { overflow-wrap: anywhere; }
/* The list panel is always light, so force readable text/link colors regardless of the theme's palette. */
.fpm-dl-list, .fpm-dl-list .fpm-dl-name { color: #1a1a1a; }
.fpm-dl-list .fpm-dl-addr, .fpm-dl-list .fpm-dl-dist { color: #555; }
.fpm-dl .fpm-dl-list a, .fpm-dl .fpm-dl-list a:visited { color: #1a1a1a !important; text-decoration: underline; font-weight: 600; }
.fpm-dl .fpm-dl-list a:hover { color: #000 !important; }
.fpm-dl-empty { padding: 20px 16px; color: var(--fpm-dl-muted); }
.fpm-dl-map { height: 100%; min-height: 300px; z-index: 0; }
.fpm-dl-pop { line-height: 1.45; }

@media (max-width: 720px) {
	.fpm-dl-body { grid-template-columns: 1fr; grid-template-rows: 340px auto; height: auto; }
	.fpm-dl-map { order: -1; height: 340px; }
	.fpm-dl-list { border-right: 0; border-top: 1px solid var(--fpm-dl-border); max-height: 420px; }
}

/* Application form */
.fpm-dl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.fpm-dl-row { display: flex; flex-direction: column; gap: 6px; }
/* Labels follow the page's text color so they read on light and dark themes alike. */
.fpm-dl-apply { color: inherit; }
.fpm-dl-apply .fpm-dl-row label { font-weight: 600; font-size: .95em; color: inherit !important; }
.fpm-dl-apply .fpm-dl-form select { color: inherit; background-color: transparent; }
.fpm-dl-apply .fpm-dl-form select option { color: #1a1a1a; background: #fff; }
.fpm-dl-row input, .fpm-dl-row select, .fpm-dl-row textarea { width: 100%; }
.fpm-dl-full { grid-column: 1 / -1; }
.fpm-dl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fpm-dl-msg { padding: 14px 16px; border-radius: 4px; margin-bottom: 16px; color: #1a1a1a; }
.fpm-dl-ok { background: #e8f5e9; border: 1px solid #a5d6a7; }
.fpm-dl-err { background: #fdecea; border: 1px solid #f5c2c0; }
@media (max-width: 600px) { .fpm-dl-form { grid-template-columns: 1fr; } }
