/* PBS shared top-toolbar geometry and density contract.
   Graphical Editor and Table Editor both consume this file. Change panel/icon geometry here. */
:root{
  --pbs-top-toolbar-bg:#3f3f46;
  --pbs-top-toolbar-border-top:#5b5b63;
  --pbs-top-toolbar-border-bottom:#2c2c31;
  --pbs-top-toolbar-side-zone:88px;
  --pbs-top-toolbar-small-height:34px;
  --pbs-top-toolbar-large-height:66px;
  --pbs-top-toolbar-labeled-height:96px;
  --pbs-top-toolbar-small-box:28px;
  --pbs-top-toolbar-large-box:56px;
  --pbs-top-toolbar-small-radius:4px;
  --pbs-top-toolbar-large-radius:8px;
  --pbs-top-toolbar-label-width:96px;
  --pbs-top-toolbar-height:var(--pbs-top-toolbar-small-height);
}
.top-toolbar{
  display:grid;
  grid-template-columns:var(--pbs-top-toolbar-side-zone) minmax(0,1fr) var(--pbs-top-toolbar-side-zone);
  gap:0;
  align-items:start;
  height:var(--pbs-top-toolbar-height);
  min-height:var(--pbs-top-toolbar-height);
  max-height:var(--pbs-top-toolbar-height);
  background:var(--pbs-top-toolbar-bg)!important;
  color:#fff;
  border-top:1px solid var(--pbs-top-toolbar-border-top);
  border-bottom:1px solid var(--pbs-top-toolbar-border-bottom);
  position:relative;
  z-index:40;
  box-sizing:border-box;
}
.top-toolbar-zone{height:calc(var(--pbs-top-toolbar-height) - 2px);min-height:0;box-sizing:border-box;display:flex;align-items:flex-start}
.top-toolbar--small{--pbs-top-toolbar-height:var(--pbs-top-toolbar-small-height)}
.top-toolbar--large{--pbs-top-toolbar-height:var(--pbs-top-toolbar-large-height)}
.top-toolbar--labeled{--pbs-top-toolbar-height:var(--pbs-top-toolbar-labeled-height)}
.top-toolbar--small .top-toolbar-zone{padding:2px 6px}
.top-toolbar--large .top-toolbar-zone,.top-toolbar--labeled .top-toolbar-zone{padding:4px 8px}
.top-toolbar-zone-left,.top-toolbar-zone-right{gap:8px;justify-content:center}
.top-toolbar--large .top-toolbar-zone-left,.top-toolbar--large .top-toolbar-zone-right,
.top-toolbar--labeled .top-toolbar-zone-left,.top-toolbar--labeled .top-toolbar-zone-right{gap:10px}
.top-toolbar-zone-center{padding-left:6px!important;padding-right:6px!important;min-width:0}
.toolbar-tools{display:flex!important;flex-wrap:wrap!important;gap:0!important;align-items:flex-start!important;align-content:flex-start!important;min-width:0;width:100%;flex:1 1 auto;padding:0}
.tool-group{display:flex;align-items:flex-start;gap:4px;flex:0 0 auto}
.top-toolbar--large .tool-group,.top-toolbar--labeled .tool-group{gap:8px}
.tool-group-separator{width:1px;height:28px;margin:0 8px;background:#808080;opacity:1;align-self:flex-start;flex:0 0 1px}
.top-toolbar--large .tool-group-separator,.top-toolbar--labeled .tool-group-separator{height:56px;margin:0 12px}
.top-tool{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;background:transparent;border:0;padding:0;cursor:pointer;color:var(--tool-color,var(--mode-color,#9ca3af));flex:0 0 auto;transition:opacity .12s ease;font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif}
.top-tool-box{width:var(--pbs-top-toolbar-small-box);height:var(--pbs-top-toolbar-small-box);border:1px solid currentColor;border-radius:var(--pbs-top-toolbar-small-radius);background:transparent;display:grid;place-items:center;font:400 11px/1 "Segoe UI",Tahoma,Geneva,Verdana,sans-serif;box-sizing:border-box;overflow:hidden}
.top-tool-symbol{display:grid;place-items:center;line-height:1;text-align:center;white-space:pre;font-weight:400;font-size:22px;width:100%;height:100%}
.top-tool-symbol svg{display:block;width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.top-tool-symbol text{fill:currentColor;stroke:none}
.top-tool-label{display:none;max-width:var(--pbs-top-toolbar-label-width);font:400 11px/1.15 "Segoe UI",Tahoma,Geneva,Verdana,sans-serif;text-align:center;color:#fff;white-space:normal}
.top-tool:not(.is-disabled):hover .top-tool-box{background:color-mix(in srgb,var(--tool-color) 22.5%,transparent)}
.top-tool.active{color:var(--tool-active-color,var(--tool-color,var(--mode-color,#9ca3af)))}
.top-tool.active .top-tool-box{background:var(--tool-active-bg,color-mix(in srgb,var(--tool-color) 45%,transparent));box-shadow:0 0 0 1px color-mix(in srgb,var(--tool-active-color,var(--tool-color)) 75%,#fff 25%) inset}
.top-tool.is-disabled{opacity:.35;cursor:default}
.top-tool.is-dummy{opacity:.85}
.top-toolbar--large .top-tool-box,.top-toolbar--labeled .top-tool-box{width:var(--pbs-top-toolbar-large-box);height:var(--pbs-top-toolbar-large-box);border-radius:var(--pbs-top-toolbar-large-radius);font-size:20px}
.top-toolbar--large .top-tool-symbol svg,.top-toolbar--labeled .top-tool-symbol svg{width:54px;height:54px}
.top-toolbar--large .top-tool-symbol,.top-toolbar--labeled .top-tool-symbol{font-size:40px}
.top-toolbar--labeled .top-tool-label{display:block}
.top-toolbar-ghost{width:28px;height:28px;border:0;background:transparent;color:#fff;font:800 22px/1 "Segoe UI Symbol","Segoe UI",sans-serif;display:grid;place-items:center;cursor:pointer;padding:0;border-radius:6px;box-sizing:border-box}
.top-toolbar-ghost:hover{background:rgba(255,255,255,.1)}
.top-toolbar-ghost.undo-redo{width:28px;height:28px;padding:0;display:flex;align-items:center;justify-content:center}
.top-toolbar-ghost.undo-redo svg{width:28px;height:28px;display:block;fill:none;stroke:currentColor;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.top-toolbar--large .top-toolbar-ghost.undo-redo,.top-toolbar--labeled .top-toolbar-ghost.undo-redo{width:28px;height:28px}
.top-toolbar--large .top-toolbar-ghost.undo-redo svg,.top-toolbar--labeled .top-toolbar-ghost.undo-redo svg{width:28px;height:28px;stroke-width:3.5}
.toolbar-size-toggle{overflow:visible!important}
.toolbar-density-icon{width:28px;height:28px;display:block;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.55}
.toolbar-density-icon .density-small{stroke:currentColor;fill:none}
.toolbar-density-icon .density-filled{fill:currentColor;stroke:currentColor}
.toolbar-density-icon .density-faded{opacity:.35}
.toolbar-density-icon .density-label{fill:currentColor;stroke:none;font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif;font-size:10.4px;font-weight:400;letter-spacing:0}
/* Table-only input tool: its height follows the same density box, while width may grow for a numeric field. */
.table-toolbar-field-tool .top-tool-box{width:132px;grid-template-columns:auto minmax(0,1fr);gap:5px;padding:0 5px}
.top-toolbar--large .table-toolbar-field-tool .top-tool-box,.top-toolbar--labeled .table-toolbar-field-tool .top-tool-box{width:180px;padding:0 8px;gap:8px}
.table-toolbar-field-symbol{font-style:italic;font-weight:700;font-size:14px}
.top-toolbar--large .table-toolbar-field-symbol,.top-toolbar--labeled .table-toolbar-field-symbol{font-size:22px}
.table-toolbar-field-shell{display:flex;align-items:center;gap:3px;min-width:0}
.table-toolbar-field-shell input{width:66px;min-width:0;height:20px;border:1px solid currentColor;border-radius:3px;background:#fff;color:#111;text-align:right;padding:0 4px;font:600 12px/1 "Segoe UI",Tahoma,Geneva,Verdana,sans-serif;box-sizing:border-box}
.top-toolbar--large .table-toolbar-field-shell input,.top-toolbar--labeled .table-toolbar-field-shell input{width:92px;height:30px;font-size:15px}
.table-toolbar-field-shell .unit{font:600 10px/1 "Segoe UI",Tahoma,Geneva,Verdana,sans-serif;color:#fff}
.top-toolbar--large .table-toolbar-field-shell .unit,.top-toolbar--labeled .table-toolbar-field-shell .unit{font-size:12px}
/* Parent Tables workspace consumes the shared toolbar height. Graphical workspace has its own layout. */
body:not(.editor-drawings) .workspace{height:calc(100vh - var(--header-h) - var(--pbs-top-toolbar-height))!important}
body.editor-drawings .table-top-toolbar{display:none!important}
body.editor-drawings .workspace{height:calc(100vh - var(--header-h))!important}
@media(max-width:850px){.top-toolbar{overflow-x:auto}.top-toolbar-zone-center{min-width:max-content}}
@media(prefers-reduced-motion:reduce){.top-tool{transition:none}}
