/* ===== Recent Changes / Änderungshistorie ===== */

/* ── Table ─────────────────────────────────────── */
.history-table-wrapper {
  overflow-x: auto;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.history-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  white-space: nowrap;
  border-bottom: 2px solid #ccc;
}
.history-table td {
  padding: 0.4rem 0.6rem;
  vertical-align: top;
  border-bottom: 1px solid #eee;
}

/* ── Row colour coding by history_type ─────────── */
.history-row--\+ {
  background: #e8f5e9;  /* green tint – created */
}
.history-row--\~ {
  background: #fff8e1;  /* yellow tint – updated */
}
.history-row--\- {
  background: #fce4ec;  /* red tint – deleted */
}

/* ── Badge ─────────────────────────────────────── */
.history-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.history-badge--\+ {
  background: #c8e6c9;
  color: #2e7d32;
}
.history-badge--\~ {
  background: #fff9c4;
  color: #f57f17;
}
.history-badge--\- {
  background: #ffcdd2;
  color: #c62828;
}

/* ── Change list inside table cell ─────────────── */
.change-list {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}
.change-list li {
  margin-bottom: 0.15rem;
  line-height: 1.3;
}
.history-date {
  white-space: nowrap;
}
.history-object {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-changes {
  max-width: 350px;
  word-break: break-word;
}

/* ── Revert button ─────────────────────────────── */
.btn-revert {
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid #c62828;
  background: #fff;
  color: #c62828;
  border-radius: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-revert:hover {
  background: #fce4ec;
}

/* ── Revert modal (same pattern as move-modal) ── */
.revert-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.revert-modal.revert-modal--open {
  display: flex;
}
.revert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.revert-modal__dialog {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.revert-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.revert-modal__header h3 {
  margin: 0;
  font-size: 1rem;
}
.revert-modal__header button {
  border: none;
  background: transparent;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.revert-modal__body {
  margin: 0.5rem 0 1rem;
}
.revert-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.revert-changes-detail ul {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}
.btn-revert-confirm {
  background: #c62828;
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
}
.btn-revert-confirm:hover {
  background: #b71c1c;
}
body.revert-modal-open {
  overflow: hidden;
}
