/* Round Table Orchestration Feed — Command Center style, always-on visibility */

#rh-rt-orch-root {
  position: fixed;
  right: 16px;
  bottom: 96px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(52vh, 520px);
  z-index: 99940;
  font-family: 'Poppins', system-ui, sans-serif;
  color: #e5e7eb;
  display: none;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e3f52;
  background: linear-gradient(180deg, #0b1520 0%, #060a12 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(24, 176, 144, 0.12);
}

#rh-rt-orch-root.rh-rt-open {
  display: flex;
}

#rh-rt-orch-root.rh-rt-minimized .rh-rt-body {
  display: none;
}

.rh-rt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #022c48;
  border-bottom: 1px solid #1e3f52;
  cursor: move;
  user-select: none;
}

.rh-rt-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rh-rt-title .rh-rt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18b090;
  box-shadow: 0 0 8px #18b090;
  animation: rh-rt-pulse 1.4s ease-in-out infinite;
}

@keyframes rh-rt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.rh-rt-sub {
  font-size: 10px;
  color: #8eabb4;
  font-family: ui-monospace, monospace;
  margin-top: 2px;
}

.rh-rt-actions {
  display: flex;
  gap: 4px;
}

.rh-rt-actions button {
  background: transparent;
  border: 1px solid #1e3f52;
  color: #8eabb4;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.rh-rt-actions button:hover {
  color: #18b090;
  border-color: #18b090;
}

.rh-rt-agents {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(30, 63, 82, 0.7);
  background: rgba(17, 34, 51, 0.6);
}

.rh-rt-agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(24, 176, 144, 0.1);
  border: 1px solid rgba(24, 176, 144, 0.3);
  color: #18b090;
}

.rh-rt-agent-chip img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.rh-rt-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  max-height: 340px;
}

.rh-rt-turn {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 12px;
  background: #0a121c;
  border: 1px solid rgba(30, 63, 82, 0.8);
  font-size: 12px;
  line-height: 1.45;
  animation: rh-rt-in 0.25s ease-out;
}

@keyframes rh-rt-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.rh-rt-turn.rh-rt-resi {
  border-color: rgba(24, 176, 144, 0.45);
}
.rh-rt-turn.rh-rt-hawk {
  border-color: rgba(231, 76, 60, 0.4);
}
.rh-rt-turn.rh-rt-becky {
  border-color: rgba(147, 51, 234, 0.4);
}
.rh-rt-turn.rh-rt-tally {
  border-color: rgba(238, 174, 71, 0.45);
}
.rh-rt-turn.rh-rt-spike {
  border-color: rgba(34, 197, 94, 0.4);
}
.rh-rt-turn.rh-rt-charles {
  border-color: rgba(4, 191, 225, 0.4);
}

.rh-rt-turn-meta {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8eabb4;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rh-rt-turn-meta img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.rh-rt-decision {
  margin-top: 6px;
  font-size: 10px;
  color: #eeae47;
  font-family: ui-monospace, monospace;
}

.rh-rt-footer {
  padding: 8px 12px;
  border-top: 1px solid #1e3f52;
  font-size: 10px;
  color: #8eabb4;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: rgba(2, 44, 72, 0.5);
}

.rh-rt-footer a {
  color: #18b090;
  text-decoration: none;
}

.rh-rt-empty {
  text-align: center;
  color: #8eabb4;
  font-size: 12px;
  padding: 24px 12px;
}

/* Launcher pill when closed but story active */
#rh-rt-orch-launcher {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 99939;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #022c48;
  border: 1px solid #18b090;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#rh-rt-orch-launcher.rh-rt-show {
  display: inline-flex;
}

#rh-rt-orch-launcher .rh-rt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18b090;
  animation: rh-rt-pulse 1.4s ease-in-out infinite;
}

@media (max-width: 640px) {
  #rh-rt-orch-root {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 80px;
    max-height: 45vh;
  }
}
