/* Formulier-editor */

.editor-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 1000px) {
    .editor-layout {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    }
    .md-pane {
        position: sticky;
        top: 1rem;
    }
}

.element-card {
    border-left: 4px solid var(--primary);
}

.element-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
}

.element-kind {
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .04em;
}

.element-head .spacer {
    flex: 1;
}

.move-btns {
    display: inline-flex;
    gap: .25rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: .25rem .55rem;
    font-size: .85rem;
}

.add-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

.add-row select {
    flex: 1;
    min-width: 12rem;
}

.field {
    margin-bottom: .75rem;
}

.field > label {
    font-size: .9rem;
}

.el-config {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1rem 0;
    margin: 0 0 .75rem;
}

.el-config legend {
    font-weight: 600;
    font-size: .9rem;
    padding: 0 .35rem;
}

.check-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.check {
    display: flex;
    align-items: center;
    font-weight: 400;
}

.num-pair {
    display: flex;
    gap: .5rem;
}

.num-pair input {
    width: 6rem;
}

.list-editor {
    margin-bottom: .75rem;
}

.list-editor > label {
    font-size: .9rem;
}

.opt-row {
    display: flex;
    gap: .35rem;
    align-items: center;
    margin: .3rem 0;
}

.opt-row input {
    flex: 1;
    min-width: 0;
}

.md-card .md-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .5rem;
}

.md-actions {
    display: inline-flex;
    gap: .35rem;
}

#md-output {
    max-height: 26rem;
    overflow: auto;
    margin: 0;
    font-size: .85rem;
}

#create-form button[type="submit"] {
    width: 100%;
    margin-bottom: .5rem;
}

#create-form .btn-secondary {
    width: 100%;
    text-align: center;
    display: block;
}

#create-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .element-head {
        align-items: stretch;
        flex-direction: column;
    }
    .element-head .spacer {
        display: none;
    }
    .move-btns {
        justify-content: flex-start;
    }
    .opt-row {
        flex-wrap: wrap;
    }
    .opt-row input {
        flex: 1 1 100%;
    }
    .num-pair input {
        flex: 1;
        width: auto;
    }
}
