/* ── Activity Widget v2 — Heatmap + Summary ── */

/* Summary bars */
.act-summary {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .8rem;
}

.act-summary-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
}

.act-summary-emoji {
  min-width: 1.2rem;
  text-align: center;
  font-size: .85rem;
}

.act-summary-label {
  min-width: 5.5rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-summary-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}

.act-summary-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}

.act-summary-val {
  font-size: .68rem;
  font-family: var(--mono, monospace);
  opacity: .5;
  min-width: 3rem;
  text-align: right;
}

/* Period tabs */
.act-period-tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: .6rem;
}

.act-period-tab {
  background: none;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 4px;
  color: var(--muted, #888);
  font-size: .65rem;
  font-family: var(--mono, monospace);
  padding: 2px 8px;
  cursor: pointer;
  transition: all .15s;
}

.act-period-tab.active {
  background: var(--accent, #007aff);
  border-color: var(--accent, #007aff);
  color: #fff;
}

/* Heatmap grid */
.act-heatmap-section {
  margin-top: .6rem;
}

.act-heatmap-title {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .35;
  margin-bottom: .4rem;
}

.act-heatmap-wrap {
  overflow-x: auto;
  padding-bottom: .3rem;
}

.act-heatmap {
  display: grid;
  grid-template-rows: repeat(24, 1fr);
  grid-auto-flow: column;
  gap: 2px;
  min-width: fit-content;
}

.act-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255,255,255,.04);
  transition: background .2s;
  position: relative;
}

.act-cell:hover {
  outline: 1px solid rgba(255,255,255,.3);
  z-index: 1;
}

.act-cell[title] { cursor: default; }

/* Day labels under heatmap */
.act-heatmap-days {
  display: flex;
  gap: 2px;
  margin-top: 3px;
}

.act-heatmap-day {
  width: 12px;
  font-size: .5rem;
  text-align: center;
  opacity: .3;
  font-family: var(--mono, monospace);
}

/* Hour labels */
.act-heatmap-container {
  display: flex;
  gap: 3px;
}

.act-heatmap-hours {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 0;
}

.act-heatmap-hour {
  height: 12px;
  font-size: .5rem;
  line-height: 12px;
  opacity: .25;
  font-family: var(--mono, monospace);
  text-align: right;
  min-width: 14px;
}

/* Live indicator */
.act-live-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .5rem;
  border-radius: 6px;
  background: rgba(58,210,159,.06);
  border: 1px solid rgba(58,210,159,.12);
  margin-bottom: .6rem;
}

.act-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ad29f;
  animation: act-pulse 2s infinite;
}

@keyframes act-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.act-live-emoji { font-size: 1rem; }

.act-live-label {
  font-size: .78rem;
  font-weight: 500;
  flex: 1;
}

.act-live-since {
  font-size: .65rem;
  font-family: var(--mono, monospace);
  opacity: .4;
}

/* Legend */
.act-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .5rem;
}

.act-legend-item {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .6rem;
  opacity: .5;
}

.act-legend-color {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
