/* County Lines Map - MapTools.co (2026-10-12) */

.cl-searchbar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cl-search-row input {
  flex: 1 1 260px;
  min-width: 0;
}

.cl-search-row .btn {
  white-space: nowrap;
}

.cl-search-row select {
  flex: 0 1 220px;
  min-width: 0;
}

.cl-status {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 1.4em;
}

.cl-status:empty::before {
  content: "\00a0";
}

.cl-status.is-error {
  color: var(--danger);
}

.cl-result {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid #7c3aed;
  border-radius: var(--radius-md);
}

.cl-headline {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--text);
}

.cl-lines {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.cl-lines li {
  margin: 0 0 4px;
  line-height: 1.5;
  color: var(--text);
}

.cl-key {
  display: inline-block;
  width: 22px;
  height: 0;
  margin-right: 8px;
  vertical-align: middle;
  border-top: 3px dashed #7c3aed;
}

.cl-key-state {
  border-top: 3px dotted #1f2937;
}

.cl-small {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Map and answer side by side on a wide screen, the answer under the map on a narrow one. Nothing above the map changes
   height when an answer arrives, so a tap on the map never moves it (scripts/browser-tests/phone-map-visible.mjs). */
.cl-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .cl-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cl-map {
  height: 62vh;
  min-height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.cl-map-key {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.cl-map-key .cl-key-solid {
  display: inline-block;
  width: 22px;
  margin: 0 6px 0 0;
  vertical-align: middle;
  border-top: 2px solid #1f2937;
}

.cl-map-key .cl-key-solid.is-county {
  border-top: 1.5px solid #7c3aed;
  margin-left: 12px;
}

/* County names on the map (Leaflet divIcon, className cl-label). */
.cl-label {
  background: none;
  border: none;
}

.cl-label span {
  display: block;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: #4c1d95;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff;
}

@media (max-width: 600px) {
  .cl-search-row .btn,
  .cl-search-row select {
    flex: 1 1 auto;
    justify-content: center;
  }
  .cl-map {
    height: 55vh;
    min-height: 320px;
  }
  .cl-headline {
    font-size: 1.05rem;
  }
}

/* Not global on this site: each tool that needs it carries it (area-calculator.css has the same rule). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
