/* NACHVERFOLGUNG: "Nachverfolgungsinformationen" modal dialog. Mirrors the
   reportErrorDialog modal pattern. */
.provenance__backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(43, 33, 25, 0.45);
}

.provenance__dialog {
  width: 100%;
  max-width: 32rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--color-bg, #fff);
  color: var(--color-text);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(43, 33, 25, 0.32);
  padding: 1.25rem;
  animation: provenanceIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes provenanceIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.provenance__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.provenance__title {
  margin: 0;
  font-size: 1.15rem;
}

.provenance__close {
  background: none;
  border: none;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted, #666);
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
}

.provenance__close:hover {
  background: var(--color-border, #eee);
}

.provenance__intro {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--color-text-muted, #666);
}

.provenance__empty {
  margin: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted, #888);
  font-style: italic;
}

.provenance__section {
  margin-top: 0.9rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 8px;
  background: var(--color-surface-2, rgba(0, 0, 0, 0.03));
}

.provenance__section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted, #888);
  margin-bottom: 0.4rem;
}

.provenance__merged {
  margin: 0;
  font-size: 0.9rem;
}

.provenance__wurfchronik {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted, #666);
}

.provenance__files {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.2rem;
}

.provenance__file {
  font-size: 0.85rem;
  word-break: break-word;
}

.provenance__kvlist {
  margin: 0;
  display: grid;
  gap: 0.25rem;
}

.provenance__kv {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.provenance__kv dt {
  flex: 0 0 6rem;
  font-weight: 600;
  color: var(--color-text-muted, #777);
}

.provenance__kv dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

.provenance__notes {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
}

/* Chronologischer Verlauf: liest sich wie ein Protokoll der Datenherkunft. */
.provenance__history {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.provenance__history-step {
  font-size: 0.88rem;
  line-height: 1.35;
  word-break: break-word;
}

/* Verworfene Werte (Datenherkunft): hervorgehoben, damit klar wird, dass hier
   Daten aus einer Quelle verworfen wurden — mit Grund und Ersatz. */
.provenance__history-step--discard {
  color: var(--color-danger, #9a3412);
  font-style: italic;
}

.provenance__discard-legend {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--color-text-muted, #888);
}

.provenance__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
