/* routes.css — Haul Routes authoring card (haulage plan step 5).
 *
 * A floating, NON-blocking card: taps outside it must reach the town
 * canvas (route endpoints are picked by tapping the map). Never use the
 * fullscreen .modal overlay here — it swallows every tap.
 */
#routes-panel {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 5000;
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 100%);
  border: 3px solid #d4af37;
  border-radius: 15px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9);
  color: #e8d4a0;
  padding: 16px 18px;
  font-size: 14px;
}

#routes-panel h3,
#routes-panel h4 {
  color: #d4af37;
  margin: 0 0 8px 0;
}

#routes-panel .routes-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d4af37;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

#routes-panel .routes-field {
  margin: 10px 0;
}

#routes-panel .routes-field > label {
  display: block;
  color: #d4af37;
  font-weight: 600;
  margin-bottom: 4px;
}

#routes-panel .routes-field select,
#routes-panel .routes-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 30px;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #d4af37;
  background: #120a24;
  color: #e8d4a0;
  margin-bottom: 4px;
}

#routes-panel .routes-endpoint {
  display: block;
  font-size: 13px;
  margin: 2px 0 6px 0;
}

#routes-panel .routes-row-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#routes-panel .routes-goods-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  min-height: 40px;
}

#routes-panel .routes-goods-preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

#routes-panel .routes-note {
  font-size: 12px;
  font-style: italic;
  opacity: 0.85;
}

#routes-panel .routes-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

#routes-panel .routes-label {
  flex: 1;
  font-size: 13px;
}

#routes-panel hr {
  border: none;
  border-top: 1px solid #d4af37;
  margin: 12px 0;
}
