/* Free map tools (radius map, ZIP codes within a radius). Used with assets/vendor/leaflet/leaflet.css and style.css. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.tool-intro { max-width: 46rem; }
.tool-form {
	display: grid; gap: 14px 16px; grid-template-columns: minmax(0, 1fr);
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.tool-form .field { margin: 0; min-width: 0; position: relative; }
.tool-form .field input[type=number] {
	width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
.tool-form .field input[type=text] { width: 100%; }
.tool-form .field .hint { min-height: 1.3em; }
.tool-form .go { align-self: end; margin-bottom: 14px; }
.tool-form .go .btn { width: 100%; }
.tool-form .opts { grid-column: 1 / -1; margin: 0; }
.tool-form .opts label { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
@media (min-width: 560px) {
	.tool-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tool-form .field.wide { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
	.tool-form { grid-template-columns: 11rem minmax(0, 1fr) 7rem 7rem 11rem; }
	.tool-form .field.wide { grid-column: auto; }
	/* one row: the button sits under an empty label line, so its top lines up with the inputs (not the hint below) */
	.tool-form .go { align-self: start; margin-bottom: 0; }
	.tool-form .go::before { content: "\00a0"; display: block; font-weight: 600; margin-bottom: 4px; }
	.tool-form .field input[type=text], .tool-form .field input[type=number], .tool-form .field select, .tool-form .go .btn { box-sizing: border-box; height: 50px; }
}

/* suggestions under the place field */
.combo { position: relative; }
.suggest {
	position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 4px; list-style: none;
	background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); max-height: 18rem; overflow-y: auto;
}
.suggest li { padding: 8px 10px; border-radius: 6px; cursor: pointer; line-height: 1.35; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--accent-soft); }
.suggest li[aria-selected="true"] { outline: 2px solid var(--zone); outline-offset: -2px; }

.tool-centre { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; min-height: 1.4em; }

.tool-map {
	height: 460px; margin: 14px 0 0; border: 1px solid var(--line); border-radius: var(--radius); isolation: isolate; background: var(--map-land);
}
.tool-map:focus-visible { outline: 3px solid var(--zone); outline-offset: 2px; }
@media (max-width: 640px) { .tool-map { height: 340px; } }
.tool-mapnote { font-size: 0.9rem; color: var(--muted); margin: 8px 0 0; }
.leaflet-container { font: inherit; font-size: 0.85rem; }
.leaflet-popup-content { margin: 10px 14px; line-height: 1.4; }

.tool-results { margin-top: 24px; }
.tool-results h2 { margin-top: 0; font-size: 1.35rem; }
.tool-summary { font-weight: 600; margin: 0 0 8px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }
.tool-actions .btn { padding: 8px 18px; }
.tool-actions .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.tool-cap { font-size: 0.92rem; color: var(--muted); margin: 0 0 12px; }
.tool-results .table-scroll { max-height: 28rem; overflow: auto; }
.tool-results td.num, .tool-results th.num { text-align: right; white-space: nowrap; }
.tool-results tbody th { font-weight: 600; white-space: nowrap; }
.tool-more { margin-top: 12px; }

.tool-accuracy { margin-top: 20px; }
.tool-cta {
	margin-top: 28px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--zone);
	border-radius: var(--radius); box-shadow: var(--shadow);
}
.tool-cta h2 { margin: 0 0 8px; font-size: 1.3rem; }
.tool-cta p { margin: 0 0 12px; }
.tool-cta p:last-child { margin-bottom: 0; }
.tool-cta .actions { margin: 14px 0 12px; }

.tool-text { max-width: 46rem; }
.tool-text h2 { margin-top: 40px; }
.tool-text h3 { margin-top: 22px; }
.tool-data { font-size: 0.92rem; color: var(--muted); margin-top: 28px; }


/* "Embed this map": a collapsed box under the result actions, with the copy-paste snippet. */
.tool-embed { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tool-embed summary { cursor: pointer; padding: 10px 16px; font-weight: 600; }
.tool-embed-body { padding: 0 16px 14px; }
.tool-embed-body label { display: block; font-weight: 600; margin: 0 0 4px; }
.tool-embed-body textarea { display: block; box-sizing: border-box; width: 100%; padding: 10px 12px; font: 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: inherit; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.tool-embed-body .tool-actions { margin: 10px 0 8px; }
.tool-embed-body p { margin: 0 0 4px; }


/* ---- Newer tools (distance between ZIP codes, ZIP code map, radius map for several locations, delivery fee calculator) ---- */
.tool-form .field textarea {
	display: block; box-sizing: border-box; width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--bg);
	border: 1px solid var(--line); border-radius: 8px; resize: vertical; min-height: 7rem;
}
.tool-form .field input[type=text] { box-sizing: border-box; }
.tool-form .go.stack-go { margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tool-form .go.stack-go .btn { width: auto; min-width: 11rem; }
@media (min-width: 900px) {
	.tool-form .go.stack-go::before { content: none; }
}
/* distance: country, two places, button */
@media (min-width: 900px) {
	.tool-form.cols-dist { grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1fr) 11rem; }
	/* fee calculator: four columns */
	.tool-form.cols-fee { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tool-form.cols-fee .field.span2 { grid-column: span 2; }
	.tool-form.cols-fee .go { grid-column: span 2; }
	.tool-form.cols-fee .go::before { content: none; }
	.tool-form.cols-fee .go .btn { width: auto; min-width: 11rem; }
	.tool-form.cols-cust { grid-template-columns: minmax(0, 1fr) 11rem; }
	/* ZIP code map: one column, the country select not stretched across the page */
	.tool-form.cols-stack { grid-template-columns: minmax(0, 1fr); }
	.tool-form.cols-stack .field.narrow { max-width: 22rem; }
}
.tool-form .field.narrow select { width: 100%; }
.tool-form .field-note { font-size: 0.88rem; color: var(--muted); margin: 4px 0 0; }

/* map pins A and B (distance), customer pin (fee calculator) */
.rz-pin {
	display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #ffffff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	background: #0F2B46; color: #ffffff; font-weight: 700; font-size: 0.85rem; line-height: 1;
}
.rz-pin.b { background: #D97706; }
.rz-pin.cust { background: #7C3AED; font-size: 0.75rem; }
.rz-ring-label {
	display: block; white-space: nowrap; text-align: center; padding: 1px 6px; border-radius: 10px; font-size: 0.78rem; font-weight: 600; line-height: 1.5;
	background: rgba(255, 255, 255, 0.92); color: #0F2B46; border: 1px solid #0F766E; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.rz-ring-label.free { border-color: #16A34A; color: #14532d; }

/* result tables with a label column */
.tool-facts { border-collapse: collapse; margin: 0 0 12px; }
.tool-facts th, .tool-facts td { text-align: left; padding: 6px 18px 6px 0; vertical-align: top; }
.tool-facts th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.tool-big { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; }
.tool-big small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.tool-unmatched { margin: 0 0 12px; overflow-wrap: anywhere; }

/* centres list (radius map for several locations) */
.centres { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.centres li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.centres .sw { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #ffffff; box-shadow: 0 0 0 1px var(--line); }
.centres .c-label { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.centres .c-r { width: 6rem; box-sizing: border-box; padding: 6px 8px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.centres .c-count { color: var(--muted); font-size: 0.92rem; min-width: 8rem; }
.centres .btn { padding: 6px 14px; }
.sw-0 { background: #0F766E; } .sw-1 { background: #EA580C; } .sw-2 { background: #2563EB; } .sw-3 { background: #DC2626; } .sw-4 { background: #7C3AED; }
.sw-5 { background: #16A34A; } .sw-6 { background: #DB2777; } .sw-7 { background: #0891B2; } .sw-8 { background: #CA8A04; } .sw-9 { background: #475569; }
.tool-results h3 { margin: 20px 0 8px; font-size: 1.1rem; }
