/* labs-chat.css — Labs listing/runner and Chat Room styles */

/* ---------- Labs ---------- */
.lab-card { display: flex; flex-direction: column; height: 100%; position: relative; }
.lab-card .top-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.lab-card .completed-badge {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--signal); text-transform: uppercase; letter-spacing: 0.04em;
}
.lab-card .meta-row {
  margin-top: auto; padding-top: 16px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint);
}

.lab-briefing {
  background: var(--bg-raised);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--info);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 24px;
  white-space: pre-line;
  font-size: 0.98rem;
  line-height: 1.7;
}
.lab-briefing.summary-block { border-left-color: var(--signal); }

.lab-progress-dots { display: flex; gap: 6px; margin-bottom: 24px; }
.lab-progress-dot {
  width: 28px; height: 5px; border-radius: 3px;
  background: var(--panel-border);
  transition: background 0.2s;
}
.lab-progress-dot.done { background: var(--signal); }
.lab-progress-dot.current { background: var(--info); }

.lab-choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--ink);
  font-size: 0.96rem;
  cursor: pointer;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.lab-choice-btn:hover:not(:disabled) { border-color: var(--ink-faint); }
.lab-choice-btn:disabled { cursor: default; }
.lab-choice-btn.correct { border-color: var(--signal); background: rgba(61,220,151,0.1); }
.lab-choice-btn.incorrect { border-color: var(--alert); background: rgba(255,107,94,0.1); }

.lab-feedback {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-top: 8px;
  margin-bottom: 20px;
}
.lab-feedback.correct { background: rgba(61,220,151,0.08); border: 1px solid var(--signal-dim); color: var(--ink); }
.lab-feedback.incorrect { background: rgba(255,107,94,0.08); border: 1px solid var(--alert-dim); color: var(--ink); }

.lab-freeform textarea { min-height: 80px; }

.lab-nav-row { display: flex; justify-content: space-between; margin-top: 24px; }

/* ---------- Chat Room ---------- */
.chat-shell {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  height: 70vh;
  min-height: 480px;
}
.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-border);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-raised);
}
.chat-header .room-name { font-family: var(--font-display); font-weight: 600; }
.chat-header .online-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--signal); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-message { display: flex; flex-direction: column; gap: 2px; max-width: 80%; }
.chat-message.own { align-self: flex-end; align-items: flex-end; }
.chat-message .msg-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  display: flex; gap: 8px;
}
.chat-message .msg-bubble {
  background: var(--bg-raised);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.92rem;
  word-break: break-word;
  white-space: pre-wrap;
}
.chat-message.own .msg-bubble { background: rgba(91,141,239,0.12); border-color: var(--info); }
.chat-message.system .msg-bubble {
  background: transparent; border: none; color: var(--ink-faint);
  font-family: var(--font-mono); font-size: 0.78rem; font-style: italic; padding: 2px 0;
}

.chat-input-row {
  border-top: 1px solid var(--panel-border);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  background: var(--bg-raised);
}
.chat-input-row input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 0.92rem;
}
.chat-input-row input:focus { border-color: var(--signal); outline: none; }

.chat-sidebar {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.chat-sidebar h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); margin-bottom: 14px; }
.chat-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chat-rules li { font-size: 0.85rem; color: var(--ink-dim); display: flex; gap: 8px; }

.chat-login-gate {
  text-align: center;
  padding: 64px 24px;
}

@media (max-width: 800px) {
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-main { height: 60vh; min-height: 420px; }
}
