/* App Plugin (Mod) UI — management tab, command-result popovers/dialogs, and contribution slots. All colours use theme tokens (defined in tokens.css for both dark :root and [data-theme="light"]) so the surfaces track the theme — no hardcoded hex. */ /* ── Management tab ──────────────────────────────────────────────── */ /* The tab itself renders as settings-groups (AppPluginsTab), so only the install rows / plugin rows / details keep rules here. */ .app-plugins-install { display: flex; gap: var(--space-2); } .app-plugins-install .input { flex: 1; } .app-plugins-install .input.app-plugins-subdir-input { flex: 0 0 130px; } .app-plugins-subdir-hint { margin: 0; color: var(--fg-muted); font-size: var(--fs-xs); } .app-plugins-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); } .app-plugins-empty { color: var(--fg-muted); font-size: var(--fs-sm); padding: var(--space-3) 0; } .app-plugins-row { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-2-5) var(--space-3); background: var(--bg-elev); } .app-plugins-row-error { border-color: var(--danger-text); } .app-plugins-card { display: flex; gap: var(--space-2-5); align-items: flex-start; } .app-plugins-card-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--bg-elev-2); color: var(--fg-muted); } .app-plugins-card-main { flex: 1; min-width: 0; } .app-plugins-desc { margin: var(--space-1-5) 0 0; color: var(--fg-muted); font-size: var(--fs-sm); line-height: 1.5; } .app-plugins-badge { padding: 1px 6px; border-radius: var(--radius-sm); background: var(--bg-elev-2); color: var(--fg-muted); font-size: var(--fs-xs); font-weight: 500; } .app-plugins-bundled-note { margin: var(--space-1-5) 0 0; color: var(--fg-muted); font-size: var(--fs-xs); } .app-plugins-switch { position: relative; width: 36px; height: 20px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-elev-2); cursor: pointer; transition: background 120ms ease; } .app-plugins-switch:disabled { cursor: not-allowed; opacity: 0.55; } .app-plugins-switch-on { background: var(--accent); border-color: var(--accent); } .app-plugins-switch-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: var(--radius-circle); background: var(--fg); transition: left 120ms ease; } .app-plugins-switch-on .app-plugins-switch-knob { left: 18px; } .app-plugins-row-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); } .app-plugins-row-toggle { display: flex; flex: 1 1 320px; align-items: center; flex-wrap: wrap; min-width: 0; gap: var(--space-2); background: none; border: none; padding: 0; color: var(--fg); cursor: pointer; font: inherit; text-align: left; } .app-plugins-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; } .app-plugins-row-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-1-5); } .app-plugins-meta { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-1-5); color: var(--fg-muted); font-size: var(--fs-xs); } .app-plugins-meta > span { min-width: 0; overflow-wrap: anywhere; } .app-plugins-err { color: var(--danger-text); } .app-plugins-reason { display: flex; flex-direction: column; gap: var(--space-0-5); margin-top: var(--space-1-5); font-size: var(--fs-xs); line-height: 1.5; } .app-plugins-reason-warn { color: var(--warn-text); } .app-plugins-reason-danger { color: var(--danger-text); } .app-plugins-reason-detail { overflow-wrap: anywhere; } .app-plugins-details { margin-top: var(--space-2-5); padding-top: var(--space-2-5); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--space-3); } .app-plugins-details h4 { margin: 0 0 var(--space-1-5); font-size: var(--fs-sm); } .app-plugins-perms ul, .app-plugins-contribs ul { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fs-sm); } .app-plugins-perms label { display: inline-flex; align-items: center; gap: var(--space-1-5); } .app-plugins-hosts, .app-plugins-trust, .app-plugins-hosts-ref { color: var(--fg-muted); font-size: var(--fs-xs); } .app-plugins-trust { margin-top: var(--space-1-5); line-height: 1.4; } .app-plugins-diag { color: var(--warn-text); font-size: var(--fs-xs); margin-top: var(--space-1); } .app-plugins-diag > div { margin-top: var(--space-0-5); } /* ── Configuration editor ───────────────────────────────────────── */ .app-plugins-config ul { list-style: none; margin: 0 0 var(--space-2); padding: 0; display: flex; flex-direction: column; gap: var(--space-2); } .app-plugins-config li { display: flex; flex-direction: column; gap: var(--space-0-5); } .app-plugins-config label { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fs-sm); } .app-plugins-config-label { font-weight: 600; } .app-plugins-config .input { width: 100%; } .app-plugins-config select.input { width: auto; } .app-plugins-config-desc { color: var(--fg-muted); font-size: var(--fs-xs); } /* ── Marketplace section ─────────────────────────────────────────── */ /* The section renders as a settings-group (AppPluginMarketplaceSection). */ .app-plugins-mp-plugins { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); } .app-plugins-mp-plugin { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-1-5) var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); } .app-plugins-mp-plugin strong { font-size: var(--fs-sm); } /* ── Command result popover ─────────────────────────────────────── */ .plugin-popover { position: fixed; z-index: var(--z-overlay); width: 320px; max-width: calc(100vw - 16px); background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--card-shadow); padding: var(--space-2-5) var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); } .plugin-popover[data-degraded] { /* degraded (no anchor) — center via the inline transform */ width: 360px; } .plugin-popover-title { font-weight: 600; font-size: var(--fs-sm); } .plugin-popover-body { font-size: var(--fs-sm); line-height: 1.5; color: var(--fg); max-height: 60vh; overflow: auto; } .plugin-popover-actions { display: flex; justify-content: flex-end; gap: var(--space-2); } .plugin-popover-close, .plugin-popover-retry { font-size: var(--fs-xs); padding: var(--space-0-5) var(--space-2-5); } /* Loading spinner for the "Translating…" popover. Only applies when the popover has data-loading="true" (set by the host for loading entries). */ .plugin-popover[data-loading] .plugin-content-text { display: flex; align-items: center; gap: var(--space-2); } .plugin-popover[data-loading] .plugin-content-text::after { content: ''; flex-shrink: 0; /* Ring shape + animation come from the shared loading-indicator group in utilities.css (pseudo-elements can't carry a class, so the selector joins the :where group there). */ } /* ── Command result dialog ──────────────────────────────────────── */ .plugin-dialog-backdrop { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--backdrop-color); display: flex; align-items: center; justify-content: center; padding: var(--space-6); } .plugin-dialog { width: 100%; max-width: 480px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--modal-shadow); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); } .plugin-dialog-title { font-weight: 600; font-size: var(--fs-md); } .plugin-dialog-body { font-size: var(--fs-sm); line-height: 1.5; color: var(--fg); max-height: 60vh; overflow: auto; } .plugin-dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); } /* ── Result content ─────────────────────────────────────────────── */ .plugin-content-text { white-space: pre-wrap; word-break: break-word; } .plugin-content-kv { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); margin: 0; } .plugin-content-kv dt { color: var(--fg-muted); font-size: var(--fs-xs); } .plugin-content-kv dd { margin: 0; font-size: var(--fs-sm); } /* ── Header / composer / footer action slots ─────────────────────── */ .plugin-slot-action { font-size: var(--fs-xs); padding: var(--space-0-5) var(--space-2); } /* Composer actions sit inline with attach / tasks; the toolbar's own gap spaces them, so this wrapper only groups the contributed buttons. */ .composer-plugin-actions { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; } /* The sidebar footer is the system-widget corner. Plugin actions form the first row, system `global.bottomLeft` widgets stack below it; both slots sort by `order` then plugin id. Action row gets the top rule; widgets keep their own top rule so stacked widgets stay visually separated. */ .sidebar-footer { flex-shrink: 0; display: flex; flex-direction: column; min-width: 0; } .sidebar-footer-actions { display: flex; flex-wrap: wrap; gap: var(--space-1); padding: var(--space-2) var(--space-2-5); border-top: 1px solid var(--border); min-width: 0; } .sidebar-footer-actions .plugin-slot-action { flex: 1 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ── Status indicator override ───────────────────────────────────── */ .plugin-status-indicator { height: var(--size-20px); width: auto; vertical-align: middle; border-radius: var(--radius-xs); display: inline-block; } /* ── Data-driven widget slot (bottom-left) ───────────────────────── */ .plugin-widget-slot { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--bg-elev); padding: var(--space-1-5) var(--space-2-5); display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fs-xs); } .stat-grid { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .stat-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'label value' 'bar bar'; align-items: baseline; column-gap: var(--space-2); row-gap: var(--space-0-5); min-width: 0; } .stat-label { grid-area: label; color: var(--fg-muted); } .stat-value { grid-area: value; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); color: var(--fg); /* A text value (e.g. the CPU model name) can be long — truncate rather than wrap the row. Numbers are short and unaffected in practice. */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .stat-unit { margin-left: var(--space-0-5); color: var(--fg-muted); font-family: var(--sans); } .stat-bar { grid-area: bar; height: 3px; border-radius: var(--radius-2xs); background: var(--border); overflow: hidden; } .stat-bar-fill { display: block; height: 100%; border-radius: var(--radius-2xs); background: var(--accent); } .stat-row[data-tone='ok'] .stat-bar-fill { background: var(--ok); } .stat-row[data-tone='warn'] .stat-bar-fill { background: var(--warn); } .stat-row[data-tone='danger'] .stat-bar-fill { background: var(--danger); }