/* ═══ Floakly States ═══ */

/* ── Skeleton loaders ── */
.conv-skeleton {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
}
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.2s infinite;
  border-radius: 4px;
}
.skeleton-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.skeleton-line-1 { height: 13px; width: 120px; }
.skeleton-line-2 { height: 11px; width: 80px; margin-top: 6px; }

@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Typing indicator ── */
.typing-indicator {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px;
  background: var(--bg-bubble-them);
  border-radius: 18px 18px 18px 4px;
  width: fit-content;
}
.typing-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 16px;
  min-height: 32px;
}
.typing-name {
  font-size: 12px; color: var(--text-secondary);
  margin-right: 4px;
}
.typing-dot {
  width: 7px; height: 7px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

/* ── Message error ── */
.msg-error .bubble {
  border: 1px solid var(--danger);
}
.msg-error .msg-status {
  color: var(--danger);
}
.msg-retry-btn {
  background: none; border: none;
  color: var(--danger);
  font-size: 11px; cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-family: var(--font-sans);
}

/* ── Loading messages ── */
.loading-messages {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .typing-dot { animation: none; }
  .typing-dot:nth-child(2), .typing-dot:nth-child(3) { animation: none; }
}

/* ── Reconnect banner ── */
.reconnect-banner {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--danger-bg);
  color: var(--danger);
  text-align: center;
  padding: 8px;
  font-size: 13px;
  z-index: 1000;
}

/* ── Voice timer ── */
.voice-timer {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  font-size: 13px; color: var(--danger);
}
.rec-dot {
  width: 10px; height: 10px;
  background: var(--danger);
  border-radius: 50%;
  animation: rec-pulse 1s infinite;
}
@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Disappearing badge ── */
.disappearing-badge {
  font-size: 11px; color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px; border-radius: 10px;
  margin-right: 8px;
}

/* ── Translation badge ── */
.translation-badge {
  font-size: 11px; color: var(--text-secondary);
  margin-right: 8px;
}

/* ── Group info / side panels ── */
.side-panel {
  position: fixed; right: 0; top: 0;
  width: 340px; height: 100vh;
  background: #fff;
  border-left: 0.5px solid var(--border);
  z-index: 200;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0,0,0,0.08);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px;
  border-bottom: 0.5px solid var(--border);
}
.panel-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.panel-header button {
  background: none; border: none;
  font-size: 18px; cursor: pointer;
  color: var(--text-secondary);
}

/* ── Modal ── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 400px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

/* ── Camera ── */
.camera-card {
  background: #111; border-radius: 16px; overflow: hidden;
  width: 360px; max-width: 95vw;
}
.camera-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; color: #fff; font-size: 14px;
}
.camera-header button { color: #fff; background: none; border: none; font-size: 18px; cursor: pointer; }
#camera-preview { width: 100%; display: block; }
.camera-actions { display: flex; justify-content: center; padding: 16px; gap: 16px; }
.btn-capture {
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid #fff; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.capture-circle { width: 44px; height: 44px; border-radius: 50%; background: #fff; }

/* ── Form inputs ── */
.form-input-full {
  width: 100%; padding: 10px 14px; margin-bottom: 10px;
  border: 0.5px solid var(--border); border-radius: 8px;
  font-size: var(--font-size-base); font-family: var(--font-sans);
  outline: none; background: var(--bg-page); color: var(--text-primary);
}
.form-input-full:focus { border-color: var(--primary); }
.btn-primary-full {
  width: 100%; padding: 10px; border-radius: 8px;
  background: var(--primary); color: #fff;
  border: none; font-size: var(--font-size-base);
  font-family: var(--font-sans); font-weight: 500;
  cursor: pointer; transition: opacity 0.12s;
}
.btn-primary-full:hover { opacity: 0.88; }

/* ── Member chips ── */
.member-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.member-chip {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 500;
}
.member-chip button {
  background: none; border: none; color: inherit;
  cursor: pointer; font-size: 14px; padding: 0;
}

/* ── Results ── */
.nc-result {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 0.5px solid var(--border-light);
}
.nc-result:hover { background: var(--bg-conv-hover); }
