/* Working at volume: attention queue, overview, quick prompt, attachments and their viewer. */

/* ---- unread marks ---- */
.unread { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--ground); }
.arc .mark { fill: var(--ink); stroke: var(--ground); stroke-width: 2; opacity: 0; pointer-events: none; }
.arc[data-unread="true"] .mark { opacity: 1; }
.queue-pill { min-width: 22px; padding: 0 7px; border-radius: 999px; border: 1.5px solid var(--dim); font-size: 12px; font-weight: 700; text-align: center; color: var(--ink); }

/* ---- attention queue ---- */
.need-title { display: flex; align-items: center; gap: 8px; color: var(--ink); padding-top: 4px; }
.need-title kbd { margin-left: auto; }
.need-list { display: grid; gap: 4px; padding-bottom: 6px; }
.need { display: flex; align-items: center; gap: 8px; border-radius: 16px; background: var(--surface); box-shadow: inset 3px 0 0 var(--arc); }
.need[data-kind="permission"] { box-shadow: inset 3px 0 0 var(--attention); }
.need[data-kind="error"] { box-shadow: inset 3px 0 0 var(--error); }
.need-open { flex: 1; min-width: 0; display: grid; gap: 2px; min-height: 56px; padding: 8px 12px 8px 16px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 16px; }
.need-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.need-head strong { font-size: 17px; }
.need-kind { font-size: 13px; font-weight: 600; color: var(--arc); }
.need[data-kind="permission"] .need-kind { color: var(--attention); }
.need[data-kind="error"] .need-kind { color: var(--error); }
.need-ago { font-size: 13px; color: var(--dim); margin-left: auto; }
.need-text { font-size: 14px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need-actions { display: flex; gap: 6px; padding-right: 8px; flex: none; }
.need-actions .btn { min-height: 38px; padding: 0 12px; }
.drive-agents li[data-unread="true"] small { color: var(--ink); }

/* ---- top bar extras ---- */
.top-help { width: 38px; height: 38px; font-weight: 700; border: 1.5px solid var(--line); }
.mini-close { position: fixed; z-index: 30; top: 4px; right: 4px; width: 32px; height: 32px; }

@media (max-width: 1279px) {
  .top-right .btn span, .top-help, #install { display: none; }
  .top-right .btn { padding: 0; width: 42px; }
}

/* ---- small notes around the panel ---- */
.panel-error { margin-bottom: 10px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--error); color: var(--ink); background: color-mix(in srgb, var(--error) 12%, var(--surface)); }
.form-error { padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--error); background: color-mix(in srgb, var(--error) 12%, var(--surface)); }
.pv-hint { font-size: 14px; }
.composer-hint { min-height: 1.3em; font-size: 13px; color: var(--dim); padding: 0 14px; }
.composer-hint[data-queued="true"] { color: var(--attention); }

/* ---- attachment tray ---- */
.tray { display: flex; flex-wrap: wrap; gap: 8px; }
.tray-item { position: relative; display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 4px 4px 4px; border-radius: 14px; background: var(--ground); border: 1.5px solid var(--line); overflow: hidden; }
.tray-item[data-status="error"] { border-color: var(--error); }
.tray-thumb { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: none; flex: none; }
.tray-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-file { width: 44px; height: 44px; display: grid; place-items: center; color: var(--dim); flex: none; }
.tray-text { display: grid; min-width: 0; max-width: 30ch; }
.tray-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-meta { font-size: 12.5px; color: var(--dim); }
.tray-item[data-status="error"] .tray-meta { color: var(--error); white-space: normal; }
.tray-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.tray-bar i { display: block; height: 100%; background: var(--glow); }
.att small { color: var(--dim); }

.drop-overlay {
  position: fixed; inset: 10px; z-index: 80; display: grid; place-items: center; pointer-events: none; text-align: center; padding: 24px;
  border: 3px dashed var(--glow); border-radius: 32px; background: color-mix(in srgb, var(--ground) 86%, transparent);
  font-size: clamp(24px, 4vw, 48px); font-weight: 700; font-stretch: 85%; color: var(--glow);
}

.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: color-mix(in srgb, var(--ground) 94%, transparent); color: var(--ink); }
.viewer[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.viewer figure { margin: 0; height: 100dvh; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; padding: 56px 8px 16px; gap: 10px; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.viewer figcaption { font-size: 14px; color: var(--dim); }
.viewer [data-close] { position: absolute; top: calc(8px + var(--safe-t)); right: 8px; z-index: 2; }
.viewer-nav.prev .ico { transform: rotate(90deg); }
.viewer-nav.next .ico { transform: rotate(-90deg); }

.dialog.menu { width: min(360px, calc(100vw - 24px)); margin-bottom: calc(12px + var(--safe-b)); }
.menu-list { display: grid; gap: 8px; padding: 16px; }
.menu-list .btn { min-height: 52px; font-size: 18px; }
.pick { display: grid; gap: 14px; padding: 24px; }
.pick header { display: flex; align-items: center; justify-content: space-between; }
.pick-list { display: grid; gap: 8px; max-height: 40dvh; overflow: auto; }
.pick-list .btn { width: 100%; justify-content: flex-start; min-height: 52px; }

/* ---- overview ---- */
.ov-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; display: grid; gap: 22px; align-content: start; }
.ov-projects { display: grid; gap: 22px; }
.ov-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-bottom: 6px; border-bottom: 1.5px solid var(--line); }
.ov-head h3 { font-size: 22px; font-weight: 700; font-stretch: 85%; }
.ov-ci { display: flex; align-items: center; gap: 4px; }
.run-link { display: grid; place-items: center; width: 18px; height: 24px; }
.ov-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.ov-actions .btn { min-height: 34px; padding: 0 12px; }
.ov-none { padding: 10px 0 0; font-size: 14px; }
.ov-agent { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, 1fr); gap: 4px 18px; align-items: center; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.ov-info { display: grid; gap: 2px; min-width: 0; text-align: left; border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 12px; }
.ov-info:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ov-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 17px; }
.ov-now { display: flex; gap: 10px; font-size: 14px; color: var(--ink); min-width: 0; }
.ov-agent[data-state="idle"] .ov-now, .ov-agent[data-state="stopped"] .ov-now { color: var(--dim); }
.ov-agent[data-state="permission"] .ov-now { color: var(--attention); }
.ov-agent[data-state="error"] .ov-now { color: var(--error); }
.ov-last { font-size: 14px; color: var(--dim); display: flex; gap: 10px; }
.ov-age { flex: none; opacity: .8; }
.ov-preview { font-size: 13px; color: var(--dim); }
.ov-preview[data-preview="running"] { color: var(--arc); }
.ov-preview[data-preview="error"] { color: var(--error); }
.ov-side { display: grid; gap: 6px; min-width: 0; }
.ov-form { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ground); border: 1.5px solid var(--line); }
.ov-form:focus-within { border-color: var(--glow); }
.ov-form input { flex: 1; min-width: 0; min-height: 36px; border: 0; background: none; padding: 4px 8px; }
.ov-form input:focus-visible { outline: none; }
.tiny-ish { width: 36px; height: 36px; }
.ov-trail h3 { font-size: 22px; font-weight: 700; font-stretch: 85%; padding-bottom: 6px; border-bottom: 1.5px solid var(--line); }
.trail { display: grid; }
.trail li { display: grid; grid-template-columns: 5ch minmax(0, 14ch) 11ch minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 5px 0; font-size: 14px; }
.trail time { color: var(--dim); }
.trail-agent { border: 0; background: none; padding: 0; text-align: left; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail-agent:hover { text-decoration: underline; }
.trail-kind { color: var(--dim); }
.trail li[data-kind="fout"] .trail-kind, .trail li[data-kind="geweigerd"] .trail-kind { color: var(--error); }
.trail li[data-kind="toestemming"] .trail-kind { color: var(--attention); }
.trail li[data-kind="klaar"] .trail-kind { color: var(--glow); }
.trail-text { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- quick prompt ---- */
.palette { width: min(680px, calc(100vw - 16px)); margin-top: min(14vh, 120px); padding: 0; border: 1.5px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); overflow: hidden; }
.palette::backdrop { background: color-mix(in srgb, var(--ground) 70%, transparent); backdrop-filter: blur(4px); }
.pal-input { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 18px; border-bottom: 1.5px solid var(--line); }
.pal-input input { flex: 1; min-width: 0; border: 0; background: none; min-height: 48px; padding: 0; font-size: 20px; border-radius: 0; }
.pal-input input:focus-visible { outline: none; }
.pal-chip { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--arc); color: #14101F; font-weight: 700; }
.pal-tray { padding: 10px 14px 0; }
.pal-list { max-height: min(46dvh, 420px); overflow-y: auto; padding: 6px; }
.pal-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; min-height: 44px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.pal-list li[aria-selected="true"] { background: var(--ground); box-shadow: inset 3px 0 0 var(--arc); }
.pal-list small { color: var(--dim); font-size: 13px; flex: none; }
.pal-hint { padding: 10px 18px 14px; font-size: 13px; color: var(--dim); }

/* ---- shortcuts ---- */
.keys { display: grid; gap: 6px; margin: 0; }
.keys div { display: grid; grid-template-columns: minmax(0, 15ch) minmax(0, 1fr); gap: 14px; align-items: baseline; }
.keys dt { font-size: 14px; }
.keys dd { margin: 0; color: var(--dim); }
.keys kbd { display: inline-block; }

/* ---- the overview hides nothing on wide screens; narrow screens stack ---- */
@media (max-width: 899px) {
  .ov-agent { grid-template-columns: 1fr; }
  .ov-actions { margin-left: 0; }
  .trail li { grid-template-columns: 5ch minmax(0, 1fr) auto; }
  .trail-text { grid-column: 1 / -1; white-space: normal; }
  .need-actions .btn { padding: 0 10px; }
  .palette { margin-top: calc(8px + var(--safe-t)); }
}
:root[data-mini="on"] :is(#palette-open, #overview-toggle) { display: none; }
:root[data-drive="on"] :is(#palette-open, #overview-toggle, .top-help) { display: none; }
@media (hover: none) { .need-title kbd { display: none; } }

/* ---- phone top bar: the colour already says where you are, so the wordmark makes room ---- */
@media (max-width: 479px) {
  .wordmark { display: none; }
  .top { gap: 6px; }
  .ws-switch button { padding: 0 10px; font-size: 14px; min-height: 36px; }
  .top-right .btn { width: 40px; min-height: 40px; }
}
.need-list { grid-template-columns: minmax(0, 1fr); }
.need { min-width: 0; }
:root[data-mini="on"] .pick { padding: 14px; gap: 10px; }
:root[data-mini="on"] .dialog h2 { font-size: 20px; }
