/* ============================================================
   batOS Log-Renderer — Card-Layout fuer Bearbeitungshistory
   Wird von wwwroot/js/shared/log-renderer.js befuellt.
   Eingebunden in _Layout.cshtml (globale Site-Assets).
   ============================================================ */

.bat-log-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bat-log-empty,
.bat-log-loading {
    color: var(--bat-text-muted, #9ca3af);
    font-size: 0.85rem;
    padding: 12px 0;
}

.bat-log-error {
    color: #dc2626;
    font-size: 0.85rem;
    padding: 12px 0;
}

/* ── Karte pro Log-Eintrag ──────────────────────────────────── */
.bat-log-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bat-log-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Event-Badge ───────────────────────────────────────────── */
.bat-log-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1.3;
}

.bat-log-badge i { font-size: 0.9rem; }

.bat-log-badge-success { background: rgba(22, 163, 74, 0.10);  color: #16a34a; }
.bat-log-badge-danger  { background: rgba(220, 38, 38, 0.10);  color: #dc2626; }
.bat-log-badge-info    { background: rgba(0, 102, 204, 0.10);  color: #0066cc; }
.bat-log-badge-accent  { background: rgba(124, 58, 237, 0.10); color: #7c3aed; }
.bat-log-badge-neutral { background: #f3f4f6;                  color: #4b5563; }

/* ── Meta-Zeile (Zeit + User) ──────────────────────────────── */
.bat-log-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--bat-text-secondary, #6b7280);
}

.bat-log-meta time { white-space: nowrap; }

.bat-log-sep {
    color: var(--bat-text-muted, #9ca3af);
    opacity: 0.6;
}

.bat-log-user {
    color: var(--bat-text-primary, #2d2d2d);
    font-weight: 500;
    white-space: nowrap;
}

.bat-log-user-system {
    color: var(--bat-text-muted, #9ca3af);
    font-style: italic;
    font-weight: 400;
}

/* ── Feldaenderungen ───────────────────────────────────────── */
.bat-log-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
    border-top: 1px solid #f3f4f6;
}

.bat-log-field {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    align-items: baseline;
    font-size: 0.8rem;
}

.bat-log-field-key {
    color: var(--bat-text-muted, #9ca3af);
    font-weight: 500;
    text-transform: none;
    word-break: break-word;
}

.bat-log-field-value {
    color: var(--bat-text-primary, #2d2d2d);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.bat-log-field-old {
    color: var(--bat-text-secondary, #6b7280);
    text-decoration: line-through;
    text-decoration-color: rgba(107, 114, 128, 0.5);
}

.bat-log-field-arrow {
    color: var(--bat-text-muted, #9ca3af);
    font-size: 0.9rem;
}

.bat-log-field-new {
    color: var(--bat-text-primary, #2d2d2d);
    font-weight: 500;
}

.bat-log-field-removed {
    text-decoration: line-through;
    color: #dc2626;
    text-decoration-color: rgba(220, 38, 38, 0.5);
}

/* ── Note-Zitat ────────────────────────────────────────────── */
.bat-log-note {
    margin: 0;
    padding: 6px 10px;
    border-left: 3px solid #e5e7eb;
    background: #f9fafb;
    color: var(--bat-text-secondary, #6b7280);
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.5;
    border-radius: 0 4px 4px 0;
}

/* ── Eng wenn innerhalb bat-modal-Tab ──────────────────────── */
.bat-modal .bat-log-list { gap: 6px; }
.bat-modal .bat-log-item { padding: 8px 10px; }

/* ── Eng wenn innerhalb jd-pane (CreateV2) ─────────────────── */
.jd-pane .bat-log-list { max-width: 800px; }
