/* ============================================
   MOB — Друзья v2
   ============================================ */

[data-tab-content="friends"] {
  padding: 8px 12px 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ═══ Stats ═══ */
#mob-friends-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mob-friends__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  background: var(--mob-bg-surface);
  border: 1px solid var(--mob-border);
  border-radius: 12px;
}
.mob-friends__stat b {
  font-size: 18px;
  font-weight: 700;
  color: var(--mob-text);
  line-height: 1.2;
}
.mob-friends__stat span {
  font-size: 11px;
  color: var(--mob-text-muted);
  margin-top: 2px;
}

/* ═══ Search ═══ */
.mob-friends__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--mob-bg-elevated);
  border: 1px solid var(--mob-border);
  border-radius: 999px;
}
.mob-friends__search i { color: var(--mob-text-muted); font-size: 14px; }
.mob-friends__search input {
  flex: 1; min-width: 0;
  background: transparent;
  border: none;
  color: var(--mob-text);
  font-size: 14px;
  outline: none;
}
.mob-friends__search input::placeholder { color: var(--mob-text-muted); }

/* ═══ Tabs ═══ */
.mob-friends__tabs {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mob-friends__tabs::-webkit-scrollbar { display: none; }
.mob-friends__tab {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--mob-bg-elevated);
  border: 1px solid var(--mob-border);
  color: var(--mob-text-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: .15s;
}
.mob-friends__tab.active {
  background: var(--mob-accent-grad);
  border-color: transparent;
  color: #fff;
}
.mob-friends__count {
  background: rgba(255,255,255,.2);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* ═══ Letter ═══ */
.mob-friends__letter {
  padding: 10px 4px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mob-text-muted);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ═══ List ═══ */
#mob-friends-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mob-friend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--mob-bg-surface);
  border-radius: 14px;
  transition: .15s;
}
.mob-friend:hover { background: var(--mob-bg-elevated); }

.mob-friend__avatar {
  position: relative;
  width: 48px; height: 48px;
  flex-shrink: 0;
  display: block;
}
.mob-friend__avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--mob-bg-elevated);
}
.mob-friend__online {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 12px; height: 12px;
  background: #22c55e;
  border: 2px solid var(--mob-bg-surface);
  border-radius: 50%;
}

.mob-friend__info { flex: 1; min-width: 0; }
.mob-friend__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--mob-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mob-friend__meta {
  font-size: 11.5px;
  color: var(--mob-text-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mob-friend__since,
.mob-friend__mutual { color: var(--mob-text-muted); }

.mob-friend__actions { display: flex; gap: 4px; flex-shrink: 0; }
.mob-friend__btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--mob-bg-elevated);
  border: none;
  color: var(--mob-text-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: .15s;
}
.mob-friend__btn:hover { background: var(--mob-accent); color: #fff; }
.mob-friend__btn--danger:hover { background: #ef4444; }
.mob-friend__btn--ok:hover { background: #22c55e; }

/* ═══ Empty ═══ */
.mob-friends__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--mob-text-muted);
}
.mob-friends__empty-icon {
  font-size: 48px;
  opacity: .35;
  margin-bottom: 10px;
}
.mob-friends__empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--mob-text);
  margin-bottom: 6px;
}
.mob-friends__empty-sub {
  font-size: 13px;
  margin-bottom: 20px;
}
.mob-friends__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--mob-accent-grad);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ═══ Bottom Sheet ═══ */
.mob-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.mob-sheet.hidden { display: none; }
.mob-sheet__inner {
  width: 100%;
  max-width: 500px;
  background: var(--mob-bg);
  border-radius: 20px 20px 0 0;
  padding: 8px 0 16px;
  max-height: 85%;
  overflow-y: auto;
  animation: mobSheetUp .22s ease-out;
}
@keyframes mobSheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mob-sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--mob-text);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.mob-sheet__item:hover { background: var(--mob-bg-surface); }
.mob-sheet__item i { font-size: 18px; color: var(--mob-text-2); width: 22px; }
.mob-sheet__item--danger { color: #ef4444; }
.mob-sheet__item--danger i { color: #ef4444; }

/* ═══ Profile modal ═══ */
.mob-profile { padding: 20px 16px; text-align: center; }
.mob-profile__avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  background: var(--mob-bg-elevated);
}
.mob-profile__name {
  font-size: 18px; font-weight: 700; color: var(--mob-text);
}
.mob-profile__group {
  font-size: 13px; color: var(--mob-text-muted); margin-top: 3px;
}
.mob-profile__online {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 6px;
  font-size: 12px; color: #22c55e;
}
.mob-profile__online span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
}
.mob-profile__stats {
  display: flex; gap: 24px; justify-content: center;
  margin: 16px 0;
}
.mob-profile__stats > div {
  display: flex; flex-direction: column; align-items: center;
}
.mob-profile__stats b {
  font-size: 18px; font-weight: 700; color: var(--mob-text);
}
.mob-profile__stats span {
  font-size: 11px; color: var(--mob-text-muted);
}
.mob-profile__since {
  font-size: 12px; color: var(--mob-text-muted); margin-bottom: 16px;
}
.mob-profile__actions {
  display: flex; gap: 8px; justify-content: center;
}
.mob-profile__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  background: var(--mob-bg-elevated);
  border: 1px solid var(--mob-border);
  color: var(--mob-text);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.mob-profile__btn--accent {
  background: var(--mob-accent-grad);
  border-color: transparent;
  color: #fff;
}
.mob-profile__btn--danger { color: #ef4444; border-color: #ef4444; }

/* ═══ Mutual ═══ */
.mob-mutual { padding: 16px; }
.mob-mutual__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mob-text);
  margin-bottom: 12px;
}
.mob-mutual__list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.mob-mutual__user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--mob-text);
}
.mob-mutual__user:hover { background: var(--mob-bg-surface); }
.mob-mutual__user img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.mob-mutual__user span { font-size: 14px; font-weight: 500; }
.mob-mutual__empty {
  padding: 20px;
  text-align: center;
  color: var(--mob-text-muted);
  font-size: 13px;
}

/* ═══ Search modal ═══ */
.mob-friends-search {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex; align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.mob-friends-search.hidden { display: none; }
.mob-friends-search__sheet {
  width: 100%; max-width: 500px;
  background: var(--mob-bg);
  border-radius: 20px 20px 0 0;
  max-height: 85%;
  display: flex; flex-direction: column;
  animation: mobSheetUp .22s ease-out;
}
.mob-friends-search__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--mob-border);
}
.mob-friends-search__title { font-size: 16px; font-weight: 700; color: var(--mob-text); }
.mob-friends-search__close {
  width: 32px; height: 32px;
  background: transparent; border: none;
  color: var(--mob-text-2);
  cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mob-friends-search__input-wrap {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px;
  padding: 8px 12px;
  background: var(--mob-bg-elevated);
  border: 1px solid var(--mob-border);
  border-radius: 999px;
}
.mob-friends-search__input-wrap i { color: var(--mob-text-muted); }
.mob-friends-search__input-wrap input {
  flex: 1; min-width: 0;
  background: transparent; border: none;
  color: var(--mob-text); font-size: 14px; outline: none;
}
.mob-friends-search__list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 6px 16px;
  min-height: 200px;
}
.mob-friends-search__hint {
  text-align: center;
  color: var(--mob-text-muted);
  font-size: 13px;
  padding: 30px 20px;
}
.mob-friends-search__user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.mob-friends-search__user:hover { background: var(--mob-bg-surface); }
.mob-friends-search__user img {
  width: 42px; height: 42px;
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.mob-friends-search__user-info { flex: 1; min-width: 0; }
.mob-friends-search__user-name {
  font-size: 14px; font-weight: 600; color: var(--mob-text);
}
.mob-friends-search__add {
  width: 36px; height: 36px;
  background: var(--mob-accent-grad);
  color: #fff; border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mob-friends-search__check { color: #22c55e; font-size: 18px; }

/* Badge в #mob-bottom */
#mob-friends-badge {
  position: absolute;
  top: 4px; right: 8px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
#mob-friends-badge.hidden { display: none; }

.mob-friends__tab--add {
  flex-shrink: 0;
  width: 40px;
  justify-content: center;
  background: var(--mob-accent-grad);
  border-color: transparent;
  color: #fff;
  padding: 8px 0;
}

.mob-friends__found {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--mob-border);
}
.mob-friends__found-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--mob-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 4px;
}
.mob-friend--found { background: rgba(34,197,94,.06); }