/* bcm-app-core 0.7.4 - the contextual prompt library (bcm-prompts.js), the same in every BCM app. On the workflow page
   the look comes from imp.css (btn, card, pill, lead, muted, line amber) and only what the library adds is here (as
   promptlib.css did). Elsewhere (class bcm-sa, set by the script when the workflow helpers are not there) the base rules
   at the end give the same look; they weigh nothing (:where), so an app's own styles always win. Computer 1366x768 and a
   390-wide phone. */

/* the side tab: a small tab fixed at the right edge, half way down */
.plib-tab { position:fixed; right:0; top:58%; transform:translateY(-50%); z-index:42; writing-mode:vertical-rl;
  background:var(--blue2, #2d5ea8); color:#fff; border:0; border-radius:8px 0 0 8px; padding:14px 7px; min-width:32px;
  font:700 13px -apple-system, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing:.04em; cursor:pointer;
  box-shadow:0 4px 12px rgba(16,24,40,.22); }
.plib-tab:hover { background:var(--blue, #1a3c6e); }
.plib-tab:focus-visible { outline:3px solid var(--focus, #9dbbf0); outline-offset:2px; }

/* the side panel */
.plib-panel { position:fixed; top:0; right:0; bottom:0; width:min(460px, 100vw); z-index:45; background:var(--card, #fff);
  color:var(--ink, #1d2430); border-left:1px solid var(--line, #dfe3ea); box-shadow:0 12px 32px rgba(16,24,40,.18); display:flex;
  flex-direction:column; }
.plib-phead { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--line, #dfe3ea); }
.plib-phead h2 { margin:0; font-size:17px; }
.plib-pbody { flex:1; overflow:auto; padding:6px 16px 24px; overscroll-behavior:contain; }
.plib-how { margin:8px 0 6px; }
.plib-full { margin:0 0 6px; }
.plib-asof { margin:2px 0 6px; font-size:12px; color:var(--muted, #6b7380); }      /* 0.7.4: "Prompts as of ... - from Drive" */
.plib-msg { margin:8px 0; padding:8px 12px; border-radius:6px; }
.plib-sh { font-size:14px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted, #6b7380); margin:18px 0 2px; }
.plib-here { border-bottom:1px solid var(--line, #dfe3ea); padding-bottom:10px; }
.plib-here > p.small { margin:0 0 4px; }
.plib-search { width:100%; max-width:100%; padding:8px 10px; border:1px solid #9aa3b2; border-radius:6px; font-size:14px;
  margin:6px 0 4px; background:var(--card, #fff); color:var(--ink, #1d2430); }
.plib-gh { font-size:13px; color:var(--ink, #1d2430); margin:14px 0 0; }

/* a card - the same layout in the panel and on the full page */
.plib-card { padding:12px 14px; margin:8px 0; min-width:0; }
.plib-chead { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 10px; }
.plib-title { margin:0; font-size:15px; flex:1 1 220px; min-width:0; overflow-wrap:anywhere; }
.plib-meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.plib-meta .pill { white-space:normal; }
.plib-text { display:block; width:100%; max-width:100%; margin:8px 0; resize:vertical; font:12.5px/1.45 ui-monospace, Menlo, Consolas, monospace;
  padding:8px 10px; border:1px solid var(--line, #dfe3ea); border-radius:6px; background:var(--surface-2, #f6f7f9); color:var(--ink, #1d2430); }
.plib-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.plib-votes { display:inline-flex; gap:6px; }
.plib-vote { min-width:44px; }
.plib-vote.on { background:var(--blue2, #2d5ea8); border-color:var(--blue2, #2d5ea8); color:#fff; }
.plib-vote .plib-n { margin-left:5px; font-size:12px; font-weight:600; }
.plib-copy.copied { background:var(--green, #1e7a46); border-color:var(--green, #1e7a46); }
.plib-improve { margin-left:auto; }

/* the full page */
.plib-filters { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; margin:8px 0; }
.plib-filters .plib-search { flex:1 1 320px; max-width:520px; margin:0; }
.plib-page { display:grid; grid-template-columns:1fr; }
.plib-page .plib-group { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap:0 14px; }
.plib-page .plib-gh { grid-column:1 / -1; font-size:16px; margin:20px 0 0; }
.plib-problems ul { margin:6px 0 0 18px; }

/* a phone: the tab becomes a small button at the bottom left (the "Ask Claude" button keeps the bottom right), the page
   keeps room under its last line so the button never covers it, and the panel takes the whole width */
@media (max-width:700px) {
  .plib-tab { top:auto; bottom:14px; right:auto; left:10px; transform:none; writing-mode:horizontal-tb; border-radius:999px;
    padding:7px 13px; min-height:34px; font-size:12.5px; }
  main { padding-bottom:84px; }
  .plib-panel { left:0; width:auto; border-left:0; }
  .plib-improve { margin-left:0; }
}
@media (prefers-color-scheme: dark) {
  .plib-tab { color:#0f1a2c; background:var(--primary, #7fa8e6); }
  .plib-vote.on, .plib-copy.copied { color:#0f1a2c; }
}
@media print { .plib-tab, .plib-panel { display:none !important; } }

/* ---- base look where the workflow app's imp.css is not loaded (class bcm-sa); weightless, so an app's own rules win */
:where(.plib-panel.bcm-sa) { font:15px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; box-sizing:border-box; }
:where(.plib-panel.bcm-sa) :where(*) { box-sizing:border-box; }
:where(.bcm-sa.hidden, .plib-panel.bcm-sa .hidden) { display:none !important; }
:where(.plib-panel.bcm-sa) :where(button.btn) { border:1px solid var(--line, #dfe3ea); background:var(--card, #fff); color:var(--ink, #1d2430);
  padding:5px 10px; border-radius:6px; font-family:inherit; font-size:13px; font-weight:500; cursor:pointer; }
:where(.plib-panel.bcm-sa) :where(button.btn.primary) { background:var(--blue2, #2d5ea8); border-color:var(--blue2, #2d5ea8); color:#fff; font-weight:600; }
:where(.plib-panel.bcm-sa) :where(button.btn.ghost) { background:transparent; }
:where(.plib-panel.bcm-sa) :where(.card) { background:var(--card, #fff); border:1px solid var(--line, #dfe3ea); border-radius:8px; }
:where(.plib-panel.bcm-sa) :where(.pill) { display:inline-block; padding:2px 9px; border-radius:11px; font-size:12px; font-weight:600; background:#eef1f5; color:#3a4350; white-space:nowrap; }
:where(.plib-panel.bcm-sa) :where(.pill.blue) { background:#e7eefb; color:var(--blue2, #2d5ea8); }
:where(.plib-panel.bcm-sa) :where(.small) { font-size:13px; }
:where(.plib-panel.bcm-sa) :where(.muted) { color:var(--muted, #6b7380); }
:where(.plib-panel.bcm-sa) :where(.line.amber) { background:#fff4e0; color:#9a5b00; }
:where(.plib-panel.bcm-sa) :where(h4) { font-size:15px; }
@media (prefers-color-scheme: dark) {
  :where(.plib-panel.bcm-sa), :where(.plib-panel.bcm-sa) :where(.card, button.btn, .plib-search, .plib-text) {
    background:var(--card, #1b2230); color:var(--ink, #e6ebf2); border-color:var(--line, #343e50); }
}
