/* ============================================================================
   Maps and the safe drop-off (Phase G).
   Loaded by the collector progress page, the drop-off picker and the owner's map.
   Leaflet's own stylesheet is vendored at /static/vendor/leaflet/leaflet.css and
   must be loaded BEFORE this file.
   ============================================================================ */

/* ---- Map containers ------------------------------------------------------- */
.map-shell {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-alt);
}

.map-canvas {
  width: 100%;
  height: 320px;
}

.map-canvas--tall {
  height: 420px;
}

.map-hint {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Leaflet's controls sit above our card radius otherwise. */
.map-shell .leaflet-container {
  font-family: var(--font-ui);
  z-index: 1;
}

/* ---- Progress table: the drop-off cell ------------------------------------ */
.dropoff-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.dropoff-chip--active {
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}

.dropoff-chip--done {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

/* ---- The owner's drop-off notice on the dashboard ------------------------ */
.dropoff-notice {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-light);
}

.dropoff-notice__title {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.dropoff-notice__place {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.dropoff-notice__meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dropoff-notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

/* ---- Place-type chooser (collector) -------------------------------------- */
.place-choice {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.place-choice__opt {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
}

.place-choice__opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
  font-weight: 500;
}

.place-choice__opt input {
  accent-color: var(--accent);
  margin: 0;
}

@media (max-width: 640px) {
  .map-canvas {
    height: 260px;
  }
}
