/* a2ui containers: the window and pane geometry of containers.js. Colours come from the
   app's tokens (--card-bg, --fg, --border, --radius-sm, --elevation), with system colours
   as the fallback, so the same window looks like the app it opens in. */

[data-a2-desk] { position: relative; }

.a2-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: min(320px, 100%);
  min-height: min(180px, 100%);
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  resize: both;
  background: var(--card-bg, Canvas);
  color: var(--fg, CanvasText);
  border: 1px solid var(--border, GrayText);
  border-radius: var(--radius-sm, 10px);
  box-shadow: var(--elevation, 0 12px 40px rgba(20, 30, 45, .25));
}
.a2-window.a2-min { display: none; }

.a2-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 6px 0 12px;
  border-bottom: 1px solid var(--border, GrayText);
  cursor: move;
  user-select: none;
  touch-action: none;
}
.a2-window-bar b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.a2-window-bar a,
.a2-window-bar button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.a2-window-body { flex: 1; min-height: 0; overflow: auto; }
.a2-window-body > iframe { display: block; width: 100%; height: 100%; border: 0; }

/* A pane scrolls inside its plane and never widens it. */
[data-a2-pane] { min-width: 0; min-height: 0; overflow: auto; }
