/* Activity Library — clinical intervention catalog (Phase 1) */

.lib-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.lib-card{position:relative;border:1px solid var(--border-md);border-radius:var(--radius-sm);background:var(--surface);padding:12px 14px;box-shadow:var(--shadow);cursor:pointer;transition:box-shadow .12s,border-color .12s;display:flex;flex-direction:column;gap:6px}
.lib-card:hover{box-shadow:var(--shadow-md);border-color:var(--green)}
.lib-card-top{display:flex;align-items:center;gap:8px}
.lib-card-icon{font-size:20px;line-height:1;flex-shrink:0}
.lib-card-title{font-size:14px;font-weight:700;color:var(--text);flex:1}
.lib-fav-btn{border:none;background:transparent;color:var(--text-subtle);font-size:18px;line-height:1;cursor:pointer;padding:0;flex-shrink:0}
.lib-fav-btn--on{color:#d69e2e}
.lib-review-badge{align-self:flex-start;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;background:#fef3c7;color:#92400e;border-radius:8px;padding:2px 8px}
.lib-archived-badge{align-self:flex-start;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;background:#f1f5f9;color:#475569;border-radius:8px;padding:2px 8px}
.lib-card-desc{font-size:12.5px;color:var(--text-muted);line-height:1.4}
.lib-card-domains{display:flex;flex-wrap:wrap;gap:4px}
.lib-domain-badge{display:inline-block;font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:12px}

.lib-detail-row{font-size:13px;color:var(--text);line-height:1.5;margin-bottom:4px}
.lib-detail-row strong{color:var(--text-muted);font-weight:600;margin-right:4px}
.lib-review-banner{background:#fef3c7;color:#92400e;border-radius:var(--radius-sm);padding:8px 12px;font-size:12.5px;margin-bottom:10px}
.lib-demand-row{font-size:12.5px;color:var(--text-muted);display:flex;align-items:center;gap:6px;margin-bottom:3px}
.lib-demand-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--border-md)}
.lib-demand-dot--filled{background:var(--fortava-navy,#061b4f)}

/* Phase 2 — "Recommended for <resident>" panel on the resident profile */
.lib-recs-wrap{margin-bottom:16px}
/* Shown when too little is recorded for the scores to mean much — amber
   rather than red: it is a prompt to finish the assessment, not a fault. */
.lib-recs-sub--weak{color:#92400e!important;font-weight:600}
.lib-recs-hdr{font-size:13px;font-weight:700;color:var(--text);margin-bottom:8px;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.lib-recs-sub{font-size:11.5px;font-weight:500;color:var(--text-subtle)}
/* Done today. Listed, not offered — a card with a button reads as "do this"
   no matter what the label says. */
.lib-done-today{margin-top:14px;padding:11px 13px;border:1px dashed rgba(6,27,79,.16);border-radius:11px;background:rgba(6,27,79,.02)}
.lib-done-today-lbl{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--text-subtle);margin-bottom:7px}
.lib-done-today-item{display:inline-block;margin:0 6px 6px 0;padding:4px 10px;border-radius:999px;background:rgba(15,110,86,.09);
  color:var(--green-dark);font-size:12px;font-weight:500}
.lib-spont-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid rgba(6,27,79,.07)}
.lib-spont-row:last-of-type{border-bottom:none}
.lib-spont-main{min-width:0}
.lib-spont-name{font-size:13px;font-weight:600;color:var(--text)}
.lib-spont-emo{font-size:13px;margin-left:7px;white-space:nowrap}
.lib-spont-meta{font-size:10.5px;color:var(--text-subtle);font-family:'DM Mono',monospace;margin-top:2px}
.lib-spont-on{font-size:11px;color:var(--text-subtle);white-space:nowrap;flex-shrink:0}
.lib-done-today-note{font-size:11px;color:var(--text-subtle);line-height:1.45;margin-top:2px}
/* Tried on an earlier day, but not on their strategies. Marked rather than
   hidden — the suggestion is still right, it just needs to acknowledge that
   it happened. */
.lib-rec-card--tried{border-color:rgba(15,110,86,.3);background:rgba(15,110,86,.03)}
.lib-rec-tried{font-size:11.5px;line-height:1.4;color:var(--green-dark);font-weight:600;margin:6px 0 2px}
.lib-recs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.lib-rec-card{border:1px solid var(--border-md);border-radius:var(--radius-sm);background:var(--surface);padding:10px 12px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:6px}
.lib-rec-top{display:flex;align-items:center;gap:6px}
.lib-rec-icon{font-size:16px;flex-shrink:0}
.lib-rec-name{font-size:13px;font-weight:700;color:var(--text);flex:1}
.lib-rec-score{font-size:12px;font-weight:800;color:var(--green-dark,#0F6E56);background:var(--green-light);border-radius:10px;padding:1px 8px;flex-shrink:0}
.lib-rec-why{font-size:11.5px;color:var(--text-muted);line-height:1.35}
/* Set-aside control. Deliberately quiet next to the "+ Add to profile"
   button -- both are one tap, but adding is the outcome worth encouraging
   and dismissing should never be the thing the eye lands on first. Turns
   red only on hover, so the destructive-looking styling appears at the
   moment of intent rather than sitting on every card. */
.lib-rec-dismiss{flex-shrink:0;width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;background:none;border-radius:50%;cursor:pointer;font-size:17px;line-height:1;color:var(--text-subtle);padding:0}
.lib-rec-dismiss:hover{background:#FEE2E2;color:#991B1B}
.lib-rec-dismiss:focus-visible{outline:2px solid var(--green);outline-offset:1px}
/* Sits in .lib-recs-hdr (a flex row) and is pushed to the far end, so it
   reads as a footnote on the section rather than a third action. Only
   rendered when something is actually set aside. */
.lib-rec-restore{margin-left:auto;border:1px solid var(--border-md);background:var(--surface);border-radius:10px;padding:2px 9px;font-size:11px;font-weight:600;color:var(--text-muted);cursor:pointer;font-family:inherit}
.lib-rec-restore:hover{color:var(--text);border-color:var(--text-subtle)}
