/* A20 approved compact panel. A14 typography and A17 colours are retained. */
.element-properties,.element-properties-empty{position:absolute;right:126px;top:var(--element-toolbar-height,41px);z-index:27;width:286px;max-height:calc(100% - var(--element-toolbar-height,41px));box-sizing:border-box;border:1px solid #8396a5;border-radius:3px;background:#f0f3f7;color:#344b5e;font:12px/1.45 Arial,sans-serif;box-shadow:0 4px 14px #25465a18;overflow:auto}
.element-properties[hidden],.element-properties-empty[hidden],.element-properties [hidden]{display:none!important}
.element-properties>header{display:flex;align-items:center;justify-content:space-between;padding:7px 9px;border-bottom:1px solid #c3cfd8;gap:5px}.element-properties>header strong{font-size:12px}
.element-properties button,.element-properties select,.element-properties input:not([type=checkbox]){font:12px Arial,sans-serif;min-height:30px;border:1px solid #8396a5;border-radius:3px;padding:4px 7px;background:white;color:#344b5e;box-sizing:border-box}.element-properties button{cursor:pointer}.element-properties button.active{background:#e2edf5;color:#204e69;border-color:#63829b}.element-properties button:disabled{color:#8b97a2;background:#eef1f4}.element-properties>header button{min-height:25px;padding:1px 6px}
.element-properties-body{padding:9px;min-width:0}.element-properties-body #selection{font:12px/1.45 Arial,sans-serif;margin:0;background:transparent!important;border:0!important;padding:0!important;color:#344b5e!important}.element-properties-body #selection>strong{display:block;font-size:12px;margin:0 0 8px}.element-properties-body .selection-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:0}.element-properties-body .selection-actions button{white-space:normal;line-height:1.3}.element-properties-body #selection :is(strong,button){font-size:12px!important;color:#344b5e!important}.element-properties-body #selection button{min-height:30px!important;background:#fff!important;border:1px solid #8396a5!important}.element-properties-body #selection button.active{background:#e2edf5!important;color:#204e69!important;border-color:#63829b!important}
.element-properties-body .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0}.element-properties-body .field{font:12px/1.4 Arial,sans-serif;min-width:0}.element-properties-body .field :is(input,select){width:100%;min-width:0}.element-properties-body .field.check{display:flex;align-items:center;gap:5px}.element-properties-body .field.check input{width:auto}.element-properties-body .funnel-card{margin:0;padding:0;border:0;background:none}.element-properties-body .funnel-title{display:flex;align-items:center;justify-content:space-between;font-weight:600;gap:6px}.element-properties-empty{width:248px;padding:9px 11px}.element-properties-empty strong{display:block;margin-bottom:3px}.element-properties-empty p{margin:0}.element-placement-fields{display:grid;gap:8px}
.element-funnel-list{display:grid;gap:5px}.element-funnel-list button{min-height:30px;text-align:left;border:1px solid #8396a5;border-radius:3px;padding:5px 7px;background:white;color:#344b5e;font:12px Arial,sans-serif}.element-funnel-list button[aria-pressed=true]{background:#e2edf5;border-color:#63829b}.properties-selected{stroke:#294e64!important;stroke-width:3px!important}

.system-properties {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #ccd6df;
  background: #f5f7f9;
}
.system-properties :is(.element-properties,.element-properties-empty) {
  position: static;
  width: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.system-properties .element-properties-body .field { font-size: 11px; margin: 0; }
.system-properties .element-properties-body #selection .selection-actions { display: grid; margin-top: 0; }
.system-properties #selection .selection-actions button:only-child { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .system-properties .element-properties-body #selection .selection-actions { grid-template-columns: minmax(0, 1fr); }
}

/* The companion pane can be narrower than 1024 px: keep the eight native
   utility tools in a fixed 4-by-2 group, rather than clipping the final tool. */
@media(max-width:1023px){body.element-properties-ui .adaptive-toolbar .ribbon-edit .tools{display:grid!important;grid-template-columns:repeat(4,max-content);gap:4px}}

/* The gutter plan has one rail. Only a selected element needs an editor. */
body.gutter-workbench.layout-workbench.compact-workbench .facade-workspace {
  --layout-lines-width: 0px;
  --layout-figures-width: clamp(112px, 13vw, 174px);
}
body.gutter-workbench.layout-workbench.compact-workbench #drawing { margin: auto auto 0 0 !important; }
.gutter-workbench.compact-workbench .figure-palette .shape-buttons {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); flex: 0 0 auto;
  gap: 4px; padding: 5px;
}
.gutter-workbench.compact-workbench .figure-palette .shape-buttons button {
  height: 34px; min-height: 34px; padding: 1px; justify-content: center;
}
.gutter-workbench .figure-palette .shape-icon svg { width: 34px; height: 26px; }
.gutter-rail-sections { flex: 1; min-height: 0; overflow: auto; }
.gutter-rail-sections .element-properties { position: static; width: 100%; max-height: none; box-shadow: none; }
.gutter-rail-sections .element-properties-body .fields { grid-template-columns: 1fr; }
.gutter-rail-sections #gutter-inspection { display: block; padding: 6px; }
.gutter-rail-sections #gutter-inspection[hidden] { display: none; }
.gutter-rail-sections #gutter-edge-count { display: block; margin-bottom: 5px; }
.gutter-rail-sections #gutter-inspection-edges { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; overflow: visible; }
.gutter-rail-sections #gutter-inspection-edges button { padding: 2px; min-width: 0; }
.gutter-rail-sections #gutter-inspection p { margin-top: 5px; overflow-wrap: anywhere; max-height: none; }

body.vf-workbench.layout-workbench.compact-workbench .facade-workspace {
  --layout-lines-width: 0px;
  --layout-figures-width: clamp(146px, 15vw, 196px);
}
body.vf-workbench.compact-workbench #drawing { margin: auto auto 0 0 !important; }
.vf-rail-sections { flex: 1; min-height: 0; overflow: auto; }
.vf-element-tools { display: grid; gap: 4px; padding: 6px; }
.vf-element-tools button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 6px; background: #fff; color: #254d64; border: 1px solid #bac8d2; border-radius: 3px; font: 12px/1.3 Arial,sans-serif; cursor:pointer; }
.vf-element-tools button[aria-pressed=true] { background:#dcecf2; border-color:#50778c; }
.vf-element-tools svg { width:16px; height:16px; flex:none; }
.vf-rail-sections :is(.element-properties,.element-properties-empty) { box-sizing:border-box; position:static; width:100%; max-height:none; box-shadow:none; border-inline:0; border-radius:0; }
.vf-rail-sections .element-placement-fields :is(select,input) { max-width:100%; }
.vf-figures { border-top:1px solid #ccd6df; }
.vf-figures summary { padding:6px 9px; font:600 12px Arial,sans-serif; cursor:pointer; }
.vf-workbench.compact-workbench .vf-figures .shape-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:4px; gap:4px; }
.vf-workbench.compact-workbench .vf-figures .shape-buttons button { height:30px; min-height:30px; padding:1px; justify-content:center; }
.vf-figures .shape-buttons svg { width:32px; height:24px; }
