.document-editor {
    --editor-accent: #10b981;
    --editor-accent-dark: #0ea271;
    --editor-accent-soft: #ecfdf5;
    --editor-border: #dce5ee;
    --editor-muted: #7d8ca3;
    --editor-text: #172033;
    max-width: 1380px;
}

.document-editor__title {
    margin-bottom: .4rem;
}

.document-editor__form {
    overflow: hidden;
}

.document-editor__body {
    display: grid;
    gap: 1.35rem;
    padding: 1.55rem 1.75rem;
}

.document-editor__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(180px, .9fr) minmax(320px, 1.55fr) minmax(150px, .6fr) minmax(150px, .6fr);
}

.document-editor__field {
    display: grid;
    gap: .42rem;
}

.document-editor__field--wide {
    grid-column: 1 / -1;
}

.document-editor__label {
    color: #344154;
    font-size: .92rem;
    font-weight: 800;
}

.document-editor__control {
    background: #fff;
    border: 1px solid #cfd9e6;
    border-radius: 8px;
    color: #344154;
    min-height: 42px;
    outline: 0;
    padding: .62rem .82rem;
    width: 100%;
}

.document-editor__control::placeholder {
    color: #9aa8ba;
}

.document-editor__control:focus {
    border-color: var(--editor-accent);
    box-shadow: 0 0 0 .2rem rgba(16, 185, 129, .12);
}

.document-editor__content {
    display: grid;
    gap: .55rem;
}

.document-editor__textarea {
    min-height: 560px;
    resize: vertical;
}

.document-editor .tox-tinymce {
    border-color: #cfd9e6;
    border-radius: 8px;
}

.document-editor .tox .tox-toolbar,
.document-editor .tox .tox-toolbar__primary,
.document-editor .tox .tox-toolbar__overflow {
    background: #fbfcfe;
}

.document-editor__switch {
    align-items: center;
    color: #344154;
    display: inline-flex;
    font-weight: 800;
    gap: .55rem;
}

.document-editor__switch input {
    height: 18px;
    width: 18px;
}

.document-editor__footer {
    align-items: center;
    background: #fbfcfe;
    border-top: 1px solid var(--editor-border);
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.75rem;
}

.document-editor__meta {
    color: var(--editor-muted);
    font-size: .86rem;
    font-weight: 700;
}

.document-editor__variables {
    padding: 0;
}

.document-editor__variables-header {
    align-items: center;
    background: #fbfcfe;
    border-bottom: 1px solid var(--editor-border);
    color: #344154;
    display: flex;
    font-weight: 900;
    gap: .55rem;
    padding: 1.05rem 1.55rem;
}

.document-editor__variables-body {
    display: grid;
    gap: 1.1rem;
    padding: 1.35rem 1.55rem 1.55rem;
}

.document-editor__variables-body p {
    margin: 0;
}

.document-editor__tag-list {
    background: #f8fafc;
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    padding: 1.1rem;
}

.document-editor__tag {
    background: transparent;
    border: 0;
    color: #ec4899;
    cursor: pointer;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .96rem;
    font-weight: 800;
    padding: 0;
}

.document-editor__tag:hover,
.document-editor__tag:focus {
    color: #be185d;
    outline: 0;
    text-decoration: underline;
}

@media (max-width: 1199.98px) {
    .document-editor__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .document-editor__body,
    .document-editor__footer,
    .document-editor__variables-body,
    .document-editor__variables-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .document-editor__grid {
        grid-template-columns: 1fr;
    }

    .document-editor__footer {
        align-items: stretch;
        flex-direction: column;
        gap: .9rem;
    }
}
