/* styles/social.css */

/* ── Auth Screen ─────────────────────────────────────────────────────────── */
.auth-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.auth-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(56,189,248,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(129,140,248,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px;
}

.auth-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 6px;
}
.auth-logo span { color: var(--accent2); }

.auth-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus {
  border-color: rgba(56,189,248,0.4);
}
.field select {
  appearance: none;
  cursor: pointer;
}

.primary-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(56,189,248,0.25), rgba(129,140,248,0.25));
  border: 1px solid rgba(56,189,248,0.4);
  border-radius: 12px;
  padding: 14px;
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  letter-spacing: 0.03em;
}
.primary-btn:active { transform: scale(0.98); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ghost-btn {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}
.ghost-btn:active { color: var(--text); }

.auth-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 14px;
  line-height: 1.5;
}

.sent-icon { font-size: 2.5rem; margin-bottom: 12px; }
.sent-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent3);
  margin-bottom: 10px;
}
.sent-msg { color: var(--muted); font-size: 0.85rem; line-height: 1.6; margin-bottom: 20px; }

/* ── Header actions ───────────────────────────────────────────────────────── */
.header-actions {
  display: flex;
  gap: 6px;
}

/* ── Section labels ───────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 12px 0 8px;
}

/* ── Search bar ───────────────────────────────────────────────────────────── */
.search-bar {
  margin-bottom: 8px;
}
.search-bar input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: rgba(56,189,248,0.4); }

/* ── Contact cards ────────────────────────────────────────────────────────── */
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.contact-card:active { border-color: rgba(56,189,248,0.3); }

.contact-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(129,140,248,0.2));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-info { flex: 1; min-width: 0; }
.contact-name {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-lang { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.contact-arrow { color: var(--muted); font-size: 1.2rem; }

.unread-badge {
  background: var(--accent);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 20px;
  text-align: center;
}

.request-actions { display: flex; gap: 6px; }
.accept-btn {
  background: rgba(52,211,153,0.15);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--accent3);
  cursor: pointer;
  font-size: 0.9rem;
}
.decline-btn {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.9rem;
}

.add-btn {
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 32px 16px;
  line-height: 1.6;
}

.loading {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 24px;
}

.muted { color: var(--muted); }

/* ── Chat page ────────────────────────────────────────────────────────────── */
.back-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-header-info { flex: 1; text-align: center; }
.chat-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.chat-langs { font-size: 0.7rem; color: var(--muted); }

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message { display: flex; flex-direction: column; max-width: 80%; }
.message-mine { align-self: flex-end; align-items: flex-end; }
.message-theirs { align-self: flex-start; align-items: flex-start; }

.message-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  position: relative;
}
.message-mine .message-bubble {
  background: linear-gradient(135deg, rgba(56,189,248,0.1), rgba(129,140,248,0.1));
  border-color: rgba(56,189,248,0.2);
}

.message-original {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 4px;
}
.message-translation {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 6px;
}
.message-play {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
}
.message-time {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
  padding: 0 4px;
}

/* ── Chat input bar ───────────────────────────────────────────────────────── */
.chat-input-bar {
  border-top: 1px solid var(--border);
  padding: 12px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-status {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.chat-transcript {
  font-size: 0.85rem;
  color: var(--text);
  text-align: center;
  min-height: 20px;
  max-width: 280px;
  line-height: 1.4;
}

.chat-controls { display: flex; justify-content: center; }

.chat-mic-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0f2040, #0a1628);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.chat-mic-btn.recording {
  border-color: rgba(248,113,113,0.5);
  box-shadow: 0 0 20px rgba(248,113,113,0.2);
}
.chat-mic-btn.processing {
  border-color: rgba(56,189,248,0.5);
  animation: processingPulse 1.5s ease-in-out infinite;
}
.chat-mic-btn:active { transform: scale(0.96); }

/* ── New message badge ───────────────────────────────────────────────────── */
.new-msg-badge {
  background: var(--accent);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  text-align: center;
  margin-bottom: 8px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
