/* ==========================================================================
   Distance entre deux codes postaux (France) - styles propres a l'outil
   Base sur fr-nearest-postcodes.css (legende de carte, field-status) et sur
   la convention marqueurs A/B verte/rouge de postcode-distance.js (UK).
   ========================================================================== */

.sidebar-content label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  margin-top: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-content label:first-of-type {
  margin-top: 0;
}

.tool-section h3 {
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--card) 100%);
  margin: -20px -20px 0 -20px;
  padding: 20px;
  border-radius: 12px 12px 0 0;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

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

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

/* Result panel */
.pair-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.pair-summary-item {
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pair-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.pair-letter.pair-a {
  background: #22c55e;
}

.pair-letter.pair-b {
  background: #ef4444;
}

#resultPanel h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.3rem;
}

#resultPanel p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.bearing-line {
  font-size: 0.85rem !important;
  color: var(--text-muted);
}

.pair-failed {
  font-size: 0.9rem;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin: 0 0 8px;
}

.tool-info {
  background-color: var(--glass);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid var(--border);
}

.tool-item {
  font-size: 13px;
  color: var(--text);
  padding: 6px 0;
}

.button-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.button-row .btn {
  flex: 1;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.tool-distinction {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tool-distinction a {
  color: var(--primary);
}

@media (max-width: 600px) {
  .input-section {
    margin: -16px -16px 0 -16px;
    padding: 16px;
  }
}

/* Map legend: same visual language as the other French tools' own. */
.np-map-legend {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  max-width: 240px;
}

.np-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 3px 0;
}

.np-legend-dot {
  flex-shrink: 0;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2px solid;
}

.np-legend-note {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}
