/*
 * Coordinate fields and copy buttons: the look of the note and error that public/js/shared/coordField.js puts
 * under a coordinate input, and of the button and fallback box that public/js/shared/coordCopy.js builds.
 * Colours are design tokens (--ds-*, defined in public/css/design-tokens.css), so light and dark mode follow the page.
 * Used by the web pages and by DCM (views/mobile/partials/head.ejs links it before dcm.css, which adds only two touch-size lines).
 */

.coord-field__note,
.coord-field__error {
  margin: 4px 0 0;
  font-size: var(--ds-text-xs, 12px);
  line-height: 1.35;
}

.coord-field__note {
  color: var(--ds-text-muted, #6b7280);
}

.coord-field__error {
  color: var(--ds-danger-text, #dc2626);
  font-weight: 600;
}

input[aria-invalid="true"][data-coord-field] {
  box-shadow: 0 0 0 1px var(--ds-danger-text, #dc2626);
}

.coord-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid var(--ds-border-strong, #d1d5db);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}

.coord-copy:hover {
  background: var(--ds-bg-surface-2, rgba(128, 128, 128, 0.12));
}

.coord-copy:focus-visible {
  outline: 2px solid var(--ds-brand-primary, #2563eb);
  outline-offset: 2px;
}

.coord-copy__fallback {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--ds-border-strong, #d1d5db);
  border-radius: 6px;
  background: var(--ds-bg-surface-2, #f3f4f6);
  color: var(--ds-text-primary, #111111);
  font-size: 13px;
}
