/* ══════════════════════════════════════════════
   FRIENDS.CSS — Friends, Messaging, Group Chats
   ══════════════════════════════════════════════ */

/* ── FRIENDS PAGE TABS ── */
.friends-tabs-row {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.friends-tab-btn {
  flex: 1; padding: 9px 0; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); font-family: inherit; font-size: 12px; font-weight: 800;
  cursor: pointer; transition: all 0.2s; position: relative;
}
.friends-tab-btn.active {
  background: var(--accent); border-color: var(--accent); color: white;
}

/* ── SEARCH ROW ── */
.friends-search-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.friends-search-input {
  flex: 1; padding: 11px 14px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 13px; outline: none;
}
.friends-search-input:focus { border-color: var(--accent); }
.friends-add-btn {
  padding: 11px 16px; border-radius: 12px;
  background: var(--accent); border: none; color: white;
  font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}

/* ── FRIEND ROW ── */
.friend-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.friend-row:last-child { border-bottom: none; }
.friend-av {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: white;
}
.friend-info { flex: 1; min-width: 0; }
.friend-name   { font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.friend-status { font-size: 11px; color: var(--text2); font-weight: 600; }
.friend-actions { display: flex; gap: 6px; flex-shrink: 0; }
.friend-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.friend-btn.accept { background: rgba(0,255,136,0.1); border-color: rgba(0,255,136,0.3); color: var(--neon-green); }
.friend-btn.danger { background: rgba(255,45,120,0.08); border-color: rgba(255,45,120,0.2); color: var(--neon-pink); }

/* ── REQUEST BADGE ── */
.friends-request-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--neon-pink); color: white; border-radius: 50%;
  width: 18px; height: 18px; font-size: 10px; font-weight: 800;
  display: none; align-items: center; justify-content: center;
}

.friends-empty {
  text-align: center; padding: 32px 20px; color: var(--text2);
  font-size: 13px; font-weight: 700;
}

.friends-requests-section { margin-bottom: 16px; }
.friends-requests-title {
  font-size: 11px; font-weight: 800; color: var(--neon-pink);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}

/* ── DM MODAL ── */
.dm-modal {
  position: fixed; inset: 0; background: var(--bg); z-index: 6000;
  display: none; flex-direction: column;
}
.dm-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}
.dm-back-btn {
  background: none; border: none; color: var(--text2); font-size: 20px;
  cursor: pointer; padding: 4px; line-height: 1;
}
.dm-header-name { font-size: 16px; font-weight: 800; flex: 1; }
.dm-messages {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.dm-msg { display: flex; flex-direction: column; max-width: 75%; }
.dm-msg.mine   { align-self: flex-end; align-items: flex-end; }
.dm-msg.theirs { align-self: flex-start; align-items: flex-start; }
.dm-sender { font-size: 10px; color: var(--text2); font-weight: 700; margin-bottom: 3px; }
.dm-bubble {
  padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.4; word-break: break-word;
}
.dm-msg.mine   .dm-bubble { background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.dm-msg.theirs .dm-bubble { background: var(--surface2); color: var(--text); border-bottom-left-radius: 4px; }
.dm-time { font-size: 10px; color: var(--text2); margin-top: 3px; }
.dm-input-row {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0;
}
.dm-input {
  flex: 1; padding: 11px 14px; border-radius: 22px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 14px; outline: none;
}
.dm-input:focus { border-color: var(--accent); }
.dm-send-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--accent); color: white; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── FRIENDS NAV BADGE ── */
.nav-friends-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--neon-pink); color: white; border-radius: 50%;
  width: 16px; height: 16px; font-size: 9px; font-weight: 800;
  display: none; align-items: center; justify-content: center;
}

/* ── GROUP CHAT ── */
.new-group-row {
  display: flex; gap: 8px; margin-bottom: 14px;
}

/* ── BUMP BUTTON ── */
.bump-btn {
  width: 100%; padding: 18px 16px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--neon-pink));
  border: none; color: white; font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 0 24px rgba(180,79,255,0.35);
  transition: transform 0.15s;
}
.bump-btn:active { transform: scale(0.97); }

/* ── BUMP ACTIVE STATE ── */
.bump-active {
  position: relative; width: 100%;
  background: var(--surface); border: 1px solid rgba(180,79,255,0.3);
  border-radius: 20px; padding: 24px 16px;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.bump-pulse-ring {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(180,79,255,0.4);
  animation: bump-ring 1.5s ease-out infinite;
}
.bump-pulse-ring::after {
  content: ''; position: absolute; inset: -20px; border-radius: 50%;
  border: 2px solid rgba(180,79,255,0.2);
  animation: bump-ring 1.5s ease-out infinite 0.4s;
}
@keyframes bump-ring {
  0%   { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
