/**
 * WO-43 T2: MiniMe Activity Tab CSS
 * Dark Theme — QANTIQ Nest v1.4 UI Shell
 */

.minime-activity {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  color: #e0e0e0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Stats Bar ── */
.minime-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-card {
  background: #1a1a24;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  display: block;
}
.stat-label {
  font-size: 11px;
  color: #707080;
  margin-top: 2px;
  display: block;
}

/* ── Section Headers ── */
.minime-section {
  margin-top: 16px;
  flex-shrink: 0;
}
.minime-section h3 {
  font-size: 13px;
  color: #707080;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Meetings ── */
.meetings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}
.meeting-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #1a1a24;
  border-radius: 8px;
  border-left: 3px solid #22c55e;
  cursor: pointer;
  min-height: 48px;
  transition: background 120ms;
}
.meeting-card:hover {
  background: #222230;
}
.meeting-card:active {
  transform: scale(0.98);
}
.meeting-status {
  font-size: 10px;
}
.meeting-status.active {
  color: #22c55e;
}
.meeting-info {
  flex: 1;
  min-width: 0;
}
.meeting-topic {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meeting-meta {
  font-size: 11px;
  color: #707080;
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}
.meeting-rounds {
  background: #2a2a38;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
}
.meeting-time {
  font-size: 11px;
  color: #505060;
  flex-shrink: 0;
}

/* ── Decisions ── */
.decisions-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}
.decision-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #1a1a24;
  border-radius: 6px;
  font-size: 12px;
  min-height: 36px;
}
.decision-gate {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}
.decision-gate.autonom {
  background: #1a3a1a;
  color: #22c55e;
}
.decision-gate.vorschlag {
  background: #3a2a18;
  color: #e89030;
}
.decision-gate.rueckfrage {
  background: #3a2a08;
  color: #f59e0b;
}
.decision-gate.eskalation {
  background: #3a1a1a;
  color: #ef4444;
}
.decision-agent {
  color: #9090a0;
  flex-shrink: 0;
}
.decision-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.decision-confidence {
  font-weight: 600;
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}
.decision-time {
  color: #505060;
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Channel Selector ── */
.channel-selector {
  margin-bottom: 8px;
}
.channel-selector select {
  width: 100%;
  padding: 8px 12px;
  background: #1a1a24;
  border: 1px solid #2a2a38;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 13px;
  outline: none;
}
.channel-selector select:focus {
  border-color: #a050e0;
}

/* ── MiniMe Feed ── */
.minime-feed {
  max-height: 300px;
  overflow-y: auto;
}
.minime-feed::-webkit-scrollbar {
  width: 4px;
}
.minime-feed::-webkit-scrollbar-thumb {
  background: #2a2a38;
  border-radius: 2px;
}

.minime-feed-msg {
  background: #2a2018;
  border-left: 2px solid #e89030;
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.feed-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 4px;
}
.feed-msg-agent {
  color: #e89030;
  font-weight: 600;
}
.feed-msg-type {
  color: #707080;
  background: #1a1a24;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
}
.feed-msg-conf {
  font-weight: 600;
  margin-left: auto;
}
.feed-msg-time {
  color: #505060;
  font-size: 10px;
}
.feed-msg-body {
  font-size: 12px;
  color: #c0c0c0;
  line-height: 1.4;
}

/* ── Empty State ── */
.minime-empty {
  text-align: center;
  padding: 24px;
  color: #505060;
  font-size: 13px;
}

/* ── Transcript Overlay ── */
.transcript-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.transcript-panel {
  background: #111118;
  border: 1px solid #2a2a38;
  border-radius: 12px;
  width: 90vw;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}
.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #1a1a24;
  font-size: 15px;
}
.transcript-body {
  padding: 16px;
}
.transcript-round {
  margin-bottom: 12px;
  padding: 10px;
  background: #1a1a24;
  border-radius: 8px;
  border-left: 3px solid #e89030;
}

/* ── Scrollbar (delegated sections) ── */
.meetings-list::-webkit-scrollbar,
.decisions-list::-webkit-scrollbar {
  width: 4px;
}
.meetings-list::-webkit-scrollbar-thumb,
.decisions-list::-webkit-scrollbar-thumb {
  background: #2a2a38;
  border-radius: 2px;
}

/* ── Responsive (≤768px) ── */
@media (max-width: 768px) {
  .minime-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .meeting-card {
    flex-wrap: wrap;
  }
  .meeting-time {
    width: 100%;
    text-align: left;
    margin-top: 4px;
  }
}
