/* jsondiffpatch html formatter, themed. Base layout comes from its own stylesheet. */
.sh-json-diff-panel.mud-paper {
    padding: 12px 16px;
    overflow: auto;
    max-height: 60vh;
}

.sh-json-diff .jsondiffpatch-delta,
.sh-json-diff .jsondiffpatch-delta pre {
    font-family: var(--sh-font-mono);
    font-size: 13px;
    line-height: 1.6;
    padding-left: 0;
}

.sh-json-diff ul.jsondiffpatch-delta,
.sh-json-diff .jsondiffpatch-delta ul {
    padding-left: 20px;
}

.sh-json-diff .jsondiffpatch-added .jsondiffpatch-property-name,
.sh-json-diff .jsondiffpatch-added .jsondiffpatch-value pre,
.sh-json-diff .jsondiffpatch-modified .jsondiffpatch-right-value pre,
.sh-json-diff .jsondiffpatch-textdiff-added {
    background: color-mix(in srgb, var(--mud-palette-success) 22%, transparent);
    color: var(--mud-palette-text-primary);
    border-radius: 4px;
}

.sh-json-diff .jsondiffpatch-deleted .jsondiffpatch-property-name,
.sh-json-diff .jsondiffpatch-deleted pre,
.sh-json-diff .jsondiffpatch-modified .jsondiffpatch-left-value pre,
.sh-json-diff .jsondiffpatch-textdiff-deleted {
    background: color-mix(in srgb, var(--mud-palette-error) 22%, transparent);
    color: var(--mud-palette-text-secondary);
    border-radius: 4px;
}

.sh-json-diff .jsondiffpatch-unchanged,
.sh-json-diff .jsondiffpatch-movedestination {
    color: var(--mud-palette-text-disabled);
}

.sh-json-diff .jsondiffpatch-moved .jsondiffpatch-moved-destination {
    background: color-mix(in srgb, var(--mud-palette-warning) 22%, transparent);
    color: var(--mud-palette-text-secondary);
}

/* History dialog: version list beside the diff */
.sh-history {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.sh-history-list.mud-paper {
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px;
}

@media (max-width: 599px) {
    .sh-history {
        grid-template-columns: minmax(0, 1fr);
    }

    .sh-history-list.mud-paper {
        max-height: 180px;
    }
}
