/* Adapt to the space available to the form, including embedded documents. */
.structured-fields,.form-flex{container-type:inline-size;container-name:form-content}
.structured-fields .form-block{max-width:100%;overflow-wrap:anywhere}
.structured-fields .form-section-heading{flex-wrap:wrap;gap:10px}
.structured-fields .form-section-heading>h3{min-width:0;overflow-wrap:anywhere}
.structured-fields .form-section-heading>div{flex-wrap:wrap;min-width:0}
.structured-fields .form-instruction p{overflow-wrap:anywhere}
.structured-fields .form-table-scroll{width:100%;max-width:100%;box-sizing:border-box;overscroll-behavior-x:contain}
@container form-content (max-width:900px){
 .form-flex>.form-block:not(.form-container)[data-form-width=quarter]{width:calc((100% - var(--form-gap,16px)) / 2)}
}
@container form-content (max-width:620px){
 .form-flex{flex-wrap:wrap!important}
 .form-flex>.form-block:not(.form-container):not([data-form-width=custom]){flex-basis:100%!important;width:100%!important;min-width:0!important}
 .form-section-heading>div{justify-content:flex-start}
}
/* Preview controls are outside the simulated viewport. */
.form-device-preview[hidden],.form-builder-preview[hidden],.form-builder-inspector[hidden]{display:none!important}
.form-builder-dialog.is-testing .form-builder-stage{max-width:none}
.form-builder-dialog .form-builder-stage{scroll-margin-top:86px}
.form-device-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid var(--form-line);background:var(--form-input)}
.form-device-presets,.form-device-custom{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}
.form-builder-dialog .form-device-toolbar button{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 10px;font-size:12px;font-weight:500;min-height:36px;background:transparent;border-color:transparent}
.form-device-toolbar svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}
.form-builder-dialog .form-device-toolbar button[aria-pressed=true]{background:var(--form-hover);border-color:var(--form-line)}
.form-builder-dialog .form-device-custom label{display:flex;flex-direction:row;align-items:center;gap:6px;font-size:11px;font-weight:500;color:var(--form-muted)}
.form-builder-dialog .form-device-custom input{width:76px;min-height:34px;padding:6px 8px;font-size:12px}
.form-device-status{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 20px;padding:9px 16px;color:var(--form-muted);font-size:11px;background:var(--form-hover)}
.form-device-status output{font-variant-numeric:tabular-nums;white-space:nowrap}
.form-device-viewport{box-sizing:border-box;overflow:auto;max-height:calc(100dvh - 330px);min-height:240px;padding:16px;background:var(--form-hover);overscroll-behavior:contain;scrollbar-gutter:stable;overflow-anchor:none}
.form-device-screen{position:relative;margin:0 auto;border-radius:9px;box-shadow:0 2px 18px #0002;overflow:hidden;background:var(--form-input)}
.form-device-screen iframe{position:absolute;left:0;top:0;display:block;max-width:none;border:0;transform-origin:top left;background:var(--form-input)}
@media(max-width:760px){.form-device-toolbar{padding:10px;gap:10px}.form-builder-dialog .form-device-toolbar button{padding:8px;font-size:11px}.form-device-presets{gap:2px}.form-device-custom{gap:5px}.form-device-status{padding:9px 10px}.form-device-status>span{display:none}.form-device-viewport{max-height:65dvh}}
