/* Field view (placements/index): map, cards, chips, pins */
.field-view { display: flex; flex-direction: column; gap: 1rem; }
.field-header h1 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.field-header .muted { margin: 0; font-size: 0.9rem; }

.placements-map {
  width: 100%;
  height: 55vh;
  min-height: 320px;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}

.field-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.field-list-completed { margin-top: 0.5rem; }
.field-toggle { text-align: center; margin: 1rem 0 0.5rem; }

.field-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  color: var(--text);
}
.field-card strong { color: var(--text); }
.field-card.placement-claimed { border-left: 3px solid var(--accent); }
.field-card.placement-done,
.field-card.placement-skipped { opacity: 0.55; }

.field-card-head {
  display: flex; align-items: baseline; gap: 0.5rem;
}
.field-card-head strong { flex: 1; min-width: 0; }
.field-card-head form.button_to { margin: 0; }
.field-card-remove {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 0 0.4rem;
  font-size: 0.85rem;
  cursor: pointer;
  width: auto;
}
.field-card-remove:hover { color: #e85a5a; }

.field-card-address { font-size: 0.9rem; }
.field-distance { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }

.field-card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap;
}
.field-card-actions {
  display: flex; gap: 0.5rem; align-items: center;
  flex-wrap: wrap;
}
.field-card-actions form.button_to { margin: 0; }
.field-card-actions .button { width: auto; padding: 0.35rem 0.75rem; }

/* Method selector chip group */
.method-chips {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.method-chips form.button_to { margin: 0; display: flex; }
.method-chips form.button_to + form.button_to .chip {
  border-left: 1px solid var(--border);
}
.chip {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  width: auto;
  cursor: pointer;
}
.chip:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.chip-active {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}
.chip-active:hover { background: rgba(255,255,255,0.12); }

/* Radio-input variant: chips inside a form */
.method-chips-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.method-chips-radio label.chip {
  margin: 0;
  border-left: 1px solid var(--border);
}
.method-chips-radio label.chip:first-of-type { border-left: 0; }
.method-chips-radio input[type="radio"]:checked + label.chip {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}
.method-chips-radio input[type="radio"]:checked + label.chip:hover {
  background: rgba(255,255,255,0.12);
}
.method-chips-radio input[type="radio"]:focus-visible + label.chip {
  outline: 2px solid var(--accent, #4a9eff);
  outline-offset: -2px;
}

/* Map pins */
.field-pin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
  cursor: pointer;
}
.field-pin-pending { background: #d9534f; }
.field-pin-claimed { background: #f0ad4e; }
.field-pin-done    { background: #5cb85c; opacity: 0.7; }
.field-pin-skipped { background: #888;    opacity: 0.7; }
.field-pin-user {
  background: #2b82e6; width: 14px; height: 14px;
  box-shadow: 0 0 0 4px rgba(43,130,230,0.25);
}

/* Mapbox popups have a white background; override our dark-theme text colors. */
.mapboxgl-popup-content {
  color: #1a1a1a;
}
.mapboxgl-popup-content strong { color: #0b132b; }
.mapboxgl-popup-content .muted { color: #5a6678; }
