/* Remote Expert Assistance — live video, select & chat */

#expert-panel {
  position: relative;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
}

#expert-video-container {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

#expert-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#expert-video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.expert-select-ring {
  position: absolute;
  border: 3px solid #00ff88;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
  pointer-events: none;
  transition: all 0.2s ease;
}

#expert-chat {
  margin-top: 16px;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.expert-msg {
  padding: 6px 10px;
  margin: 4px 0;
  border-radius: 8px;
  font-size: 0.85rem;
}

.expert-msg.client {
  background: rgba(0, 229, 255, 0.15);
  border-left: 3px solid #00e5ff;
}

.expert-msg.expert {
  background: rgba(213, 0, 249, 0.15);
  border-left: 3px solid #d500f9;
}

#expert-chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

#expert-chat-input-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.85rem;
}

#expert-chat-input-row button {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #00e5ff, #d500f9);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
}

.expert-session-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expert-session-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00e5ff;
}

.expert-session-card.active {
  border-color: #00ff88;
}

#expert-element-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.expert-element-chip {
  padding: 4px 10px;
  border-radius: 16px;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.expert-element-chip:hover,
.expert-element-chip.selected {
  background: rgba(0, 255, 136, 0.25);
  border-color: #00ff88;
}

.expert-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.expert-badge.connected {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
}

.expert-badge.waiting {
  background: rgba(255, 183, 0, 0.2);
  color: #ffb700;
}