/* ==========================================================================
   Speedy Admin — Audit diff viewer (Logs page "Changes" modal)
   ========================================================================== */

.diff-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 380px;
    overflow: auto;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.diff-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.diff-table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    word-break: break-word;
}
.diff-table tbody tr:last-child td { border-bottom: 0; }

.diff-key {
    width: 26%;
    font-weight: 600;
    color: var(--text-2);
    white-space: nowrap;
}

/* Row status accent + subtle tint */
.diff-row.changed { background: var(--warning-soft); }
.diff-row.added   { background: var(--success-soft); }
.diff-row.removed { background: var(--danger-soft); }
.diff-row.changed .diff-key { box-shadow: inset 3px 0 0 var(--warning); }
.diff-row.added   .diff-key { box-shadow: inset 3px 0 0 var(--success); }
.diff-row.removed .diff-key { box-shadow: inset 3px 0 0 var(--danger); }

.diff-hide-unchanged .diff-row.unchanged { display: none; }
.diff-row.unchanged td { color: var(--text-3); }

/* Value chips: old value struck through, new value emphasized */
.diff-val { white-space: pre-wrap; }
.diff-val.removed { color: var(--danger); text-decoration: line-through; text-decoration-thickness: 1px; }
.diff-val.added   { color: var(--success); font-weight: 600; }

/* Collapsible raw JSON fallback */
.diff-raw summary {
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-3);
    user-select: none;
    margin-bottom: 10px;
}
.diff-raw summary:hover { color: var(--text-2); }
