/* Shared JSON editor (Components/Shared/JsonEditor.razor) — one card that looks like a code panel
   in both themes. Cache-busted by hand in App.razor (?v=N). */
.fc-json-editor {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.fc-json-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 2px 0 6px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.fc-json-label {
    font-weight: 600;
    min-width: 0;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
}

.fc-json-state {
    font-size: 0.68rem;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.fc-json-state-valid {
    color: var(--mud-palette-success);
    background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent);
}

.fc-json-state-invalid {
    color: var(--mud-palette-error);
    background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent);
}

.fc-json-spacer {
    flex: 1 1 auto;
}

.fc-json-editor .fc-json-action.mud-icon-button {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 6px;
    color: var(--mud-palette-text-secondary);
}

.fc-json-editor .fc-json-action.mud-icon-button:hover {
    color: var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
}

.fc-json-surface {
    position: relative;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    overflow: hidden;
    background: var(--mud-palette-surface);
}

.fc-json-editor-invalid .fc-json-surface {
    border-color: var(--mud-palette-error);
}

.fc-json-monaco,
.fc-json-surface .monaco-editor,
.fc-json-surface .monaco-editor .overflow-guard {
    width: 100%;
    height: 100% !important;
}

.fc-json-message {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--mud-palette-text-secondary);
    padding: 0 4px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    word-break: break-word;
}

.fc-json-message-error {
    color: var(--mud-palette-error);
}

/* The action row of a node editor is tight; drop the label row's padding there. */
.wf-editor .fc-json-toolbar {
    padding-left: 0;
}
