/* ===== IDE responsive pass 2026-11-16 (docs/AUDITORIA_RESPONSIVE.md, findings 1–6 and 8) ===== */

/* Readable chrome text: labels and status lines at 11–12px instead of 8–11px (finding 8). */
.sidebar--dark :is(.sidebar-title, .file-tree__root-label) { font-size:var(--text-11); }

.sidebar--dark :is(.sidebar-meta, .sidebar-main-hint, .project-search__status, .document-outline__empty) { font-size:var(--text-12); }
.editor-area--ide :is(.ide-meta, .ide-save-status, .editor-search__count) { font-size:var(--text-12); }
.editor-area--ide :is(.ide-worker-status, .ide-syntax-status) { font-size:var(--text-11); }
.editor-area--ide .ide-toolbar__meta { white-space:nowrap; } /* «108 líneas» wraps as a whole, never letter by letter */
.pdf-viewer .pdf-viewer__tabs button,
.pdf-viewer .pdf-viewer__thumb { font-size:var(--text-12); }

/* Header up to 1279px: the title keeps its width (at most half), the actions become one row that scrolls
   sideways; the fade on the right says there is more (finding 5). */

@media (max-width: 900px) {
  /* Header: title on one line with ellipsis (full name in its title and aria-label), actions in one row (finding 2). */

  /* Stacked panels: the workspace scrolls, so nothing below the editor is out of reach. */

  .workspace--ide > * { flex-shrink:0; }

  /* Explorer: its flex-basis (220px) became its height in the column and squeezed the tree to ~10px under the
     footer. Now it scrolls as one panel with sticky view tabs; «Explorador» folds it (finding 1). */

  .workspace--ide .sidebar--dark > * { flex-shrink:0; }
  .workspace--ide .sidebar--dark > :is(.file-tree--dark, .document-outline, .project-search) { flex:0 0 auto; min-height:auto; max-height:none; overflow:visible; }
  .workspace--ide .sidebar--dark .sidebar-header--dark { padding:8px 16px; }
  .workspace--ide .sidebar--dark .sidebar-view-tabs { position:sticky; top:0; z-index:var(--z-overlay); background:var(--sidebar-dark); }

  .workspace--ide .editor-area--ide { flex:0 0 auto; min-height:0;  height:75dvh; } /* the code scrolls inside */

  /* Editor toolbar: one row that scrolls sideways (finding 2). */

  .editor-area--ide .ide-toolbar::-webkit-scrollbar { display:none; }

  .editor-area--ide .ide-toolbar__meta { flex:0 0 auto; }

}

/* Touch: 40px targets in the project header, IDE and PDF viewer; mouse density is unchanged (finding 4). */
@media (pointer: coarse) {

  .sidebar--dark .file-tree--dark :is(.tree-file-row, .tree-file-link__anchor, .tree-summary--dark) { min-height:40px; }
  .sidebar--dark .tree-node-menu .tree-menu-trigger { width:40px; height:40px; }
  .sidebar--dark .tree-main-pin { width:32px; height:40px; }
   /* stays inline-block so the ellipsis still works */


  .editor-area--ide button.ide-tab__name { min-height:40px; }



  .pdf-viewer .pdf-viewer__searchbar :is(button, input) { min-width:40px; height:40px; }
  .pdf-viewer .pdf-viewer__tabs button { min-height:40px; }
}

/* Full-width PDF (?view=pdf, «Solo PDF», fullscreen) on large screens: a slightly larger toolbar (finding 6). */

/* Large screens: the side preview grows with the window height instead of a fixed 460px box (still resizable). */
@media (min-width: 1600px) and (min-height: 1000px) {
  .compile-panel--ide .pdf-viewer__pages { height:calc(100vh - 480px); }
}

/* Package requests: members ask from the project's output panel, admins decide on /dependencies. */
.nav-badge { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:6px; padding:0 5px; border-radius:var(--radius-pill); background:var(--danger); color:var(--color-neutral-50); font-size:var(--text-11); font-weight:700; line-height:1; vertical-align:1px; }
.pkg-request { margin-top:12px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); font-size:var(--text-13); }
.pkg-request summary { cursor:pointer; font-weight:600; }
.pkg-request__status { margin:10px 0 0; padding:8px 10px; border-radius:var(--radius-sm); background:var(--surface-soft); line-height:1.45; }
.pkg-request__status--pending { border-left:3px solid var(--warning); }
.pkg-request__status--approved { border-left:3px solid var(--success); }
.pkg-request__status--rejected { border-left:3px solid var(--danger); }
.pkg-request__form { display:grid; gap:8px; margin-top:10px; }
.pkg-request__label { margin:0; color:var(--muted); font-size:var(--text-12); font-weight:600; }
.pkg-request__checks { display:flex; flex-wrap:wrap; gap:6px 12px; }
.pkg-request__checks label { display:inline-flex; align-items:center; gap:5px; }
.pkg-request__form input:not([type="checkbox"]) { width:100%; padding:7px 9px; border:1px solid var(--line); border-radius:var(--radius-sm); font:inherit; }

.pkg-request__hint { margin:0; color:var(--muted); font-size:var(--text-12); line-height:1.4; }
.pkg-requests { display:grid; gap:10px; margin:0; padding:0; list-style:none; }
.pkg-requests__item { display:grid; gap:8px; }
.pkg-requests__head { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; }
.pkg-requests__date { margin-left:auto; color:var(--muted); font-size:var(--text-12); }
.pkg-requests__packages { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; }
.pkg-requests__actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.pkg-requests__reject { display:flex; flex:1 1 260px; gap:6px; }
.pkg-requests__reject input { flex:1 1 auto; min-width:0; padding:6px 9px; border:1px solid var(--line); border-radius:var(--radius-sm); font:inherit; font-size:var(--text-13); }
.pkg-requests__history { margin-top:12px; font-size:var(--text-13); }
.pkg-requests__history summary { cursor:pointer; color:var(--muted); }
.pkg-requests__history ul { display:grid; gap:6px; margin:8px 0 0; padding:0; list-style:none; }
