/* ============================================================
   STEP 3: Universal infographic row (RowRenderer styles).
   Replaces the simpler row styles from v3.
   Append AFTER styles-additions-v3.css.
   ============================================================ */

/* ---------- Universal infographic row ---------- */

.rr-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  border-radius: 12px;
  margin-bottom: 6px;
  cursor: pointer;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease;
}

.rr-row:hover { transform: translateY(-1px); }

.rr-icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.rr-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.rr-star {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  cursor: pointer;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}

.rr-star:hover { transform: scale(1.15); }

.rr-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rr-line1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.rr-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.rr-name-sub {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
}

.rr-action {
  font-size: 13px;
  opacity: 0.85;
  flex: 1;
  min-width: 0;
}

.rr-due {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rr-streams {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rr-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  font-weight: 400;
}

.rr-chip-empty {
  background: transparent;
  border: 0.5px dashed currentColor;
  font-style: italic;
  opacity: 0.6;
}

.rr-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Context strip ---------- */

.rr-context {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding-top: 8px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rr-context-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rr-context-lbl {
  font-size: 9.5px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-context-val {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.rr-context-sub {
  font-size: 10px;
  opacity: 0.65;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Sparkline ---------- */

.rr-spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  height: 12px;
}

.rr-spark-bar {
  width: 3px;
  background: currentColor;
  opacity: 0.55;
  border-radius: 1px;
  min-height: 1px;
}

/* ---------- Win prob bubble overlay (right side, semi-transparent) ---------- */

.rr-winprob {
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -1.5px;
  -webkit-text-stroke: 1.2px currentColor;
  color: transparent;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  font-family: inherit;
}

/* ---------- Responsive: collapse context strip on narrow screens ---------- */

@media (max-width: 540px) {
  .rr-context {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .rr-context-cell:nth-child(4),
  .rr-context-cell:nth-child(5) {
    display: none;
  }
  .rr-winprob {
    font-size: 28px;
  }
}

/* ---------- Override old activity/quote/dormant row styles ---------- */
/* The .al-card, .ql-row, .da-row classes from v3 are no longer used by the
   list renderers (everything goes through .rr-row), but the group header
   styles are still in use. The .da-list grid is also no longer used.
   We leave v3's headers untouched. */

.da-list,
.al-card,
.ql-row,
.da-row {
  /* legacy classes — no longer rendered, but kept defined to avoid
     accidental visual regression if anywhere still references them. */
}

/* ---------- Dark mode safety ---------- */

@media (prefers-color-scheme: dark) {
  .rr-context { border-top-color: rgba(255, 255, 255, 0.1); }
  .rr-chip { background: rgba(255, 255, 255, 0.08); }
}
