/* ── Social Feed ─────────────────────────────────────────────────────────── */
.social-container { max-width: 600px; margin: 0 auto; padding: 0 8px; }
.btn-social { position: relative; }
.social-badge {
  position: absolute; top: -4px; right: -4px;
  background: #e53935; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 5px; border-radius: 999px;
  min-width: 16px; text-align: center;
  animation: pulse-dot 1.5s infinite;
}
.social-tabs {
  display: flex; background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.social-tab {
  flex: 1; text-align: center;
  padding: 14px 8px; font-size: 14px;
  color: var(--muted); cursor: pointer;
  border: none; background: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font); font-weight: 500;
  transition: color var(--trans);
}
.social-tab.active {
  color: var(--teal); font-weight: 700;
  border-bottom-color: var(--teal);
}
.social-compose {
  display: flex; align-items: center; gap: 8px;
  background: var(--white); border-radius: 12px;
  padding: 10px; margin: 8px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.social-compose-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.social-compose-avatar img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
}
.social-compose-input {
  flex: 1; background: var(--bg); border-radius: 20px;
  padding: 10px 14px; font-size: 13px;
  color: var(--muted); cursor: pointer;
  border: none; font-family: var(--font);
}
.social-compose-camera {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg); display: flex;
  align-items: center; justify-content: center;
  font-size: 18px; color: var(--teal);
  cursor: pointer; border: none;
}
.social-post {
  background: var(--white); border-radius: 12px;
  padding: 12px; margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.social-post-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.social-post-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.social-post-avatar img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
}
.social-post-author { font-weight: 600; font-size: 13px; color: var(--navy); }
.social-post-time { font-size: 10px; color: var(--muted); }
.social-post-content {
  font-size: 14px; line-height: 1.5; color: var(--text);
  margin-bottom: 8px; word-break: break-word;
}
.social-post-image {
  width: calc(100% + 24px); margin: 0 -12px;
  max-height: 400px; object-fit: cover; display: block;
}
.social-reactions {
  display: flex; align-items: center; gap: 4px;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.social-reaction-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; min-height: 36px;
  font-family: var(--font); transition: all var(--trans);
  display: flex; align-items: center; gap: 4px;
}
.social-reaction-btn:hover { border-color: var(--teal); }
.social-reaction-btn.active-heart { background: #fce4ec; border-color: #ef9a9a; }
.social-reaction-btn.active-clap { background: #fff3e0; border-color: #ffcc80; }
.social-reaction-btn.active-fire { background: #fbe9e7; border-color: #ffab91; }
.social-reaction-btn.active-lightbulb { background: #fff9c4; border-color: #fff176; }
.social-comment-link {
  margin-left: auto; font-size: 12px;
  color: var(--muted); cursor: pointer;
  background: none; border: none; font-family: var(--font);
}
.social-comments { padding: 8px 0 0; }
.social-comment {
  display: flex; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.social-comment:last-child { border-bottom: none; }
.social-comment-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; flex-shrink: 0;
}
.social-comment-avatar img {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
}
.social-comment-body { flex: 1; min-width: 0; }
.social-comment-name { font-size: 12px; font-weight: 600; color: var(--navy); }
.social-comment-text { font-size: 13px; color: var(--text); line-height: 1.4; word-break: break-word; }
.social-comment-time { font-size: 10px; color: var(--muted); }
.social-comment-input-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.social-comment-input {
  flex: 1; border: 1px solid var(--border); border-radius: 20px;
  padding: 8px 14px; font-size: 14px; font-family: var(--font);
  background: var(--white); color: var(--text); outline: none; min-height: 36px;
}
.social-comment-input:focus { border-color: var(--teal); }
.social-comment-send {
  background: var(--teal); color: #fff; border: none;
  border-radius: 50%; width: 36px; height: 36px;
  font-size: 14px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.social-comment-send:disabled { opacity: .5; cursor: not-allowed; }
.social-compose-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: #fff; display: flex; flex-direction: column;
}
.social-compose-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #e0e0e0;
}
.social-compose-modal-close {
  background: none; border: none; font-size: 24px;
  cursor: pointer; color: #333; padding: 4px 8px;
}
.social-compose-modal-title {
  flex: 1; font-weight: 600; font-size: 16px; color: #1a3a4a;
}
.social-compose-modal-submit {
  background: var(--teal); color: #fff; border: none;
  border-radius: 8px; padding: 8px 20px; font-size: 14px;
  font-weight: 600; cursor: pointer; font-family: var(--font);
}
.social-compose-modal-submit:disabled { opacity: .5; cursor: not-allowed; }
.social-compose-modal-body { flex: 1; padding: 16px; overflow-y: auto; background: #fff; }
.social-compose-textarea {
  width: 100%; min-height: 120px; border: none;
  font-size: 16px; font-family: var(--font);
  color: #333; resize: none; outline: none;
  line-height: 1.5; background: #fff;
}
.social-compose-image-preview { position: relative; margin-top: 12px; border-radius: 8px; overflow: hidden; }
.social-compose-image-preview img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 8px; }
.social-compose-image-remove {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.6); color: #fff;
  border: none; border-radius: 50%;
  width: 28px; height: 28px; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.social-compose-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid #e0e0e0; background: #fff;
}
.social-compose-toolbar-btn {
  background: none; border: none; font-size: 20px;
  color: var(--teal); cursor: pointer; padding: 4px;
}
.social-compose-modal select {
  color: #333; background: #fff;
}
.social-new-banner {
  text-align: center; padding: 10px;
  background: var(--teal); color: #fff;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border-radius: 8px; margin: 8px 0;
}
.social-post-delete {
  margin-left: auto; background: none; border: none;
  color: var(--muted); font-size: 14px; cursor: pointer; padding: 4px 8px;
}
.social-post-delete:hover { color: #e53935; }
.social-load-more { text-align: center; padding: 16px; color: #999; font-size: 13px; }
.social-empty { text-align: center; padding: 40px 20px; color: #999; font-size: 14px; }

/* ── Dark mode overrides — social always uses light card style ─────────── */
.social-post { background: #fff; }
.social-post-author { color: #1a3a4a; }
.social-post-time { color: #999; }
.social-post-content { color: #333; }
.social-reactions { border-top-color: #e0e0e0; }
.social-reaction-btn { border-color: #e0e0e0; color: #333; }
.social-comment-link { color: #666; }
.social-compose { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.social-compose-input { background: #f5f5f5; color: #999; }
.social-compose-camera { background: #e0f2f1; }
.social-tabs { background: #fff; border-bottom-color: #e0e0e0; }
.social-tab { color: #999; }
.social-tab.active { color: var(--teal); }
.social-comment-avatar { background: var(--teal); color: #fff; }
.social-comment-name { color: #1a3a4a; }
.social-comment-text { color: #333; }
.social-comment-time { color: #999; }
.social-comment-input { border-color: #e0e0e0; background: #fff; color: #333; }
.social-post-delete { color: #999; }
@media (min-width: 640px) {
  .social-compose-modal {
    inset: auto; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 500px; max-height: 80vh;
    border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.2);
  }
}

/* ── Online bar in Comunitate ─────────────────────────────────────────── */
.social-online-bar { padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.06); background: #fff; border-radius: 12px; margin: 8px 0; }
.social-online-label { color: #999; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; }
.social-online-avatars { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.social-online-avatars::-webkit-scrollbar { height: 0; }
.social-online-avatar { text-align: center; cursor: pointer; flex-shrink: 0; }
.social-online-avatar img {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid #4caf50;
  object-fit: cover; display: block;
}
.social-online-avatar-initials {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid #4caf50;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
  background: var(--teal);
}
.social-online-avatar-name { color: #666; font-size: 10px; margin-top: 4px; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-online-more {
  width: 48px; height: 48px; border-radius: 50%;
  background: #e0e0e0; display: flex; align-items: center; justify-content: center;
  color: #666; font-weight: 700; font-size: 13px;
}

/* ── Green dot on post avatars ────────────────────────────────────────── */
.social-post-avatar { position: relative; }
.social-post-avatar.is-online::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: #4caf50; border: 2px solid #fff;
}

/* ── Category pills ───────────────────────────────────────────────────── */
.social-category-pills { display: flex; gap: 8px; padding: 8px 0; overflow-x: auto; margin: 0 0 4px; }
.social-category-pills::-webkit-scrollbar { height: 0; }
.social-category-pill {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; border: none;
  background: #f0f0f0; color: #666; font-family: var(--font);
  transition: all 0.2s;
}
.social-category-pill.active { background: var(--teal); color: #fff; }
