/* Öffentliche Profile, Suche, Freunde und Follower. Nutzt die Palette aus
   camera.css und Bausteine aus profile.css; hier nur das Soziale obendrauf. */

.social-app { min-height: 100dvh; }
.social-layout { max-width: 760px; margin: 0 auto; padding: 44px 22px 90px; display: flex; flex-direction: column; gap: 18px; }
.social-app .topbar { position: sticky; top: 0; }

.social-back { display: inline-flex; align-items: center; gap: 9px; color: #dce3ef; text-decoration: none; font-size: 13px; padding: 6px 0; align-self: flex-start; }
.social-back:hover { color: #fff; }

/* ---- Zustände (Laden / Fehler / nicht gefunden) ---- */
.social-state { text-align: center; padding: 54px 18px; color: var(--muted); line-height: 1.7; }
.social-state i { display: block; font-size: 40px; margin-bottom: 16px; color: #93a0b8; }
.social-state strong { display: block; color: #dce3ef; font-size: 17px; font-weight: 550; margin-bottom: 8px; }
.social-state .primary-button, .social-state .quiet-button { margin: 18px auto 0; }
.social-spinner { width: 30px; height: 30px; margin: 0 auto 16px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--purple); animation: social-spin .8s linear infinite; }
@keyframes social-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .social-spinner { animation-duration: 2.4s; } }

/* ---- Profilkopf ---- */
.social-head { display: flex; gap: 22px; align-items: flex-start; }
.social-head .profile-photo { width: 96px; height: 96px; flex-basis: 96px; font-size: 36px; }
.social-head-body { min-width: 0; flex: 1; }
.social-head-body h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 640; letter-spacing: -.8px; overflow-wrap: anywhere; }
.social-rel-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; color: #cdd6e5; border: 1px solid #2c3948; background: #141f30; border-radius: 20px; padding: 5px 11px; }
.social-rel-pill.friends { color: #79cfb0; border-color: #24483e; background: #102a24; }
.social-bio { color: #b4bfd0; line-height: 1.7; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 12px; }
.social-bio:empty { display: none; }

/* ---- Zahlen (Freunde / Follower / Gefolgt) ---- */
.social-stats { display: flex; gap: 10px; margin: 16px 0 4px; flex-wrap: wrap; }
.social-stat { flex: 1 1 120px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 12px 14px; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.social-stat:hover { border-color: #7d6cf2; }
.social-stat[aria-pressed="true"] { border-color: var(--purple); background: #221d40; }
.social-stat b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.4px; }
.social-stat span { font-size: 11px; color: var(--muted); }

/* ---- Aktionsknöpfe ---- */
.social-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.social-actions button { flex: 0 0 auto; }
.social-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 11px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #141f30; color: #dce3ef; }
.social-btn:hover:not(:disabled) { border-color: #7d6cf2; }
.social-btn:disabled { opacity: .55; cursor: not-allowed; }
.social-btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.social-btn.active { background: #221d40; border-color: var(--purple); color: #e1d6ff; }
.social-btn.danger { color: #e59b9f; }
.social-btn.danger:hover:not(:disabled) { border-color: #a2545a; color: #ffd0d3; }

/* ---- Suche ---- */
.social-search { position: relative; }
.social-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--muted); }
.social-search input { width: 100%; min-width: 0; font: inherit; font-size: 14px; color: var(--text); background: #08111e; border: 1px solid #2b3545; border-radius: 10px; padding: 13px 14px 13px 42px; }
.social-search input:focus-visible { outline: 2px solid var(--purple-soft); outline-offset: 2px; }

/* ---- Listen (Suche, Freunde, Follower, Anfragen) ---- */
.social-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.social-row { display: flex; align-items: center; gap: 13px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.social-row:last-child { border-bottom: 0; }
.social-row-link { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.social-row-link:hover .social-row-name { color: #fff; }
.social-row .account-avatar { width: 42px; height: 42px; flex-shrink: 0; font-size: 16px; background: #1b2637; color: #bdc7d6; }
.social-row-body { min-width: 0; }
.social-row-name { display: block; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.social-row-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.social-row-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.social-mini { border: 1px solid var(--line); background: #141f30; color: #dce3ef; border-radius: 8px; padding: 8px 11px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.social-mini:hover:not(:disabled) { border-color: #7d6cf2; }
.social-mini:disabled { opacity: .55; cursor: not-allowed; }
.social-mini.danger { color: #e59b9f; }

/* ---- Tab-Leiste (Hub + Profil-Unterlisten) ---- */
.social-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.social-tab { border: 1px solid var(--line); background: transparent; color: #aab6c7; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 12px; cursor: pointer; }
.social-tab:hover { color: #fff; }
.social-tab[aria-selected="true"] { color: #e1d6ff; background: #1a1d36; border-color: #4b4570; }
.social-tab .count-badge { margin-left: 7px; }

.social-app .interest-list span { font-size: 11px; }
.social-app .badge-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.social-app .badge-list span { font-size: 11px; color: #ffe1ad; border: 1px solid #4a3d24; background: #241d10; border-radius: 20px; padding: 5px 10px; }
.social-level { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.social-level b { color: #d8cfff; font-size: 13px; }

/* ---- Profilknopf am Gesprächspartner (im Videochat) ---- */
.remote-profile-button { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px; background: rgba(255, 255, 255, .1); color: #f5f7fb; font-size: 11px; font-weight: 600; cursor: pointer; }
.remote-profile-button:hover { background: rgba(255, 255, 255, .2); }
.remote-profile-button i { font-size: 15px; }

/* ---- In-Call-Overlay (öffnet, ohne den Videochat zu beenden) ---- */
#peer-profile-dialog { width: min(440px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); padding: 0; }
#peer-profile-dialog::backdrop { background: rgba(3, 7, 14, .62); }
.peer-profile-card { padding: 22px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: calc(100dvh - 32px); }
.peer-profile-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.peer-profile-card header h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.peer-profile-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 2px; }
.peer-profile-head { display: flex; gap: 14px; align-items: center; margin: 12px 0; }
.peer-profile-head .profile-photo { width: 60px; height: 60px; flex-basis: 60px; font-size: 24px; }
.peer-profile-stats { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.peer-profile-stats b { color: #d8cfff; }
.peer-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.peer-profile-open { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--purple-soft); text-decoration: none; }
.peer-profile-open:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .social-layout { padding: 30px 15px calc(70px + env(safe-area-inset-bottom)); }
  .social-head { gap: 15px; }
  .social-head .profile-photo { width: 72px; height: 72px; flex-basis: 72px; font-size: 27px; }
  .social-actions button { flex: 1 1 calc(50% - 5px); justify-content: center; }
  .social-row-actions { width: 100%; justify-content: flex-start; padding-left: 55px; }
}
@media (max-width: 380px) {
  .social-stats { flex-direction: column; }
  .social-actions button { flex-basis: 100%; }
}
