/* ==========================================================================
   Dojo Chat — live activity panel, web approval cards and the Projects
   Live card. Same console theme as style.css; variables come from there.
   ========================================================================== */

/* ───────── live activity panel ───────── */

.live-panel {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-image: var(--sheen), var(--fill);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}
.live-panel.live-running { border-color: rgba(93, 194, 30, 0.4); }

.live-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.live-dot {
  width: 9px; height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent);
}
.live-panel.live-running .live-dot { animation: pulse 1.2s ease-in-out infinite; }
.live-title {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-total {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.live-steps { list-style: none; margin: 0; padding: 4px 0; }
.live-steps.inside { padding: 0 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }

.live-step { margin: 0; }
.live-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.live-row:hover { background: rgba(93, 194, 30, 0.10); }

.live-mark {
  position: relative;
  width: 14px; height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.4);
}
.live-step.running .live-mark {
  border-color: rgba(126, 224, 58, 0.8);
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
}
.live-step.ok .live-mark {
  border-color: rgba(126, 224, 58, 0.6);
  background: rgba(93, 194, 30, 0.18);
}
.live-step.ok .live-mark::after {
  content: "";
  position: absolute;
  left: 3px; top: 2px;
  width: 4px; height: 8px;
  border: solid var(--accent-2);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.live-step.failed .live-mark {
  border-color: rgba(255, 140, 130, 0.7);
  background: rgba(255, 90, 80, 0.25);
}
.live-step.failed .live-mark::after {
  content: "!";
  position: absolute;
  left: 0; right: 0; top: -3px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--bad);
}

.live-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-step.running .live-label { font-weight: 600; }
.live-step.quiet .live-label { opacity: 0.6; }
.live-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.live-caret {
  flex: 0 0 auto;
  width: 0; height: 0;
  border-left: 6px solid var(--muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.16s;
}
.live-step.open .live-caret { transform: rotate(90deg); }

.live-text {
  max-height: 260px;
  overflow-y: auto;
  margin: 0 12px 10px 36px;
  padding: 10px 12px;
  border-left: 2px solid rgba(93, 194, 30, 0.35);
  background: rgba(0, 0, 0, 0.32);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
}

details.live-done { margin: 0; padding: 4px 12px 8px; }
details.live-done > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--accent-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
details.live-done > summary::before {
  content: "";
  width: 0; height: 0;
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.16s;
}
details.live-done[open] > summary::before { transform: rotate(90deg); }

/* ───────── "wants to open / search" card ───────── */

.web-ask {
  margin: 10px 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 212, 119, 0.45);
  border-radius: var(--radius);
  background-image: var(--sheen), linear-gradient(180deg, rgba(60,52,28,0.75), rgba(18,16,10,0.9));
  box-shadow: var(--panel-shadow);
}
.web-ask-head { margin: 0 0 4px; font-size: 14.5px; overflow-wrap: anywhere; }
.web-ask-target { color: var(--warn); }
.web-ask-note { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.web-ask-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.web-ask.settled { opacity: 0.8; border-color: var(--line); }
.web-ask-result {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ───────── saved web source ───────── */

.web-source {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: rgba(0, 0, 0, 0.32);
}
.web-source > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  font-size: 13px;
}
.web-source > summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0; height: 0;
  border-left: 6px solid var(--accent-2);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.16s;
}
.web-source[open] > summary::before { transform: rotate(90deg); }
.ws-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid rgba(93, 194, 30, 0.4);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ws-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-body { padding: 0 12px 12px; }
.ws-link { margin: 0 0 8px; font-size: 13px; overflow-wrap: anywhere; }
.ws-text {
  max-height: 300px;
  overflow: auto;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #d7e3d4;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ws-note { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; }

/* ───────── projects: LIVE badge and Live card ───────── */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid rgba(93, 194, 30, 0.5);
  border-radius: 999px;
  background: rgba(93, 194, 30, 0.14);
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.live-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.live-card {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-image: var(--sheen), var(--fill);
  box-shadow: var(--panel-shadow);
}
.live-card.working { border-color: rgba(93, 194, 30, 0.45); box-shadow: var(--panel-shadow), var(--glow); }
.lc-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.lc-off {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lc-title { flex: 1 1 200px; font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.lc-plan {
  margin: 0 0 8px;
  padding: 8px 11px;
  border-left: 3px solid rgba(93, 194, 30, 0.6);
  border-radius: 0 10px 10px 0;
  background: rgba(0, 0, 0, 0.3);
  color: #dbe6d8;
  font-size: 13.5px;
  font-style: italic;
}
.lc-el, .lc-msg { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; }
.lc-score { margin: 0 0 8px; font-size: 13px; color: var(--good); }
.lc-feed {
  max-height: 160px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
}
.lc-line {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.lc-line:last-child { color: #d7e3d4; }
