/* Polaris — compact stop rows, numbered to match the map. */
.stops-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--s-2);
}

#stop-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  margin-left: var(--s-1);
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--accent-text);
  font-size: 10px;
  letter-spacing: 0;
  vertical-align: middle;
}

#stop-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  list-style: none;
  margin-top: var(--s-2);
  max-height: 224px;
  overflow-y: auto;
  font-size: 12px;
}

#stop-list .stop-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

#stop-list .stop-row:hover,
#stop-list .stop-row:focus-within {
  border-color: var(--border);
  background: var(--surface-2);
}

#stop-list .stop-row.depot {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.stop-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--accent-text);
  font: 600 11px var(--font-mono);
}

.depot .stop-badge {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
}

.stop-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stop-quantity {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

#stop-list .demand {
  width: 40px;
  min-height: 32px;
  padding: 3px 2px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text);
  font: 11px var(--font-mono);
  text-align: center;
  color-scheme: dark;
}

#stop-list .demand:focus { border-color: var(--accent); }

#stop-list .stop-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-muted);
  font: 12px var(--font-ui);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur) var(--ease), background var(--dur) var(--ease);
}

#stop-list .stop-row:hover .stop-remove,
#stop-list .stop-row:focus-within .stop-remove { opacity: 1; }

#stop-list .stop-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.window-row {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--text-muted);
  font-size: 10px;
}

.window-row label {
  display: inline-flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.window-row input[type="time"] {
  width: 86px;
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text);
  color-scheme: dark;
  font: 10px var(--font-ui);
}

.window-row input[type="time"]:focus { border-color: var(--accent); }

#stop-list .empty-row {
  padding: var(--s-3) var(--s-2);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

@media (hover: none) {
  #stop-list .stop-remove { opacity: 1; }
}
