.nwc-app .nwc-message-mutation-dialog {
    box-sizing: border-box;
    inline-size: min(calc(100% - 1.5rem), 29rem);
    max-inline-size: none;
    max-block-size: calc(100% - 1.5rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #715167;
    border-radius: 1.05rem;
    color: #fff3fa;
    background: #2a2029;
    color-scheme: dark;
}

.nwc-app .nwc-message-mutation-dialog:not([open]) { display: none; }
.nwc-app .nwc-message-mutation-dialog::backdrop { background: #100c12bb; }

.nwc-app .nwc-message-mutation-dialog[data-fallback][open] {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    inline-size: 100%;
    block-size: 100%;
    max-block-size: none;
    padding: .75rem;
    border: 0;
    border-radius: 0;
    background: #100c12d9;
}

.nwc-app .nwc-message-mutation-panel,
.nwc-app .nwc-message-mutation-form,
.nwc-app .nwc-message-mutation-edit {
    min-inline-size: 0;
    display: grid;
}

.nwc-app .nwc-message-mutation-panel {
    box-sizing: border-box;
    gap: .72rem;
    padding: clamp(.85rem, 3.6vw, 1.25rem);
}

.nwc-app .nwc-message-mutation-dialog[data-fallback] .nwc-message-mutation-panel {
    inline-size: min(100%, 29rem);
    max-block-size: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #715167;
    border-radius: 1.05rem;
    background: #2a2029;
}

.nwc-app .nwc-message-mutation-title {
    margin: 0;
    font-size: 1.13rem;
    font-weight: 700;
    line-height: 1.3;
}

.nwc-app .nwc-message-mutation-notice,
.nwc-app .nwc-message-mutation-status {
    margin: 0;
    color: #e9d0df;
    font-size: .88rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.nwc-app .nwc-message-mutation-form { gap: .65rem; }
.nwc-app .nwc-message-mutation-edit { gap: .4rem; }
.nwc-app .nwc-message-mutation-label { font-size: .87rem; font-weight: 650; }

.nwc-app .nwc-message-mutation-text {
    box-sizing: border-box;
    inline-size: 100%;
    min-inline-size: 0;
    max-block-size: min(14rem, 42vh);
    padding: .56rem .67rem;
    border: 1px solid #7d5c71;
    border-radius: .65rem;
    color: #fff1f8;
    background: #372733;
    font: 400 1rem/1.4 system-ui, sans-serif;
    resize: vertical;
    overflow-wrap: anywhere;
}

.nwc-app .nwc-message-mutation-text[aria-invalid="true"] { border-color: #ff9ebc; }

.nwc-app .nwc-message-mutation-count {
    margin: 0;
    color: #ddc6d4;
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-align: end;
}

.nwc-app .nwc-message-mutation-status:empty { position: absolute; }
.nwc-app .nwc-message-mutation-status[data-error],
.nwc-app .nwc-message-mutation-count[data-error] { color: #ffb5cc; }

.nwc-app .nwc-message-mutation-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: stretch;
}

.nwc-app .nwc-message-mutation-actions button {
    box-sizing: border-box;
    min-block-size: 44px;
    padding: .49rem .66rem;
    border: 1px solid #78506b;
    border-radius: .65rem;
    color: #fff4fa;
    background: #503248;
    font: 650 .87rem/1.2 system-ui, sans-serif;
}

.nwc-app .nwc-message-mutation-actions .nwc-message-mutation-submit {
    margin-inline-start: .48rem;
    background: #833358;
}

.nwc-app .nwc-message-mutation-dialog[data-mode="recall"] .nwc-message-mutation-submit {
    border-color: #bd617f;
    background: #892d4b;
}

.nwc-app .nwc-message-mutation-actions button:not(:disabled):hover { filter: brightness(1.16); }
.nwc-app .nwc-message-mutation-actions button:disabled { opacity: .56; }
.nwc-app .nwc-message-mutation-dialog button:focus,
.nwc-app .nwc-message-mutation-dialog textarea:focus { outline: 2px solid #ffc4e0; outline-offset: 2px; }
.nwc-app .nwc-message-mutation-dialog [hidden] { display: none; }
.nwc-app .nwc-message-edited {
    color: #d7aebf;
    font-size: .72rem;
    white-space: nowrap;
}

.nwc-app .nwc-recalled-message {
    color: #debdcb;
    font-style: italic;
}

.nwc-app .nwc-message-action[data-nwchat-message-action="recall"] {
    color: #ffb8cc;
}
