/* Payload editor of the Send App Webhook node — settings-panel layout.
   Each field is its own inset card (name + type on top, value under it, help at the bottom) so a long
   value never blurs into the next setting. Branch headers separate the groups the contract declares. */

.wf-payload-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wf-field-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wf-field-block,
.wf-field-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 9px 11px 10px;
    background: color-mix(in srgb, var(--mud-palette-surface, #fff) 94%, var(--mud-palette-text-primary, #000));
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-primary, #000) 12%, transparent);
    border-radius: 8px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.wf-field-card:hover {
    border-color: color-mix(in srgb, var(--mud-palette-text-primary, #000) 24%, transparent);
}

.wf-field-card:focus-within,
.wf-field-block:focus-within {
    border-color: var(--mud-palette-primary, #594ae2);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mud-palette-primary, #594ae2) 40%, transparent);
}

.wf-field-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}

.wf-field-card-name {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* The message line is prose, not a path: keep its heading in the UI font. */
.wf-field-card-name--plain {
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.wf-field-kind {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
}

.wf-field-flag {
    padding: 0 5px;
    font-size: 10px;
    line-height: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-error, #d32f2f);
    border: 1px solid color-mix(in srgb, var(--mud-palette-error, #d32f2f) 45%, transparent);
    border-radius: 999px;
}

.wf-field-card-spacer {
    flex: 1 1 auto;
}

.wf-field-card-body .mud-input-control {
    margin-top: 0;
}

.wf-field-card-body .mud-input-root {
    font-size: 0.82rem;
}

.wf-field-card-help {
    font-size: 0.7rem;
    line-height: 1.4;
    opacity: 0.65;
}

/* ── a branch (object / array item) header ─────────────────────────────── */

.wf-field-group {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 2px 2px 2px 0;
}

.wf-field-group + .wf-field-card {
    margin-top: -2px;
}

.wf-field-group-name {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.9;
}

.wf-field-group .mud-icon-button {
    margin: 0;
}
