/* Processes is on the master page design (Documents, Sam 2026-11-24): the head is .documents-heading and both tab
   bars are .documents-status-tabs, drawn by documents.css. This file keeps only what is Processes' own. */
.library-actions .search { width: min(420px, 32vw); height: 44px; }
.library-actions .search input { font-size: 14px; }
.library-actions .primary { height: 44px; }
/* Under Landscape | Library, the status tabs follow close by. */
main:has(#process-view-tabs:not([hidden])) #process-status-tabs { margin-top: 4px; }
/* White, as Documents' register is (documents.css); theme.css gives other shells their soft grey. */
.library-shell > main { background: #fff; }
.process-filters-fold { margin: 18px 0 0; }
.process-filters { display: flex; gap: 16px; align-items: end; padding: 4px 0 2px; }
.process-filters[hidden] { display: none; }
.tag-filters { display: flex; flex: 1; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0; }
.tag-filter { display: grid; gap: 5px; flex: 1 1 150px; min-width: 120px; color: #35445a; font-size: 12px; font-weight: 600; }
.tag-filter select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid #d1dbe5; border-radius: 6px; background: #fff; color: #26354c; }
.tag-filters #clear-filters { height: 40px; white-space: nowrap; background: none; border: 0; color: var(--brand, #087b7a); cursor: pointer; }
.process-table { margin-top: 2px; border: 0; border-radius: 5px; }
.table-head, .process-row { grid-template-columns: minmax(250px, 2.8fr) minmax(100px, 1fr) minmax(130px, 1.25fr) 72px 110px 40px; gap: 15px; }
.table-head { height: 45px; padding: 0 20px; background: #f2f5f8; color: #35445d; font-size: 12px; font-weight: 700; }
.process-row { min-height: 76px; padding: 10px 20px; background: #fff; }
.process-row:hover, .process-row:focus-visible { background: #f4faf9; outline: none; }
.process-name { min-width: 0; }
.process-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.process-name-line b { color: #172740; font-size: 14px; }
.process-name small { margin-top: 6px; color: #52617a; font-size: 12px; }
/* A short summary, two lines at most (Bryan's review, 2026-11-03); the whole description is on
   the process page, under Details. */
.process-name small.process-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
/* The live version's quiet note that the next one is being drafted (library.js nextVersionNote). */
.process-name small.process-next-version { margin-top: 4px; color: #6b7a90; font-size: 11.5px; font-style: italic; }
/* Where a draft is and where it is approved (draft-state.js; Bryan's review, 2026-11-04). */
.process-name small.process-draft-state { display: block; margin-top: 4px; color: #475467; font-size: 11.5px; line-height: 1.45; }
.process-name small.process-draft-state span:first-child { color: #344054; font-weight: 600; }
.process-row > span:not(.process-cell) { color: #30415a; font-size: 12px; }
.process-row .status { margin: 0; padding: 4px 9px; border-radius: 999px; font-size: 11px; line-height: 1.2; }
.process-row .status.review { background: var(--brand-tint, #e0f1ef); color: var(--brand, #087a75) !important; }
.process-row .status.draft { background: #e7ebf1; color: #52617a !important; }
.process-row .review-date.overdue { color: #c32932; font-weight: 700; }
.process-row .review-date.due-soon { color: #b76600; font-weight: 700; }
.process-row .process-menu { justify-self: end; }
.process-row .tags { margin-top: 6px; }
@media (max-width: 1300px) {
  /* Narrower: the process, where it applies and when it is next reviewed. */
  .table-head, .process-row { grid-template-columns: minmax(230px,2fr) minmax(130px,1fr) 110px 40px; }
  .table-head > :nth-child(2), .table-head > :nth-child(4),
  .process-row > :nth-child(2), .process-row > :nth-child(4) { display: none; }
}
@media (min-width: 1301px) {
  main:has(~ .create-panel:not(.closed)) .table-head,
  main:has(~ .create-panel:not(.closed)) .process-row { grid-template-columns: minmax(230px,2fr) minmax(130px,1fr) 110px 40px; }
  main:has(~ .create-panel:not(.closed)) .table-head > :nth-child(2),
  main:has(~ .create-panel:not(.closed)) .table-head > :nth-child(4),
  main:has(~ .create-panel:not(.closed)) .process-row > :nth-child(2),
  main:has(~ .create-panel:not(.closed)) .process-row > :nth-child(4) { display: none; }
}
@media (max-width: 760px) {
  .library-shell, .library-shell:has(.create-panel.closed) { grid-template-columns: var(--bb-rail-w) minmax(0,1fr); }
  .library-shell main { padding: 22px 16px; }
  .library-head { flex-wrap: wrap; }
  .library-actions { width: 100%; }
  .library-actions .search { display: flex; width: 100%; }
  .process-filters { flex-wrap: wrap; }
  .table-head, .process-row { grid-template-columns: minmax(150px,1fr) 34px; }
  .table-head > :nth-child(n+2), .process-row > :nth-child(n+2) { display: none; }
  .process-table .table-head > .menu-head, .process-table .process-row > .process-menu { display: block; }
}

/* Your AI on Processes is the shared panel (ai-panel.js) inside the create-panel dock: the dock
   keeps its place beside the list; the panel fills it. The attach control and the attached
   file's chip sit in the panel's foot, before the context line. library.css (and theme.css) style
   the OLD create form's header, h2, h3 and textarea under .create-panel — the document editor's AI
   column still uses that markup — so those rules end in :not(:where(.conform-ai *)): the shared
   panel keeps its own look here (no 154px box, no 20px close), and their specificity is unchanged. */
.create-panel { padding: 0; }
.library-ai-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.library-ai-host > .conform-ai-head { padding-right: 12px; }
.library-ai-attach { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.library-ai-attach .library-ai-add { width: 30px; height: 30px; font-size: 18px; flex: none; }
.library-ai-attach .library-ai-attachment { margin: 0; padding: 4px 6px; gap: 4px; max-width: 150px; }
.library-ai-attach .library-ai-attachment b { min-width: 0; }
.library-ai-duplicate[hidden] { display: none; } /* hidden, not removed (library.js offerExistingProcess) */

/* Held until Processes knows whether it opens on the landscape (library.js settleView): never
   the library's tabs and empty table first, then the map. The space stays, so nothing moves. */
main[data-view-settling] #process-status-tabs,
main[data-view-settling] #process-filters,
main[data-view-settling] .process-table { visibility: hidden; }
