/* The Pictos PoS and SalesPulse cards, shown in the Pictos thread (moved there
   from the Work page). The card itself (.proj-*) is styled by the main
   stylesheet; this file adds the SalesPulse tabs and fits the cards into the
   thread column. Loaded by the Recently pages only. */

/* ------------------------------------------------ Cards inside a thread post
   The post column is narrower than the Work page, so the cards stack. */
.thread-post .proj-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 14px 0 6px; }
.thread-post .proj { padding: 16px; }

/* ------------------------------------------------ SalesPulse: what is inside
   Six areas, one shown at a time. Without JavaScript the tab row is hidden and
   every area is listed under its own heading. */
.sp-map {
  margin: 4px 0 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-primary);
}
.sp-map-lead {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.sp-tabs { display: none; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.js .sp-tabs { display: flex; }
.sp-tab {
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-secondary);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.sp-tab:hover { color: var(--text-primary); border-color: var(--text-primary); }
.sp-tab[aria-selected='true'] {
  color: var(--primary-contrastText);
  background: var(--primary-main);
  border-color: var(--primary-main);
}
.sp-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sp-panel[hidden] { display: none; }
.sp-map .sp-panel-name { margin: 14px 0 6px; font-size: 14px; }
.js .sp-panel-name { display: none; }

.sp-map .sp-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-map .sp-list li {
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid var(--border-primary);
  font-size: 14px;
  line-height: 1.4;
}
/* A freshly opened area fills in from the top, one row after another. */
.js .sp-panel.is-fresh .sp-list li {
  animation: sp-row 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.js .sp-panel.is-fresh .sp-list li:nth-child(n + 3) { animation-delay: 0.04s; }
.js .sp-panel.is-fresh .sp-list li:nth-child(n + 5) { animation-delay: 0.08s; }
.js .sp-panel.is-fresh .sp-list li:nth-child(n + 7) { animation-delay: 0.12s; }
.js .sp-panel.is-fresh .sp-list li:nth-child(n + 9) { animation-delay: 0.16s; }
.js .sp-panel.is-fresh .sp-list li:nth-child(n + 11) { animation-delay: 0.2s; }
@keyframes sp-row {
  from { opacity: 0; transform: translateY(6px); }
}

@media (max-width: 560px) {
  .sp-map .sp-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .js .sp-panel.is-fresh .sp-list li { animation: none; }
  .sp-tab { transition: none; }
}

