/* ==========================================================================
   Distance Between (Canada) - Tool-Specific Styles
   Base layout copied from ca-postcode-distance.css (same !important
   override reasoning: global.css's .tool-container grid loads after
   this file and wins on equal specificity without it).
   ========================================================================== */

.tool-container {
  display: flex !important;
  height: 700px !important;
  max-height: 700px !important;
  overflow: hidden !important;
  background-color: var(--bg);
}

.tool-sidebar {
  width: 400px;
  background-color: var(--card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 500px;
  max-height: 700px;
}

.map {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

#map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

.sidebar-content {
  padding: 20px;
}

.tool-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tool-section:last-child {
  border-bottom: none;
}

.tool-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
}

.tool-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 12px 0 4px;
}

.tool-section input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.button-group {
  display: flex;
  gap: 8px;
}

.btn-full {
  flex: 1;
}

.field-status {
  margin-top: 6px;
  font-size: 13px;
}

.field-error {
  color: #dc2626;
  margin: 0;
}

.ambiguous-picker p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 6px;
}

.ambiguous-picker ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.candidate-btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.candidate-btn:hover {
  background: var(--hover-bg);
}

.tool-results {
  display: none;
}

.result-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.result-row strong {
  display: block;
  color: var(--text);
}

.precision-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.precision-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Red is reserved for genuine refusals (.field-error) - a settlement
   or region-tier result is still a valid answer, not an error, so it
   gets a calmer, neutral tone rather than a colour that reads as
   something having gone wrong. */
.precision-address { color: #16a34a; }
.precision-street { color: #d97706; }
.precision-postcode { color: #d97706; }
.precision-settlement { color: #6b7280; }
.precision-region { color: #6b7280; }

.result-distance {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-top: 14px;
}

.result-distance-sub {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.result-caveat {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.custom-marker {
  background: transparent;
  border: none;
}
