/* ── room.css ── */

/* Live green pulsing dot in the top bar */
.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #B9F044;
  animation: pulseGreen 1.6s infinite;
}
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0   rgba(185,240,68,0.7); }
  100% { box-shadow: 0 0 0 10px rgba(185,240,68,0); }
}

/* ── CodeMirror host ── */
#editor-wrap .CodeMirror {
  height: 100%;
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  line-height: 1.65;
  border-radius: 0;
}
#editor-wrap {
  background: #282A36;  /* dracula bg */
}

/* ── Tab buttons ── */
.tab-btn {
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.active-tab {
  color: #B9F044;
  border-bottom-color: #B9F044;
}

/* ── Whiteboard tool buttons ── */
.wb-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #94A3B8;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.wb-tool:hover { color: #fff; background: rgba(255,255,255,0.08); }
.active-tool   { color: #B9F044 !important; border-color: #B9F044 !important; background: rgba(185,240,68,0.12) !important; }

.wb-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #94A3B8;
  transition: color 0.15s, background 0.15s;
}
.wb-action:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ── Chat bubble ── */
.chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}
.chat-bubble.me   { align-self: flex-end;  align-items: flex-end; }
.chat-bubble.peer { align-self: flex-start; align-items: flex-start; }

.chat-bubble .name { font-size: 10px; font-weight: 700; margin-bottom: 2px; color: #B9F044; }
.chat-bubble.me .name { color: #94A3B8; }

.chat-bubble .msg {
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
  background: rgba(255,255,255,0.07);
  color: #e2e8f0;
}
.chat-bubble.me .msg {
  background: #B9F044;
  color: #0B1F17;
}

.chat-system {
  text-align: center;
  font-size: 10px;
  color: #475569;
  padding: 2px 0;
}

/* ── Cursor label that floats over the whiteboard ── */
.peer-cursor {
  position: absolute;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  z-index: 10;
  transition: left 0.05s linear, top 0.05s linear;
}
.peer-cursor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.peer-cursor-name {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,0.6);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Responsive: stack on small screens ── */
@media (max-width: 640px) {
  #workspace { flex-direction: column !important; }
  #workspace > div:first-child { width: 100% !important; height: 50vh; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* ── Voice Call Controls & Animations ── */
.voice-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #B9F044;
  animation: voicePulse 1.4s infinite;
}
@keyframes voicePulse {
  0%   { box-shadow: 0 0 0 0 rgba(185,240,68,0.7); }
  100% { box-shadow: 0 0 0 8px rgba(185,240,68,0); }
}

.voice-speaking {
  border-color: #B9F044 !important;
  box-shadow: 0 0 10px rgba(185, 240, 68, 0.4);
  animation: speakingGlow 0.8s infinite alternate;
}
@keyframes speakingGlow {
  from { box-shadow: 0 0 4px rgba(185, 240, 68, 0.3); }
  to   { box-shadow: 0 0 14px rgba(185, 240, 68, 0.7); }
}

