/* ============================================================
   STEP 1: Stream tags + status-driven cards
   Append this file to your existing styles.css, or load it
   separately after styles.css.
   ============================================================ */

/* ---------- Stream chips (inline, used in cards & elsewhere) ---------- */

.stream-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

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

.stream-chip-empty {
  background: transparent;
  border: 0.5px dashed rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.45);
  font-style: italic;
}

/* ---------- Stream filter chips (dashboard header) ---------- */

.stream-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.stream-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stream-filter-chip:hover {
  background: rgba(0, 0, 0, 0.04);
}

.stream-filter-chip.is-active {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.35);
  font-weight: 500;
}

.stream-filter-chip.is-untagged {
  border-style: dashed;
  opacity: 0.7;
}

.stream-filter-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stream-filter-chip-count {
  font-size: 11px;
  opacity: 0.6;
  margin-left: 4px;
}

/* ---------- Account cards (new aesthetic) ---------- */

.account-card {
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  background: var(--card-bg-default, transparent);
  font-family: inherit;
}

.account-card:hover {
  transform: translateY(-1px);
}

.account-card.has-status {
  border-color: transparent;
}

.account-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.account-card .card-id-block {
  min-width: 0; /* allow truncation */
  flex: 1;
}

.account-card .card-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

.account-card .card-sub {
  font-size: 12px;
  margin-top: 2px;
  opacity: 0.95;
}

.account-card .card-status-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.account-card .card-streams {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.account-card .card-stats {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 8px;
}

.account-card .card-stat {
  flex: 1;
  min-width: 0;
}

.account-card .card-stat-lbl {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 2px;
}

.account-card .card-stat-val {
  font-size: 13px;
  font-weight: 500;
}

.account-card .card-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.account-card .card-action-flag {
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
}

.account-card .card-action-prompt {
  font-weight: 500;
}

.account-card .card-action-detail {
  opacity: 0.75;
}

.account-card .card-action-arrow {
  margin-left: auto;
  opacity: 0.7;
  font-size: 14px;
}

/* ---------- Stream tags editor (in account panel) ---------- */

.stream-tags-editor {
  margin: 16px 0;
}

.ste-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.ste-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ste-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ste-chip:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ste-chip.is-active {
  font-weight: 500;
  border-width: 1px;
}

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

.ste-hint {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 8px;
  font-style: italic;
}

/* ---------- Optional: dark mode safety ---------- */

@media (prefers-color-scheme: dark) {
  .stream-filter-chip { border-color: rgba(255, 255, 255, 0.2); }
  .stream-filter-chip:hover { background: rgba(255, 255, 255, 0.05); }
  .stream-filter-chip.is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
  }
  .stream-chip-empty {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
  }
  .account-card { border-color: rgba(255, 255, 255, 0.1); }
  .account-card .card-stats {
    border-top-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  .ste-chip { border-color: rgba(255, 255, 255, 0.2); }
  .ste-chip:hover { background: rgba(255, 255, 255, 0.05); }
}
