/*
 * public/m33-static/gdoc-window.css — the Google Drive document window
 * (lib/views/htmls/shell/gdoc-window.ejs, lib/views/javascripts/shell/
 * gdoc-window.js; ADR 0082 D6, rule 10a): the desktop layer, its windows and
 * their collapsed tiles.
 *
 * Served from /m33/. Rules unchanged from the <style> block
 * lib/vega-shell-extras.js gdocModal() wrote into every desktop page.
 */

  /* NOT a modal. Documents are windows on the workspace: moved, resized,
     shrunk to icons, several at once, and Vega stays usable behind them.
     There is deliberately no backdrop and no aria-modal — nothing is blocked. */
  .m33-gdoc { position:fixed; inset:0; z-index:9000; pointer-events:none; }
  .m33-gdoc[hidden] { display:none; }
  .m33-gdoc-sheet { position:absolute; pointer-events:auto;
                    width:min(1180px,94vw); height:min(880px,92vh); background:#fff;
                    border-radius:10px; overflow:hidden; display:flex; flex-direction:column;
                    box-shadow:0 24px 70px rgba(0,0,0,.5); }
  .m33-gdoc-sheet[hidden] { display:none; }
  /* No transition while dragging — a lerping window does not track the cursor. */
  .m33-gdoc-sheet.is-moving { transition:none; will-change:left,top,width,height; }
  .m33-gdoc-bar { display:flex; align-items:center; gap:10px; padding:9px 12px;
                  background:#141821; color:#e6e9ef; flex:0 0 auto; cursor:grab;
                  user-select:none; -webkit-user-select:none;
                  font:13px/1.4 ui-sans-serif,-apple-system,system-ui,sans-serif; }
  .m33-gdoc-bar.is-grabbing { cursor:grabbing; }
  /* Buttons inside a draggable bar must not start a drag. */
  .m33-gdoc-bar button, .m33-gdoc-bar a { cursor:pointer; }
  /* Icon buttons centre an SVG, not a glyph: a text en-dash sits on the
     baseline, so it rode low in its box beside the Open in Google icon. */
  .m33-gdoc-icon { width:26px; padding:5px 0; line-height:1; display:inline-flex;
                   align-items:center; justify-content:center; }
  .m33-gdoc-logo { width:24px; height:24px; flex:0 0 auto; object-fit:contain;
                   opacity:.95; user-select:none; -webkit-user-drag:none; }
  .m33-gdoc-tool { font:600 12px/1 ui-sans-serif,-apple-system,system-ui,sans-serif;
                   letter-spacing:.01em; color:#e6e9ef; flex:0 0 auto; white-space:nowrap; }
  /* The qualifier is set quieter than the name: it explains what the window
     wraps without competing with the product it belongs to. */
  .m33-gdoc-tool-sub { margin-left:6px; font-weight:400; font-size:11px; color:#8d97a8; }
  .m33-gdoc-sep { width:1px; height:15px; background:#2c3340; flex:0 0 auto; margin:0 1px; }
  .m33-gdoc-heading { display:flex; flex-direction:column; justify-content:center;
                      min-width:0; max-width:52%; flex:0 1 auto; }
  .m33-gdoc-title { font-weight:600; white-space:nowrap; overflow:hidden;
                    text-overflow:ellipsis; }
  .m33-gdoc-meta { font-size:11px; line-height:1.35; color:#8d97a8; white-space:nowrap;
                   overflow:hidden; text-overflow:ellipsis; }
  .m33-gdoc-meta[hidden] { display:none; }
  .m33-gdoc-ext { text-decoration:none; }
  .m33-gdoc-ext[hidden] { display:none; }
  /* A flex item may shrink below its width attribute — pinned, or the icon
     collapsed to nothing and the button rendered as an empty box. */
  .m33-gdoc-icon svg { display:block; flex:0 0 14px; width:14px; height:14px; }
  .m33-gdoc-state { font:12px ui-monospace,Menlo,monospace; color:#dbb055; }
  .m33-gdoc-spacer { flex:1 1 auto; }
  .m33-gdoc-btn { flex:0 0 auto; background:transparent; color:#c6cdd8; cursor:pointer;
                  border:1px solid #39414f; border-radius:5px; padding:5px 12px; font-size:12.5px; }
  .m33-gdoc-btn:hover { border-color:#5b6577; color:#fff; }
  .m33-gdoc-save { background:#2f6f4f; border-color:#2f6f4f; color:#fff; }
  .m33-gdoc-save:hover { background:#37835d; border-color:#37835d; }
  .m33-gdoc-body { flex:1 1 auto; position:relative; min-height:0; }
  .m33-gdoc-body iframe { width:100%; height:100%; border:0; display:block; }
  .m33-gdoc-grip { position:absolute; right:0; bottom:0; width:18px; height:18px;
                   cursor:nwse-resize; z-index:2;
                   background:linear-gradient(135deg,transparent 50%,rgba(0,0,0,.28) 50%); }
  .m33-gdoc-shield { position:absolute; inset:0; z-index:1; }
  .m33-gdoc-shield[hidden] { display:none; }

  /* Collapsed: a file icon sitting where you left it. Sized like a desktop
     icon, not a card — scaled down at the operator's ask (2026-08-12). */
  .m33-gdoc-tile { position:absolute; pointer-events:auto; width:78px; padding:7px 6px 6px;
                   display:flex; flex-direction:column; align-items:center; gap:5px;
                   background:rgba(20,24,33,.92); color:#e6e9ef; cursor:grab;
                   border:1px solid rgba(255,255,255,.14); border-radius:8px;
                   box-shadow:0 8px 22px rgba(0,0,0,.42);
                   font:10.5px/1.25 ui-sans-serif,-apple-system,system-ui,sans-serif; }
  .m33-gdoc-tile[hidden] { display:none; }
  .m33-gdoc-tile:hover { border-color:rgba(255,255,255,.34); }
  .m33-gdoc-tile.is-grabbing { cursor:grabbing; }
  .m33-gdoc-tile-mark { position:absolute; top:4px; right:5px; width:13px; height:13px;
                        opacity:.6; object-fit:contain; -webkit-user-drag:none; }
  /* The world badge sits ON the page's bottom-right corner (operator,
     2026-08-12) — a file-type badge, not a card corner mark. Offsets are
     tied to the tile's 7px top padding and the 34×44 page below. */
  .m33-gdoc-tile-kind { position:absolute; top:40px; left:calc(50% + 6px);
                        width:17px; height:17px;
                        display:inline-flex; align-items:center; justify-content:center;
                        border-radius:4px; font:700 11px system-ui; color:#fff;
                        background:#4285f4; border:2px solid rgba(20,24,33,.92);
                        box-shadow:0 1px 3px rgba(0,0,0,0.4); }
  .m33-gdoc-tile-page { width:34px; height:44px; flex:0 0 auto; background-size:contain;
                        background-repeat:no-repeat; background-position:center; }
  .m33-gdoc-tile-name { max-width:100%; text-align:center; overflow:hidden;
                        display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
                        word-break:break-word; }
  .m33-gdoc-banner { flex:0 0 auto; background:#3d3320; color:#e8d9a0;
                     font:12px/1.5 ui-sans-serif,-apple-system,system-ui,sans-serif;
                     padding:6px 12px; }
