/* Business Specifics → Project Types (project-types.js) + Recommended star on the Tool Map. */

/* ── Tool Map: Recommended badge (never hides/unhides) ── */
.tool-bubble.is-recommended { padding-right: 0.55rem; }
.tool-rec-star {
  position: absolute; top: -6px; right: -5px;
  width: 13px; height: 13px; border-radius: 999px;
  background: #facc15; color: #713f12; font-size: 9px; line-height: 13px; text-align: center;
  box-shadow: 0 0 0 1.5px #fff; pointer-events: none;
}
.req-chip-rec { background: #facc15; color: #713f12; }
.req-chip-rec span { margin-right: 2px; }
.req-chip-hidden { background: #e2e8f0; color: #64748b; }
.tool-map-rec-filter { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--text-2); margin-left: 6px; cursor: pointer; }
.tool-map-rec-filter.hidden { display: none; }

/* ── Page ── */
.pt-page { padding: 1.5rem 1.75rem 3rem; max-width: 1280px; box-sizing: border-box; }
.pt-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pt-hero h2 { margin: 0 0 4px; }
.pt-hero p.muted { margin: 0; max-width: 720px; }
.pt-readonly { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius); background: var(--surface, #f8fafc); border: 1px dashed var(--border); color: var(--text-2); font-size: 0.85rem; }
.pt-error { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--danger-bg, #fef2f2); border: 1px solid #fecaca; color: var(--danger, #b91c1c); font-size: 0.86rem; font-weight: 500; }
.pt-readonly.hidden, .pt-error.hidden, .pt-dirty.hidden, #pt-new.hidden, #pt-save.hidden, #pt-discard.hidden { display: none; }

/* ── Cards ── */
.pt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pt-card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; min-width: 0;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.pt-card:hover { box-shadow: var(--shadow-md); }
.pt-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light, #d4e8f2), var(--shadow-md); }
.pt-card.is-archived { background: #f8fafc; opacity: .8; }
.pt-card-hit { position: absolute; inset: 0; border: 0; background: transparent; border-radius: 12px; cursor: pointer; z-index: 0; }
.pt-card-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pt-card-head, .pt-card-actions, .pt-rename { position: relative; z-index: 1; }
.pt-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.pt-card-head .pt-rename { pointer-events: auto; }
.pt-card-title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text); }
.pt-card-desc { margin: 0; font-size: 0.8rem; color: var(--text-2); min-height: 1.1em; }
.pt-card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 0.74rem; color: var(--text-2); }
.pt-chip { background: var(--accent-light, #e0f2fe); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.pt-count { font-weight: 600; color: var(--text); }
.pt-rec-count { color: #a16207; font-weight: 600; }
.pt-badge { border-radius: 999px; padding: 1px 7px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pt-badge-archived { background: #e2e8f0; color: #475569; }
.pt-badge-dirty { background: #fef3c7; color: #92400e; }
.pt-card-actions { display: flex; gap: 4px; margin-top: 2px; }
.pt-rename { display: flex; gap: 4px; width: 100%; }
.pt-rename input { flex: 1; min-width: 0; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.pt-skel { min-height: 104px; background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%); background-size: 200% 100%; animation: pt-shimmer 1.2s infinite; }
@keyframes pt-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.pt-new-form {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 200px 1.4fr auto; gap: 10px; align-items: end;
  background: #fff; border: 1px dashed var(--accent); border-radius: 12px; padding: 12px 14px;
}
.pt-new-form label { display: flex; flex-direction: column; gap: 3px; font-size: 0.76rem; font-weight: 600; color: var(--text-2); }
.pt-new-form input, .pt-new-form select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-weight: 400; }
.pt-new-actions { display: flex; gap: 6px; }
.pt-new-hint { grid-column: 1 / -1; margin: 0; font-size: 0.75rem; }

/* ── Editor (Tool Map layout) ── */
.pt-editor { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--shadow-sm); }
.pt-editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.pt-editor-head h3 { margin: 0 0 2px; font-size: 1.05rem; }
.pt-editor-head p { margin: 0; font-size: 0.8rem; }
.pt-editor-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.pt-dirty { color: #92400e; background: #fef3c7; border-radius: 999px; padding: 2px 10px; font-size: 0.75rem; font-weight: 600; }
.pt-legend { margin-bottom: 10px; }
.pt-map { grid-template-columns: 132px repeat(9, minmax(0, 1fr)); }
.pt-map .map-cell { min-height: 60px; }
.pt-grp-btn, .pt-grp-static {
  all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 4px;
  font: inherit; color: inherit; line-height: 1.2;
}
.map-phase-header .pt-grp-btn, .map-phase-header .pt-grp-static { justify-content: center; flex-wrap: wrap; text-align: center; }
.pt-grp-btn { cursor: pointer; border-radius: 4px; }
.pt-grp-btn:hover { text-decoration: underline; }
.pt-grp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pt-grp-star { color: #ca8a04; font-size: 0.8rem; }
.pt-grp-btn[aria-pressed="true"] .pt-grp-star { color: #eab308; }
.pt-grp-count { font-weight: 500; opacity: .7; font-size: 0.6rem; }
.pt-bubble { transition: transform .1s, opacity .1s; }
.pt-bubble:not(.is-recommended):not(.pt-hidden) { opacity: .55; }
.pt-bubble.pt-hidden { background: #e2e8f0 !important; color: #94a3b8; cursor: not-allowed; opacity: .75; text-decoration: line-through; }
.pt-bubble[aria-disabled="true"]:not(.pt-hidden) { cursor: default; }
.pt-bubble:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pt-docs { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 8px 10px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; font-size: 0.72rem; }
.pt-docs-head { display: flex; flex-direction: column; gap: 2px; color: var(--accent); font-weight: 600; min-width: 132px; }
.pt-docs-head .muted { font-weight: 400; font-size: 0.68rem; }
.pt-docs-cells { display: flex; gap: 6px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .pt-card, .pt-bubble { transition: none; }
  .pt-skel { animation: none; }
}
