/*!
 * Diamond Dealer Locator — frontend styles.
 * Scoped to .ddl. Inherits the theme's font; override tokens on .ddl to retheme.
 */
.ddl {
	--ddl-accent: #1c7a35;      /* links: dealer name, Directions */
	--ddl-ink: #1a1a1a;
	--ddl-text: #222;
	--ddl-mute: #555;           /* contact rows */
	--ddl-bar: #f2f2f2;         /* search bar */
	--ddl-btn: #efefef;
	--ddl-btn-border: #e5c033;  /* gold outline on Search */
	--ddl-line: #bdbdbd;
	--ddl-highlight: rgba(28, 122, 53, .06);
	--ddl-list-width: 448px;
	color: var(--ddl-text);
	box-sizing: border-box;
}
.ddl *, .ddl *::before, .ddl *::after { box-sizing: inherit; }

/* Breathing room from the blocks above and below the locator */
.ddl-locator { margin: 40px 0; }

/* Search bar: one grey row; Search sits a little lower, as in the design */
.ddl-search {
	display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px;
	margin: 0 0 13px; padding: 12px 11px;
	background: var(--ddl-bar);
}
.ddl-search label {
	line-height: 40px; font-size: 17px; font-weight: 400; white-space: nowrap; color: var(--ddl-text);
}
.ddl-input {
	flex: 0 1 290px; width: 290px; min-width: 0; height: 40px;
	padding: 0 14px; font: inherit; font-size: 16px; color: var(--ddl-ink);
	border: 2px solid var(--ddl-ink); border-radius: 4px; background: #fff;
}
.ddl-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(28, 122, 53, .3); }
.ddl-select {
	width: auto; height: 40px; min-width: 96px; padding: 0 36px 0 14px;
	font: inherit; font-size: 16px; color: var(--ddl-ink); cursor: pointer;
	border: 1px solid #d4d4d4; border-radius: 4px;
	background: #fff 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 1.5l5 5 5-5' fill='none' stroke='%23222' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center;
	-webkit-appearance: none; appearance: none;
}
.ddl-select[data-ddl-radius] { min-width: 128px; }
.ddl-select:focus { outline: none; border-color: var(--ddl-accent); box-shadow: 0 0 0 2px rgba(28, 122, 53, .25); }
.ddl-btn {
	display: inline-flex; align-items: center; gap: 6px;
	height: 38px; margin-top: 32px; padding: 0 14px;
	font: inherit; font-size: 16px; color: #333; cursor: pointer;
	background: var(--ddl-btn); border: 1px solid var(--ddl-btn-border); border-radius: 2px;
}
.ddl-btn:hover { background: #e6e6e6; }
.ddl-btn:focus-visible { outline: 2px solid var(--ddl-accent); outline-offset: 2px; }
.ddl-btn-locate span { display: none; } /* legacy in-form button, if a theme still outputs it */

/* Status: read out to screen readers; only problems are shown */
.ddl-status {
	position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.ddl-status.ddl-status-warn, .ddl-status.ddl-status-error {
	position: static; width: auto; height: auto; margin: 0 0 10px; overflow: visible; clip: auto; white-space: normal;
	font-size: 15px;
}
.ddl-status-warn { color: #8a5a00; }
.ddl-status-error { color: #b32d2e; }

/* Layout: list left, map right, same height */
.ddl-layout { display: grid; grid-template-columns: var(--ddl-list-width) 1fr; gap: 14px; align-items: start; }
.ddl-map { width: 100%; min-height: 240px; background: #e5e3df; }
.ddl-map .leaflet-container { height: 100%; width: 100%; font: inherit; }

.ddl-results {
	list-style: none; margin: 0; padding: 0 8px 0 0;
	height: var(--ddl-map-h, 450px); overflow-y: auto;
}
.ddl-results:empty { display: none; }
.ddl-result { margin: 0; padding: 10px 0 14px; border-bottom: 1px dotted var(--ddl-line); cursor: pointer; }
.ddl-result:first-child { padding-top: 0; }
.ddl-result:last-child { border-bottom: 0; }
.ddl-result:hover, .ddl-result-active { background: var(--ddl-highlight); }
.ddl .ddl-result-name { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; color: #000; }
.ddl-result-name a { color: var(--ddl-accent); text-decoration: underline; text-underline-offset: 2px; }
.ddl-result-addr { font-style: normal; font-size: 15px; line-height: 20px; color: var(--ddl-text); }
.ddl-result-addr span { display: block; }
.ddl .ddl-result-contact { list-style: none; margin: 12px 0 0; padding: 0; font-size: 15px; line-height: 26px; }
.ddl-result-contact li { display: flex; align-items: center; gap: 8px; margin: 0; }
.ddl-result-contact .ddl-ic { flex: none; color: #333; }
.ddl-result-contact a { color: var(--ddl-mute); text-decoration: none; overflow-wrap: anywhere; }
.ddl-result-contact a:hover { text-decoration: underline; }
.ddl-result-meta { margin-top: 14px; font-size: 15px; line-height: 20px; }
.ddl-result-dist { color: var(--ddl-text); }
.ddl-result-directions { color: var(--ddl-accent); text-decoration: underline; text-underline-offset: 2px; }
/* "View our store": the dealer's online store */
.ddl-store-btn {
	display: inline-block; margin-top: 12px; padding: 9px 16px;
	background: var(--ddl-accent); color: #fff; border-radius: 4px;
	font-size: 14px; font-weight: 700; line-height: 18px; text-decoration: none;
}
.ddl-store-btn:hover, .ddl-store-btn:focus { background: #145a27; color: #fff; text-decoration: none; }

/* "Use my location" arrow on the map */
.ddl-map-locate {
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; cursor: pointer;
	background: #fff; color: #666; border: 0; border-radius: 2px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.ddl-map-locate:hover { color: #333; }

/* When no list yet, let the map take the full row */
.ddl-layout:has(.ddl-results:empty) { grid-template-columns: 1fr; }

/* Markers */
.ddl-map .leaflet-div-icon.ddl-pin { background: transparent; border: 0; }
.ddl-pin svg { display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
/* List hover bounces the pin (Leaflet; Google uses its own BOUNCE). Animate the
   svg, not the marker element, which Leaflet positions with a transform. */
.ddl-bounce svg { animation: ddl-bounce .5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes ddl-bounce { from { transform: translateY(0); } to { transform: translateY(-12px); } }
/* Google map controls: our locate button sits beside Street View, as in WPSL. */
.gm-style .ddl-map-locate { margin: 0 10px 10px 0; }
.ddl-origin-dot {
	display: block; width: 18px; height: 18px; border-radius: 50%;
	background: #2271b1; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(34, 113, 177, .35);
}
.ddl-popup { font-size: 13.5px; line-height: 1.4; min-width: 180px; }
.ddl-popup strong { display: block; margin-bottom: 2px; }
.ddl-popup-dist { color: var(--ddl-accent); font-weight: 600; margin-top: 2px; }
.ddl-popup-links { display: flex; gap: 14px; margin-top: 6px; }
.ddl-popup a { color: var(--ddl-accent); font-weight: 600; text-decoration: none; }
.ddl-popup a:hover { text-decoration: underline; }

/* Single dealer */
.ddl-single .ddl-address { margin-top: 10px; font-style: normal; line-height: 1.5; }

/* Narrow screens: bar wraps, map first, list below */
@media (max-width: 760px) {
	.ddl-input { flex: 1 1 100%; width: 100%; }
	.ddl-btn { margin-top: 0; }
	.ddl-layout { grid-template-columns: 1fr; }
	.ddl-map { order: -1; height: 320px !important; }
	.ddl-results { height: auto; max-height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
	.ddl-bounce svg { animation: none; }
	.ddl .leaflet-zoom-anim .leaflet-zoom-animated { transition: none; }
}
