/* One shared row for application tabs/actions and window controls. */
.window > .window-content { display: flex; flex-direction: column; overflow: hidden; }
.window-content > .window-titlebar { min-height: 36px; height: 36px; flex: 0 0 36px; background: #e5edf7; align-items: stretch; border-bottom: 1px solid #dfe8f3; }
.window-toolbar-slot { flex: 1; min-width: 0; display: flex; align-items: stretch; overflow: hidden; }
.window-controls { flex: 0 0 auto; height: 36px; margin-left: auto; }
.window-controls button { width: 40px; }
.window-toolbar-slot > .browser-tabs,.window-toolbar-slot > .fs-tabs { flex: 1; min-width: 0; background: transparent; border: 0; margin: 0; }
.window-toolbar-slot .browser-tabs { padding-right: 36px; }
.window-toolbar-slot > :is(.notes-toolbar,.calculator-heading,.focus-tabs,.calendar-toolbar,.settings-heading,.store-top,.web-tool-bar) { display: flex; flex-wrap: nowrap; align-items: center; flex: 1; min-width: 0; gap: 12px; padding: 0 14px; margin: 0; border: 0; background: transparent; }
.window-toolbar-slot > .focus-tabs { flex: 0 1 auto; gap: 3px; padding: 4px 10px; }
.window-toolbar-slot :is(h1,h2) { font-size: 14px; margin: 0; white-space: nowrap; }
.window-toolbar-slot :is(.settings-heading,.store-top) p,.window-toolbar-slot .settings-logo,.window-toolbar-slot > .calculator-heading > .icon { display: none; }
.window-toolbar-slot .search-field { min-height: 30px; min-width: 0; width: min(190px,40%); padding: 4px 8px; }.window-toolbar-slot .search-field input { min-width: 0; width: 100%; }
.window-toolbar-slot .focus-tabs button { padding: 8px 10px; white-space: nowrap; }
.window-toolbar-slot .notes-toolbar { height: auto; }
.window-toolbar-slot .web-tool-bar a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-content > :is(.web-browser,.file-manager,.notes-shell,.calculator-shell,.focus-shell,.calendar-shell,.settings-shell,.store-shell,.web-tool) { flex: 1; min-height: 0; height: auto; }
.window-content > :is(.calculator-shell,.focus-shell,.calendar-shell,.settings-shell,.store-shell,.notes-shell) { overflow: auto; }
.window-content > .web-browser { min-height: 0; }
html[data-ui=touch] .window-content > .window-titlebar { height: 44px; min-height: 44px; flex-basis: 44px; justify-content: start; background: #eaf1fa; touch-action: pan-x; }
html[data-ui=touch] .window-controls { display: flex; height: 44px; }
html[data-ui=touch] .window-controls button { width: 32px; }
html[data-ui=touch] .window-controls [data-window-action=maximize] { display: none; }
html[data-ui=touch] .window-controls [data-window-action=minimize] { display:grid; place-items:center; width:38px; min-width:38px; }
html[data-ui=touch] .window-controls [data-window-action=close] { display:grid; width:42px; min-width:42px; }
html[data-ui=touch] .window-toolbar-slot .browser-tabs { padding-right:0; }
html[data-ui=touch] .window-toolbar-slot > :is(.notes-toolbar,.calculator-heading,.calendar-toolbar,.settings-heading,.store-top,.web-tool-bar) { padding: 0 10px; gap: 6px; }
@media(max-width:520px) { .window-toolbar-slot .store-top .search-field { width: 120px; }.window-toolbar-slot .store-top h1 { font-size: 12px; }.window-toolbar-slot .calendar-toolbar h2 { font-size: 12px; }.window-toolbar-slot .calendar-toolbar { gap: 4px; }.window-toolbar-slot .notes-toolbar { font-size: 11px; } }

/* Packaged tools can opt into a single, seamless application bar. Their own
   first row remains visible while these real PiscesOS controls occupy its end. */
.seamless-frame-window > .window-content { position:relative; }
.seamless-frame-window .window-content > .window-titlebar {
  position:absolute; z-index:20; top:0; right:0; width:120px;
  min-height:52px; height:52px; background:#202329; border:0;
}
.seamless-frame-window .window-toolbar-slot { display:none; }
.seamless-frame-window .window-controls { height:52px; color:#a4acb9; }
.seamless-frame-window .window-controls button { width:40px; color:#a4acb9; }
.seamless-frame-window .window-controls button:hover { background:#383f49; color:#fff; }
.seamless-frame-window .window-controls .close-window:hover { background:#e64e58; }
.seamless-frame-window .web-tool,.seamless-frame-window .web-tool iframe { min-height:0; height:100%; }
html[data-ui=touch] .seamless-frame-window .window-content > .window-titlebar {
  width:80px; min-height:52px; height:52px; background:#202329; border:0;
}
html[data-ui=touch] .seamless-frame-window .window-controls { height:52px; }
