/* ==========================================================================
   Beltchecker: friends, private messages, instructor tools
   Markup from functions_social.php (friends.php, forum type 2, updateprofile_students.php,
   updateprofile_promotions.php, search_promoter.php). Tokens from styles/modern.css;
   rows reuse .bc-row (lists.css / surfaces.css), belt chips and status pills come from forum.css.
   ========================================================================== */

/* ---------- Shared buttons ---------- */

.bc-fr-btn {
  position: relative;
  z-index: 2;                 /* above the stretched row link */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--bc-line-strong);
  border-radius: 999px;
  background: var(--bc-surface);
  color: var(--bc-ink) !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .2s var(--bc-ease), border-color .2s var(--bc-ease), color .2s var(--bc-ease), transform .2s var(--bc-ease);
}
.bc-fr-btn:hover { background: var(--bc-surface-3); }
.bc-fr-btn:active { transform: scale(.97); }
.bc-fr-btn:focus-visible { outline: none; box-shadow: var(--bc-ring); }
.bc-fr-btn i { font-size: 13px; pointer-events: none; }
.bc-fr-btn--primary { background: var(--bc-ink); border-color: var(--bc-ink); color: var(--bc-on-ink) !important; }
.bc-fr-btn--primary:hover { background: #26262f; }
.bc-fr-btn--icon { width: 36px; padding: 0; }
.bc-fr-btn--ghost { border-color: transparent; background: transparent; color: var(--bc-muted) !important; }
.bc-fr-btn--ghost:hover { background: var(--bc-surface-3); color: var(--bc-ink) !important; }
.bc-fr-btn--danger:hover { background: rgba(225, 29, 72, .08); color: var(--bc-red) !important; }

/* ---------- Page head ---------- */

.bc-fr, .bc-sp { width: 100%; max-width: 920px; margin: 0 auto; min-width: 0; }
.bc-sp { max-width: 1180px; }
.bc-fr-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 16px 16px;
}
.bc-fr-title { margin: 0 !important; font-size: 28px !important; line-height: 1.1 !important; letter-spacing: -.02em; }
.bc-fr-lead { margin: 6px 0 0 !important; color: var(--bc-muted); font-size: 14px; }
.bc-fr-lead strong { color: var(--bc-ink); font-weight: 600; }
.bc-fr-find {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 999px;
  background: var(--bc-ink); color: var(--bc-on-ink) !important;
  font-size: 14px; font-weight: 600; text-decoration: none !important;
}
.bc-fr-find:hover { background: #26262f; }

.bc-fr-h {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px !important;
  font-size: 17px !important; font-weight: 700 !important; letter-spacing: -.01em;
}
.bc-fr-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px;
  background: var(--bc-accent); color: #fff;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.bc-fr-badge--muted { background: var(--bc-surface-3); color: var(--bc-muted); }

/* ---------- Friends ---------- */

.bc-fr-card .content { padding-top: 18px; }
.bc-fr-list { margin: 0 -8px; }
.bc-fr-row { padding-right: 8px; }
.bc-fr-nameline { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bc-fr-nameline .bc-row-name { flex: 0 1 auto; }
.bc-fr-nameline .bc-status { flex: 0 0 auto; gap: 4px; }
.bc-fr-nameline .bc-status--verified { padding: 0 6px; }
.bc-fr-nameline .bc-status--verified i { font-size: 10px; }
.bc-fr-sub { flex-wrap: wrap; row-gap: 3px; }
.bc-fr-sub .bc-beltchip + .bc-fr-meta::before { content: "\00b7"; margin: 0 5px 0 -2px; color: var(--bc-faint); }
.bc-fr-meta { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bc-fr-dot { margin: 0 5px; color: var(--bc-faint); }
.bc-fr-waiting { color: var(--bc-amber); font-weight: 500; }
.bc-fr-waiting i { margin-right: 4px; }
.bc-fr-actions { position: relative; z-index: 2; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin-left: auto; }

.bc-fr-more {
  display: block; width: 100%;
  margin: 8px 0 0; padding: 10px;
  border: 0; border-radius: 12px;
  background: var(--bc-surface-2); color: var(--bc-ink-2);
  font-size: 13.5px; font-weight: 600;
}
.bc-fr-more:hover { background: var(--bc-surface-3); }

.bc-fr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.bc-fr-toolbar .bc-fr-h { margin: 0 !important; }
.bc-fr-tools { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; justify-content: flex-end; min-width: 0; }
.bc-fr-search {
  position: relative; flex: 1 1 240px; max-width: 320px; margin: 0;
}
.bc-fr-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--bc-faint); font-size: 13px; pointer-events: none; }
.bc-fr-search input, .bc-fr-sort select {
  width: 100%; height: 40px; margin: 0 !important;
  border: 1px solid var(--bc-line-strong) !important; border-radius: 999px !important;
  background: var(--bc-surface-2) !important;
  color: var(--bc-ink); font-size: 14px;
  box-shadow: none !important;
}
.bc-fr-search input { padding: 0 14px 0 36px !important; }
.bc-fr-search input:focus, .bc-fr-sort select:focus { outline: none; border-color: var(--bc-accent) !important; background: var(--bc-surface) !important; box-shadow: var(--bc-ring) !important; }
.bc-fr-sort { margin: 0; flex: 0 0 auto; }
.bc-fr-sort select { width: auto; padding: 0 30px 0 14px !important; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b76' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important; }

.bc-fr-noresults { margin: 16px 0 4px !important; color: var(--bc-muted); text-align: center; font-size: 14px; }
.bc-fr-empty, .bc-dm-empty, .bc-appr-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 36px 16px; text-align: center; color: var(--bc-muted); font-size: 14px;
}
.bc-fr-empty > i, .bc-dm-empty > i, .bc-appr-empty > i {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 6px;
  border-radius: 16px; background: var(--bc-surface-3); color: var(--bc-ink-2); font-size: 20px;
}
.bc-fr-empty strong, .bc-dm-empty strong { color: var(--bc-ink); font-size: 15px; }
.bc-fr-empty .bc-fr-btn { margin-top: 10px; }

@media (max-width: 600px) {
  .bc-fr-head { margin: 0 12px 12px; align-items: center; }
  .bc-fr-title { font-size: 24px !important; }
  .bc-fr-find span { display: none; }
  .bc-fr-find { width: 40px; padding: 0; justify-content: center; }
  .bc-fr-tools { flex-basis: 100%; }
  .bc-fr-search { max-width: none; }
  .bc-fr-nameline .bc-fr-status-label { display: none; }
  .bc-fr-actions .bc-fr-btn--primary span { display: none; }
  .bc-fr-actions .bc-fr-btn--primary { width: 36px; padding: 0; }
  .bc-fr-row .bc-row-avatar img, .bc-fr-row .bc-row-avatar .bc-av { width: 40px !important; height: 40px !important; }
}

/* ---------- Private messages: inbox ---------- */

.bc-dm-title {
  flex: 1 1 auto;
  display: flex; align-items: center; gap: 10px;
  margin: 0 !important;
  font-size: 24px !important; line-height: 1.1 !important; letter-spacing: -.02em;
}
.bc-dm-title i { color: var(--bc-accent); font-size: 20px; }
.bc-forum-shell--dm.bc-forum-shell--list { max-width: 860px; }
.bc-forum-shell--dm.bc-forum-shell--thread { max-width: 860px; }

.bc-dm-card > .content { padding-top: 14px; }
.bc-dm-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.bc-dm-results { margin: 0 !important; font-size: 15px !important; font-weight: 600 !important; color: var(--bc-muted); }
.bc-dm-results span { color: var(--bc-ink); }
.bc-dm-clear { margin-left: 6px; font-size: 13px; color: var(--bc-accent) !important; }

.bc-dm-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.bc-dm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border: 1px solid var(--bc-line-strong); border-radius: 999px;
  background: var(--bc-surface); color: var(--bc-ink-2) !important;
  font-size: 13px; font-weight: 600; text-decoration: none !important; cursor: pointer;
}
.bc-dm-chip:hover { background: var(--bc-surface-3); }
.bc-dm-chip.is-active { background: var(--bc-ink); border-color: var(--bc-ink); color: var(--bc-on-ink) !important; }
.bc-dm-chip:focus-visible { outline: none; box-shadow: var(--bc-ring); }

.bc-dm-list { display: flex; flex-direction: column; margin: 0 -8px; }
.bc-dm-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
  padding: 12px 10px;
  border-radius: 14px;
  transition: background-color .2s var(--bc-ease);
}
.bc-dm-row + .bc-dm-row { box-shadow: 0 -1px 0 0 var(--bc-line); }
.bc-dm-row:hover, .bc-dm-row:focus-within { background: rgba(91, 75, 209, .045); }
.bc-dm-row:hover + .bc-dm-row { box-shadow: none; }
.bc-dm-row-av { flex: 0 0 auto; line-height: 0; }
.bc-dm-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.bc-dm-row-main > * { line-height: 1.3; }
.bc-dm-row-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.bc-dm-row-name {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--bc-ink) !important; font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none !important;
}
.bc-dm-row-name::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.bc-dm-row-name:focus { outline: none; }
.bc-dm-row:focus-within { box-shadow: var(--bc-ring) !important; }
.bc-dm-row-time { flex: 0 0 auto; color: var(--bc-faint); font-size: 12px; white-space: nowrap; }
.bc-dm-row-subject {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--bc-ink-2); font-size: 13.5px; font-weight: 500;
}
.bc-dm-row-last { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc-dm-row-snippet {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--bc-muted); font-size: 13.5px;
}
.bc-dm-row-you { color: var(--bc-faint); }
.bc-dm-row-count {
  flex: 0 0 auto;
  min-width: 20px; height: 18px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--bc-surface-3);
  color: var(--bc-muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.bc-dm-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--bc-accent); box-shadow: 0 0 0 3px rgba(91, 75, 209, .16); }
.bc-dm-row.is-unread .bc-dm-row-name { font-weight: 700; }
.bc-dm-row.is-unread .bc-dm-row-subject { color: var(--bc-ink); font-weight: 600; }
.bc-dm-row.is-unread .bc-dm-row-snippet { color: var(--bc-ink-2); }
.bc-dm-row.is-unread .bc-dm-row-time { color: var(--bc-accent); font-weight: 600; }

@media (max-width: 767px) {
  .bc-forum-shell--dm.bc-forum-shell--list .bc-fhead { flex-wrap: nowrap; }
  .bc-forum-shell--dm.bc-forum-shell--list .bc-fhead-actions { flex: 0 0 auto; }
}
@media (max-width: 600px) {
  .bc-dm-title { font-size: 21px !important; }
  .bc-dm-title i { display: none; }
  .bc-forum-shell--dm .bc-fhead-new { width: 38px; padding: 0 !important; justify-content: center; }
  .bc-forum-shell--dm .bc-fhead-new span { display: none; }
  .bc-dm-row { gap: 10px; padding: 11px 8px; }
  .bc-dm-row-av img, .bc-dm-row-av .bc-av { width: 44px !important; height: 44px !important; }
  .bc-dm-row-name { font-size: 14.5px; }
}

/* ---------- Private messages: conversation ---------- */

.bc-dm-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bc-dm-head-av { flex: 0 0 auto; line-height: 0; }
.bc-dm-head-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bc-dm-head-name {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--bc-ink) !important; font-size: 17px; font-weight: 700; letter-spacing: -.01em; text-decoration: none !important;
}
.bc-dm-head-name:hover { color: var(--bc-accent) !important; }
.bc-dm-head-sub { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--bc-muted); font-size: 12.5px; }
.bc-dm-head-academy { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bc-dm-head-sub .bc-beltchip + .bc-dm-head-academy::before { content: "\00b7"; margin-right: 8px; color: var(--bc-faint); }
.bc-dm-subject {
  margin: 14px -20px 0; padding: 10px 20px;
  border-top: 1px solid var(--bc-line); border-bottom: 1px solid var(--bc-line);
  background: var(--bc-surface-2);
  color: var(--bc-ink); font-size: 14px; font-weight: 600;
  overflow-wrap: anywhere;
}
.bc-dm-subject-label { margin-right: 6px; color: var(--bc-faint); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.bc-dm-thread { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 10px; min-width: 0; }
.bc-dm-msg { position: relative; display: flex; align-items: flex-end; gap: 8px; min-width: 0; scroll-margin-top: 90px; }
.bc-dm-msg > a[name] { position: absolute; top: -90px; visibility: hidden; }
.bc-dm-msg.is-run { margin-top: -10px; }
.bc-dm-msg.is-mine { justify-content: flex-end; }
.bc-dm-msg-av { flex: 0 0 32px; width: 32px; line-height: 0; margin-bottom: 22px; }
.bc-dm-msg-col { display: flex; flex-direction: column; min-width: 0; max-width: min(78%, 560px); }
.bc-dm-msg.is-mine .bc-dm-msg-col { align-items: flex-end; }

.bc-dm-bubble {
  min-width: 0; max-width: 100%;
  padding: 10px 14px;
  border-radius: 20px 20px 20px 6px;
  background: var(--bc-surface-3);
  color: var(--bc-ink);
  font-size: 15px; line-height: 1.45;
  overflow-wrap: anywhere;
}
.bc-dm-msg.is-mine .bc-dm-bubble {
  border-radius: 20px 20px 6px 20px;
  background: var(--bc-accent);
  color: #fff;
}
.bc-dm-msg.is-run.is-theirs .bc-dm-bubble { border-top-left-radius: 6px; }
.bc-dm-msg.is-run.is-mine .bc-dm-bubble { border-top-right-radius: 6px; }
.bc-dm-msg:target .bc-dm-bubble, .bc-dm-msg:has(> a[name]:target) .bc-dm-bubble { box-shadow: 0 0 0 3px rgba(91, 75, 209, .28); }
.bc-dm-text a { color: inherit !important; text-decoration: underline; text-underline-offset: 2px; }
.bc-dm-text img, .bc-dm-text iframe, .bc-dm-text video { max-width: 100%; border-radius: 12px; }
.bc-dm-quote {
  margin: 0 0 8px; padding: 6px 10px;
  border-left: 3px solid currentColor; border-radius: 4px 10px 10px 4px;
  background: rgba(15, 15, 25, .06);
  font-size: 13.5px; opacity: .85;
}
.bc-dm-msg.is-mine .bc-dm-quote { background: rgba(255, 255, 255, .16); }
.bc-dm-bubble .bc-post-preview { margin-top: 8px; }
.bc-dm-bubble .bc-post-preview:empty { display: none; }
.bc-dm-image { margin: 8px -6px -4px; line-height: 0; }
.bc-dm-image img { max-width: 100%; max-height: 360px; border-radius: 14px; cursor: zoom-in; }

.bc-dm-meta {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  min-height: 26px; margin-top: 2px; padding: 0 4px;
  color: var(--bc-faint); font-size: 11.5px;
}
.bc-dm-msg.is-mine .bc-dm-meta { flex-direction: row-reverse; }
.bc-dm-time { margin: 0 4px; color: var(--bc-faint) !important; text-decoration: none !important; white-space: nowrap; }
.bc-dm-sender { color: var(--bc-muted); font-weight: 600; }
.bc-dm-msg.is-run .bc-dm-sender { display: none; }
.bc-dm-edited { margin: 0 4px; font-style: italic; }
.bc-dm-act {
  display: inline-grid; place-items: center;
  width: 28px; height: 26px; padding: 0;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--bc-faint) !important; font-size: 12px; text-decoration: none !important;
  opacity: 0; transition: opacity .15s, background-color .15s, color .15s;
}
.bc-dm-act i { pointer-events: none; }
.bc-dm-msg:hover .bc-dm-act, .bc-dm-msg:focus-within .bc-dm-act, .bc-dm-act:focus-visible { opacity: 1; }
.bc-dm-act:hover { background: var(--bc-surface-3); color: var(--bc-ink) !important; }
.bc-dm-act--danger:hover { background: rgba(225, 29, 72, .08); color: var(--bc-red) !important; }
.bc-dm-act:focus-visible { outline: none; box-shadow: var(--bc-ring); }
@media (hover: none) { .bc-dm-act { opacity: 1; } }

/* Composer: pinned under the conversation, message field + send */
.bc-dm-composer > .content { padding-top: 14px; }
.bc-dm-composer textarea.bc-composer-text { min-height: 52px; height: 84px; border-radius: 18px !important; }
.bc-dm-composer .bc-composer-attach { margin: 2px 0 10px; }
.bc-dm-composer .bc-composer-attach label { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 600px) {
  .bc-dm-subject { margin: 12px -16px 0; padding: 9px 16px; }
  .bc-dm-msg-col { max-width: 84%; }
  .bc-dm-bubble { font-size: 14.5px; padding: 9px 13px; }
  .bc-dm-msg-av { flex-basis: 28px; width: 28px; }
  .bc-dm-msg-av img, .bc-dm-msg-av .bc-av { width: 28px !important; height: 28px !important; }
}

/* ---------- Instructor approvals (students / promotions) ---------- */

.bc-appr-lead { margin: -8px 0 14px !important; color: var(--bc-muted); font-size: 14px; max-width: 62ch; }
.bc-appr-filter { margin-bottom: 14px; }
.bc-appr-n { font-variant-numeric: tabular-nums; opacity: .7; }
.bc-dm-chip.is-pending:not(.is-active) { border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .08); }
.bc-appr-group + .bc-appr-group { margin-top: 18px; }
.bc-appr-group[hidden] { display: none; }
.bc-appr-h {
  margin: 0 0 4px !important;
  color: var(--bc-faint); font-size: 11.5px !important; font-weight: 600 !important;
  letter-spacing: .07em; text-transform: uppercase;
}
.bc-appr .bc-list { margin: 0 -8px; }
.bc-appr-row.is-pending { background: linear-gradient(90deg, rgba(245, 158, 11, .08), rgba(245, 158, 11, 0) 70%) !important; }
.bc-appr-sub { flex-wrap: wrap; gap: 8px; }
.bc-appr-date { color: var(--bc-faint); }
.bc-appr-actions { position: relative; z-index: 2; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin-left: auto; }
.bc-appr-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--bc-line-strong); border-radius: 999px;
  background: var(--bc-surface); color: var(--bc-ink-2) !important;
  font-size: 13px; font-weight: 600; text-decoration: none !important; white-space: nowrap;
}
.bc-appr-btn i { font-size: 12px; pointer-events: none; }
.bc-appr-btn--ok { border-color: rgba(22, 163, 74, .4); color: #15803d !important; }
.bc-appr-btn--ok:hover { background: rgba(22, 163, 74, .08); }
.bc-appr-row.is-pending .bc-appr-btn--ok { background: var(--bc-green); border-color: var(--bc-green); color: #fff !important; }
.bc-appr-row.is-pending .bc-appr-btn--ok:hover { filter: brightness(1.05); }
.bc-appr-btn--no:hover { background: rgba(225, 29, 72, .08); border-color: rgba(225, 29, 72, .4); color: var(--bc-red) !important; }
.bc-appr-btn:focus-visible { outline: none; box-shadow: var(--bc-ring); }
.bc-appr-state { display: inline-flex; align-items: center; gap: 5px; padding: 0 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.bc-appr-state--ok { color: #15803d; }
.bc-appr-state--no { color: #be123c; }

@media (max-width: 600px) {
  /* Waiting rows: both buttons on their own line. Settled rows: compact icons beside the name. */
  .bc-appr-row.is-pending { flex-wrap: wrap; }
  .bc-appr-row.is-pending .bc-appr-actions { flex: 1 0 100%; justify-content: flex-end; padding-left: 56px; }
  .bc-appr-btn { height: 32px; }
  .bc-appr-row:not(.is-pending) .bc-appr-actions { gap: 2px; }
  .bc-appr-row:not(.is-pending) .bc-appr-state > span,
  .bc-appr-row:not(.is-pending) .bc-appr-btn > span { display: none; }
  .bc-appr-row:not(.is-pending) .bc-appr-btn { width: 32px; padding: 0; justify-content: center; }
}

/* ---------- Promoter search ---------- */

.bc-sp-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0 4px; align-items: start; }
.bc-sp-form { display: flex; flex-direction: column; gap: 2px; }
.bc-sp-field { display: block; margin: 0; min-width: 0; }
.bc-sp-field > span, .bc-sp-field > label, .bc-sp-checks legend {
  display: block; margin: 0 0 5px; float: none; width: auto;
  color: var(--bc-muted); font-size: 12.5px; font-weight: 600;
}
.bc-sp-field .form-control { height: 42px; padding: 0 12px !important; margin-bottom: 12px !important; font-size: 14px !important; line-height: 40px; }
.bc-sp-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 14px; padding: 0; border: 0; }
.bc-sp-checks legend { flex: 1 0 100%; }
.bc-sp-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.bc-sp-submit { height: 44px; width: 100%; }
.bc-sp-list { margin: 0 -8px; }
.bc-sp-row { align-items: flex-start; }
.bc-sp-av { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--bc-line-strong); object-fit: cover; background: var(--bc-surface-3); }
.bc-sp-belt { flex: 0 0 auto; padding: 0 7px; height: 18px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--bc-surface-3); color: var(--bc-muted); font-size: 11px; font-weight: 600; }
.bc-sp-tags { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.bc-sp-tag { padding: 2px 8px; border-radius: 999px; background: var(--bc-surface-2); border: 1px solid var(--bc-line); color: var(--bc-ink-2); font-size: 11.5px; }

@media (max-width: 860px) {
  .bc-sp-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Friends, revived (functions_friends.php, scripts/bc-friends.js)
   ========================================================================== */

/* ---------- Friend control: the buttons for one person ---------- */
.bc-frc { display: inline-flex; align-items: center; gap: 6px; }
.bc-frc.is-busy { opacity: .7; pointer-events: none; }
button.bc-fr-btn { font-family: inherit; }
.bc-frc-btn--friends i { color: var(--bc-green) !important; }
.bc-frc-btn--requested { color: var(--bc-muted) !important; }
.bc-frc-btn--decline:hover { background: rgba(225, 29, 72, .08); color: var(--bc-red) !important; }

/* Profile hero pills (the buttons are <button>, .bc-hero-msg was made for links) */
button.bc-hero-msg { border: 0; cursor: pointer; font-family: inherit; line-height: inherit; }
.bc-hero-msg.bc-frc-btn--primary { background: var(--bc-ink); color: var(--bc-on-ink) !important; box-shadow: 0 6px 16px -8px rgba(11, 11, 16, .6); }
.bc-hero-msg.bc-frc-btn--primary i { color: #fff; }
.bc-hero-msg.bc-frc-btn--primary:hover { background: #26262f; }
.bc-hero-msg.bc-frc-btn--friends { background: rgba(22, 163, 74, .08); box-shadow: 0 0 0 1px rgba(22, 163, 74, .3); }
.bc-hero-msg.bc-frc-btn--requested i { color: var(--bc-amber); }
.bc-hero-actions .bc-frc { flex-wrap: wrap; }

/* ---------- friends.php ---------- */
.bc-fr-tabs {
  display: flex; gap: 4px;
  margin: 0 16px 16px; padding: 4px;
  width: fit-content; max-width: calc(100% - 32px);
  border-radius: 999px;
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-1), 0 0 0 1px var(--bc-line);
}
.bc-fr-tabs a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--bc-muted) !important; text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .25s var(--bc-ease), color .25s var(--bc-ease);
  -webkit-tap-highlight-color: transparent;
}
.bc-fr-tabs a i { font-size: 13px; }
.bc-fr-tabs a:hover { color: var(--bc-ink) !important; background: var(--bc-surface-2); }
.bc-fr-tabs a[aria-selected="true"] { color: var(--bc-on-ink) !important; background: var(--bc-ink); }
.bc-fr-tabs a[aria-selected="true"] .bc-ptab-count { color: var(--bc-ink); background: var(--bc-surface); }
.bc-fr-tabs a:focus-visible { outline: none; box-shadow: var(--bc-ring); }
[data-fr-panel][hidden] { display: none !important; }

.bc-fr-headid { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bc-fr-headav { flex: none; line-height: 0; }
.bc-fr-find--quiet { background: var(--bc-surface); color: var(--bc-ink) !important; box-shadow: 0 0 0 1px var(--bc-line-strong); }
.bc-fr-find--quiet:hover { background: var(--bc-surface-3); }
.bc-fr-when { color: var(--bc-faint); }
.bc-fr-you { font-size: 12px; font-weight: 600; color: var(--bc-muted); padding: 0 6px; }
.bc-fr-capnote { margin: 12px 0 0 !important; font-size: 13px; color: var(--bc-muted); text-align: center; }
.bc-fr-capnote a { font-weight: 600; }

/* People you may know */
.bc-fr-sugg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bc-fr-sugg {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 10px 12px; min-width: 0;
  border-radius: var(--bc-r); background: var(--bc-surface-2);
  box-shadow: 0 0 0 1px var(--bc-line);
  text-align: center;
}
.bc-fr-sugg-av { line-height: 0; margin-bottom: 6px; }
.bc-fr-sugg-name { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 650; color: var(--bc-ink) !important; text-decoration: none !important; }
.bc-fr-sugg-why { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--bc-muted); min-height: 16px; }
.bc-fr-sugg .bc-frc { margin-top: 8px; width: 100%; justify-content: center; }
.bc-fr-sugg .bc-frc .bc-fr-btn:not(.bc-fr-btn--icon) { flex: 1 1 auto; height: 34px; padding: 0 10px; }

@media (max-width: 767px) {
  .bc-fr-tabs { width: auto; max-width: none; margin: 0 12px 14px; }
  .bc-fr-tabs a { flex: 1 1 0; padding: 0 8px; gap: 6px; font-size: 13px; }
  .bc-fr-tabs a i { display: none; }
  .bc-fr-sugg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bc-fr-headid .bc-fr-title { font-size: 21px !important; }
  /* Suggestions keep their label: the card is wide enough */
  .bc-fr-sugg .bc-fr-btn--primary span { display: inline; }
  .bc-fr-sugg .bc-fr-btn--primary { width: auto; padding: 0 10px; }
}

/* ---------- Profile: Friends card ---------- */
.bc-pf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bc-pf-title { margin: 0 !important; font-size: 18px !important; font-weight: 700 !important; letter-spacing: -.01em; }
.bc-pf-count { margin: 2px 0 0 !important; font-size: 13px; color: var(--bc-muted); }
.bc-pf-all { flex: none; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--bc-surface-3); color: var(--bc-ink) !important; text-decoration: none !important; }
.bc-pf-all:hover { background: var(--bc-line); }
.bc-pf-req {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px;
  border-radius: var(--bc-r-sm); background: rgba(225, 29, 72, .06); box-shadow: 0 0 0 1px rgba(225, 29, 72, .2);
  font-size: 13.5px; font-weight: 600; color: var(--bc-ink) !important; text-decoration: none !important;
}
.bc-pf-req i { color: var(--bc-red); }
.bc-pf-req .bc-pf-req-go { margin-left: auto; color: var(--bc-muted); font-size: 11px; }
.bc-pf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 14px 8px; }
@media (min-width: 768px) { .bc-pf-grid { grid-template-columns: repeat(auto-fill, 96px); } }
.bc-pf-person { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; text-decoration: none !important; }
/* Fixed 60px circles: one or two friends do not stretch into big tiles */
.bc-pf-photo { display: block; flex: none; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: var(--bc-surface-3); line-height: 0; }
.bc-pf-photo > div { display: block !important; width: 100%; height: 100%; }
.bc-pf-photo img, .bc-pf-photo .bc-av { width: 60px !important; height: 60px !important; border-radius: 50% !important; object-fit: cover; }
.bc-pf-name { max-width: 100%; font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--bc-ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.bc-pf-person:hover .bc-pf-name { text-decoration: underline; }
.bc-pf-empty { margin: 0 !important; font-size: 13.5px; color: var(--bc-muted); }
.bc-pf-empty a { font-weight: 600; }

/* ---------- Lists, tabs and profile grids on phones and desktops ---------- */
/* Phones: every button in a row shrinks to its icon (Friends, Requested, Accept, Rolled together, Confirm roll),
   as Add friend already did, so names are not cut to "Bob Au...". Accept is a check next to the X, as on the
   front page card; each button keeps its aria-label. */
@media (max-width: 600px) {
  .bc-fr-actions .bc-fr-btn:not(.bc-fr-btn--icon) { width: 36px; padding: 0; }
  .bc-fr-actions .bc-fr-btn:not(.bc-fr-btn--icon) span { display: none; }
  /* Four tabs (partners.php) do not fit one row on a phone: two by two instead of a clipped row */
  .bc-fr-tabs:has(> a:nth-child(4)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 24px; }
  .bc-fr-tabs:has(> a:nth-child(4)) a { min-width: 0; }
}
/* Desktop: the Friends and Training partners photo grids keep to one full row (See all has the rest),
   so a ninth face does not sit alone on a second row */
@media (min-width: 768px) {
  .bc-pf:not(.bc-mt-visitors) .bc-pf-grid { grid-template-rows: auto; grid-auto-rows: 0; row-gap: 0; overflow: hidden; }
}

/* Hero: questions waiting for the viewer (friend request, roll to confirm) under the name,
   so the action row only holds actions. Share is an icon button. */
.bc-hero-asks { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-width: 560px; }
.bc-hero-ask {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
  border-radius: 16px; background: var(--bc-surface-2); box-shadow: 0 0 0 1px var(--bc-line) inset;
}
.bc-hero-ask-ico {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(91, 75, 209, .1); color: var(--bc-accent); font-size: 14px;
}
.bc-hero-ask-text { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; color: var(--bc-ink); line-height: 1.35; }
.bc-hero-ask-ctl { flex: none; }
.bc-hero-ask-ctl .bc-frc { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.bc-hero-ask .bc-hero-msg { padding: 7px 12px; }
.bc-hero-iconbtn { width: 38px; height: 38px; padding: 0 !important; justify-content: center; border-radius: 50%; }
.bc-hero-iconbtn i { margin: 0; }
@media (max-width: 767px) {
  .bc-hero-asks { margin-left: auto; margin-right: auto; text-align: left; }
  .bc-hero-ask { flex-wrap: wrap; }
  .bc-hero-ask-ctl { flex-basis: 100%; padding-left: 46px; }
}

/* Follow bell in the profile header (functions_feed.php bcFeedFollowControl 'icon') */
.bc-hero-iconbtn.bc-follow-btn.is-on i { color: var(--bc-accent, #5b4bd1); }
html[data-theme="dark"] .bc-hero-iconbtn.bc-follow-btn.is-on i { color: #a5b4fc; }
