﻿/**
 * BuddyPress overrides â€” Prophecy Esports theme.
 *
 * Load order: this file is enqueued at wp_enqueue_scripts priority 99, after
 * bp-nouveau and bp-legacy-css have been deregistered. All !important flags
 * are defensive â€” they guard against any residual BP inline styles or late
 * third-party BP plugins that may inject their own stylesheet.
 */

/* â•â•â• PROFILE HEADER (.pp-*) â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   These classes are output by member-header.php and have nothing to do with
   the #buddypress wrapper â€” scope them broadly so they always win.           */

.pp-banner {
  height: 180px;
  background: linear-gradient(135deg, rgba(255, 243, 0, .07) 0%, transparent 65%);
  background-size: cover;
  background-position: center;
  margin-left: calc(var(--container-pad, 0px) * -1);
  margin-right: calc(var(--container-pad, 0px) * -1);
}

.pp-identity {
  display: flex !important;
  align-items: flex-end !important;
  gap: 20px !important;
  margin-top: -48px !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid var(--border) !important;
  flex-wrap: wrap !important;
}

/* Avatar wrapper */
.pp-avatar {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 3px solid var(--bg) !important;
  background: var(--bg4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--font-h) !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  flex-shrink: 0 !important;
}

/* BuddyPress outputs <a><img class="avatar"></a> inside .pp-avatar */
.pp-avatar a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  text-decoration: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pp-avatar img,
.pp-avatar a img,
.pp-avatar img.avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Name block */
.pp-name-block {
  padding-bottom: 6px;
  min-width: 0;
  flex: 1;
}

.pp-username {
  font-family: var(--font-h) !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  color: var(--text) !important;
  margin: 0 0 6px !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  border: none !important;
  padding: 0 !important;
  background: none !important;
}

.pp-bio {
  font-size: .875rem !important;
  color: var(--text2) !important;
  line-height: 1.8 !important;
  margin-bottom: 0 !important;
  white-space: pre-wrap !important;
  font-family: inherit !important;
  border: none !important;
  background: none !important;
  padding: 0 !important;
}

/* Stats row */
.pp-stats {
  display: flex !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
  margin-top: 14px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.pp-stat {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.pp-stat-val {
  font-family: var(--font-h) !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  line-height: 1 !important;
}

.pp-stat-lbl {
  font-family: var(--font-ui) !important;
  font-size: .58rem !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
}

/* Actions column */
.pp-header-actions {
  margin-left: auto;
  display: flex !important;
  gap: 10px !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
  padding-bottom: 6px;
}

/* BP friend / message buttons inside the header actions */
.pp-header-actions .generic-button,
.pp-header-actions .generic-button a {
  display: inline-flex !important;
  align-items: center !important;
}

.pp-header-actions .generic-button a {
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-family: var(--font-ui) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  border: 1px solid var(--border) !important;
  background: var(--bg3) !important;
  color: var(--text) !important;
  cursor: pointer !important;
  transition: opacity .2s !important;
}

.pp-header-actions .generic-button a.add,
.pp-header-actions .generic-button a.send-message {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #000 !important;
}

.pp-header-actions .generic-button a:hover {
  opacity: .85 !important;
  text-decoration: none !important;
}

/* â•â•â• MEMBER NAV TABS â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

.pp-profile-nav {
  margin-top: 28px;
}

.pp-profile-nav .item-list-tabs {
  border-bottom: 1px solid var(--border);
}

.pp-profile-nav ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  gap: 0 !important;
  flex-wrap: wrap !important;
  background: none !important;
  border: none !important;
}

.pp-profile-nav ul li {
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  float: none !important;
}

.pp-profile-nav ul li a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 16px !important;
  font-family: var(--font-ui) !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  text-decoration: none !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -1px !important;
  transition: color .2s, border-color .2s !important;
  background: none !important;
  border-radius: 0 !important;
}

.pp-profile-nav ul li a:hover {
  color: var(--text) !important;
  background: none !important;
  text-decoration: none !important;
}

.pp-profile-nav ul li.current a,
.pp-profile-nav ul li.selected a {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
  background: none !important;
}

.pp-profile-nav ul li a span.count,
.pp-profile-nav ul li a .count {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 100px !important;
  padding: 1px 7px !important;
  font-size: .6rem !important;
  color: var(--text3) !important;
}

/* â•â•â• BUDDYPRESS BASE RESET â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

/* Global avatar override â€” BP adds img.avatar everywhere */
#buddypress img.avatar,
#buddypress .avatar img,
.activity-content img.avatar,
#item-header img.avatar {
  border-radius: 50% !important;
  border: none !important;
}

#buddypress {
  color: var(--text2) !important;
  font-size: .875rem !important;
  line-height: 1.7 !important;
  background: none !important;
}

#buddypress * {
  box-sizing: border-box;
}

/*
 * Heading reset â€” the theme's global h1-h6 rules set Orbitron at huge sizes.
 * Everything inside #buddypress should use small UI-scale headings unless a
 * more specific rule below overrides (e.g. .pp-username which is outside BP).
 */
#buddypress h1,
#buddypress h2,
#buddypress h3,
#buddypress h4,
#buddypress h5,
#buddypress h6 {
  font-family: var(--font-ui) !important;
  font-size: .875rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  color: var(--text) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  background: none !important;
  border: none !important;
}

/* Sub-section headings (field group titles, sidebar headings) */
#buddypress h3,
#buddypress h4 {
  font-size: .68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .12em !important;
  color: var(--text3) !important;
}

/* Paragraphs and lists inside BP content */
#buddypress p {
  margin: 0 0 12px !important;
  font-size: .875rem !important;
  color: var(--text2) !important;
  line-height: 1.7 !important;
}

#buddypress p:last-child {
  margin-bottom: 0 !important;
}

/*
 * Limit accent-colour links to CONTENT areas only.
 * A broad "#buddypress a" rule has specificity (1-0-1) and beats all our
 * nav selectors (0-1-3 or lower), turning every nav link yellow.
 * Instead we target only the areas where yellow links make sense.
 */
#buddypress .activity-content a,
#buddypress .activity-inner a,
#buddypress dl.profile-fields dd a,
#buddypress .bp-profile-section a,
#buddypress .message-content a,
#buddypress .entry-content a,
#buddypress .comment-reply-list a {
  color: var(--accent) !important;
  text-decoration: none !important;
}

#buddypress .activity-content a:hover,
#buddypress .activity-inner a:hover,
#buddypress dl.profile-fields dd a:hover {
  text-decoration: underline !important;
}

/* Remove BP's floated layout â€” use full-width column */
#buddypress .bp-wrap {
  display: block !important;
  overflow: visible !important;
}

#buddypress .bp-main-content,
#buddypress #primary-content {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#buddypress #bp-sidebar,
#buddypress .bp-sidebar,
#buddypress #sidebar {
  display: none !important;
}

/* â•â•â• MAIN MEMBER NAV (#object-nav) â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Selectors are written WITHOUT requiring #buddypress as ancestor so they work
   regardless of where BuddyPress's theme-compat layer inserts the wrapper.    */

#object-nav,
#buddypress #object-nav,
#buddypress .item-list-tabs#object-nav {
  border-bottom: 1px solid var(--border) !important;
  background: none !important;
  margin: 28px 0 0 !important;
  padding: 0 !important;
}

#object-nav ul,
#buddypress #object-nav ul,
#buddypress .item-list-tabs ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  background: none !important;
  border: none !important;
}

#object-nav ul li,
#buddypress #object-nav ul li,
#buddypress .item-list-tabs ul li {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

/* Specificity (1-0-3) beats #buddypress a (1-0-1) */
#object-nav ul li a,
#buddypress #object-nav ul li a,
#buddypress .item-list-tabs ul li a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 16px !important;
  font-family: var(--font-ui) !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  text-decoration: none !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -1px !important;
  background: none !important;
  border-radius: 0 !important;
  transition: color .2s, border-color .2s !important;
}

#object-nav ul li a:hover,
#buddypress #object-nav ul li a:hover,
#buddypress .item-list-tabs ul li a:hover {
  color: var(--text) !important;
  background: none !important;
  text-decoration: none !important;
}

#object-nav ul li.current a,
#object-nav ul li.selected a,
#buddypress #object-nav ul li.current a,
#buddypress #object-nav ul li.selected a,
#buddypress .item-list-tabs ul li.current a {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
  background: none !important;
}

#object-nav ul li a span.count,
#buddypress #object-nav ul li a span.count,
#buddypress .item-list-tabs ul li a span.count {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 100px !important;
  padding: 1px 7px !important;
  font-size: .6rem !important;
  color: var(--text3) !important;
  margin-left: 2px !important;
}

/* â•â•â• ACTIVITY / COMPONENT SUB-NAV (#subnav) â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   #subnav frequently renders outside #buddypress in theme-compat mode.
   Use standalone ID selector so it's styled regardless of nesting.            */

#subnav,
#buddypress #subnav {
  background: none !important;
  border-bottom: none !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
}

#subnav ul,
#buddypress #subnav ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

#subnav ul li,
#buddypress #subnav ul li {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}

/* Specificity (1-0-3): beats both global "a" and "#buddypress a" */
#subnav ul li a,
#buddypress #subnav ul li a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px 14px !important;
  border-radius: 20px !important;
  font-family: var(--font-ui) !important;
  font-size: .65rem !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  text-decoration: none !important;
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  transition: background .15s, color .15s, border-color .15s !important;
  white-space: nowrap !important;
}

#subnav ul li a:hover,
#buddypress #subnav ul li a:hover {
  background: var(--bg3) !important;
  color: var(--text) !important;
  border-color: rgba(255, 255, 255, .12) !important;
  text-decoration: none !important;
}

#subnav ul li.current a,
#subnav ul li.selected a,
#buddypress #subnav ul li.current a,
#buddypress #subnav ul li.selected a {
  background: var(--bg3) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* â•â•â• PROFILE FIELDS (xProfile) â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress .bp-profile-section {
  margin-bottom: 28px !important;
  padding-bottom: 28px !important;
  border-bottom: 1px solid var(--border) !important;
}

#buddypress .bp-profile-section:last-child {
  border-bottom: none !important;
}

#buddypress .bp-profile-section h3,
#buddypress .bp-profile-section h4 {
  font-family: var(--font-ui) !important;
  font-size: .6rem !important;
  font-weight: 700 !important;
  letter-spacing: .15em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  margin-bottom: 16px !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

#buddypress dl.profile-fields {
  display: grid !important;
  grid-template-columns: 160px 1fr !important;
  gap: 12px 20px !important;
  margin: 0 !important;
}

#buddypress dl.profile-fields dt {
  font-family: var(--font-ui) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  color: var(--text3) !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  padding: 2px 0 !important;
  margin: 0 !important;
  background: none !important;
}

#buddypress dl.profile-fields dd {
  color: var(--text) !important;
  font-size: .875rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

#buddypress .profile-field-visibility,
#buddypress .field-visibility-settings-toggle {
  display: none !important;
}

/* â•â•â• ACTIVITY STREAM â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress #activity-stream,
#buddypress ul.activity-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#buddypress ul.activity-list > li.activity-item {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  margin: 0 !important;
  transition: border-color .2s !important;
  overflow: hidden !important;
}

#buddypress ul.activity-list > li.activity-item:hover {
  border-color: rgba(255, 255, 255, .12) !important;
}

#buddypress .activity-content .activity-header,
#buddypress .activity-header p {
  font-size: .78rem !important;
  color: var(--text3) !important;
  margin-bottom: 8px !important;
  line-height: 1.5 !important;
}

#buddypress .activity-content .activity-header a {
  color: var(--text) !important;
  font-weight: 600 !important;
}

#buddypress .activity-content .activity-header img.avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  vertical-align: middle !important;
  margin-right: 6px !important;
}

#buddypress .activity-content .activity-inner,
#buddypress .activity-inner {
  color: var(--text2) !important;
  font-size: .875rem !important;
}

#buddypress .activity-content .activity-inner p,
#buddypress .activity-inner p {
  margin: 0 !important;
}

#buddypress .activity-meta {
  margin-top: 12px !important;
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

#buddypress .activity-meta a,
#buddypress .activity-meta span {
  font-family: var(--font-ui) !important;
  font-size: .65rem !important;
  font-weight: 700 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  transition: color .2s !important;
}

#buddypress .activity-meta a:hover {
  color: var(--accent) !important;
  text-decoration: none !important;
}

/* Activity post form */
#buddypress #whats-new-form,
#buddypress #whats-new-content {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 16px !important;
  margin-bottom: 20px !important;
}

#buddypress #whats-new-textarea {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  font-size: .875rem !important;
  padding: 10px 14px !important;
  width: 100% !important;
  resize: vertical !important;
  min-height: 80px !important;
}

#buddypress #whats-new-textarea:focus {
  outline: none !important;
  border-color: var(--accent) !important;
}

/* Activity comments */
#buddypress .comment-reply-list {
  list-style: none !important;
  margin: 12px 0 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid var(--border) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#buddypress .comment-reply-list li {
  background: var(--bg3) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: .8rem !important;
  color: var(--text2) !important;
  border: none !important;
  margin: 0 !important;
}

#buddypress .comment-reply-list li img.avatar {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  vertical-align: middle !important;
  margin-right: 6px !important;
}

/* â•â•â• NOTIFICATIONS â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress ul.notifications,
#buddypress .notifications-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#buddypress ul.notifications li,
#buddypress .notifications-list li {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  font-size: .82rem !important;
  color: var(--text2) !important;
}

#buddypress ul.notifications li.unread {
  border-left: 2px solid var(--accent) !important;
  background: rgba(255, 243, 0, .03) !important;
}

/* â•â•â• MESSAGES â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress table.messages-list {
  width: 100% !important;
  border-collapse: collapse !important;
  background: none !important;
}

#buddypress table.messages-list thead {
  display: none !important;
}

#buddypress table.messages-list tbody tr {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  background: none !important;
  transition: background .15s !important;
}

#buddypress table.messages-list tbody tr:hover {
  background: var(--bg2) !important;
}

#buddypress table.messages-list tbody tr.unread {
  border-left: 2px solid var(--accent) !important;
}

#buddypress table.messages-list td {
  color: var(--text2) !important;
  font-size: .82rem !important;
  border: none !important;
  padding: 0 !important;
  background: none !important;
}

#buddypress table.messages-list .thread-from a,
#buddypress table.messages-list .thread-subject a {
  color: var(--text) !important;
  font-weight: 600 !important;
}

#buddypress table.messages-list .thread-date {
  font-size: .68rem !important;
  color: var(--text3) !important;
  white-space: nowrap !important;
}

/* Single thread view */
#buddypress #message-thread {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

#buddypress .message-box {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
}

#buddypress .message-metadata {
  font-size: .72rem !important;
  color: var(--text3) !important;
  margin-bottom: 8px !important;
}

#buddypress .message-metadata a {
  color: var(--text) !important;
  font-weight: 600 !important;
}

#buddypress .message-content {
  font-size: .875rem !important;
  color: var(--text2) !important;
  line-height: 1.7 !important;
}

/* â•â•â• MEMBERS DIRECTORY & FRIENDS LIST â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

/* Search + filter bar */
#buddypress #members-dir-search,
#buddypress .bp-dir-search-and-filters,
#buddypress .bp-ajax-searching {
  margin-bottom: 20px !important;
  display: flex !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

#buddypress #members_search_submit,
#buddypress .bp-dir-search-and-filters input[type="search"],
#buddypress .bp-dir-search-and-filters input[type="text"] {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  font-size: .82rem !important;
  padding: 8px 14px !important;
  width: auto !important;
  min-width: 200px !important;
}

#buddypress .bp-dir-search-and-filters input:focus {
  border-color: var(--accent) !important;
  outline: none !important;
}

/* Members type filter tabs (All Members / My Friends / Online) */
#buddypress .members-type-navs ul,
#buddypress #members-order-select,
#buddypress .bp-members-filters {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  margin-bottom: 16px !important;
  list-style: none !important;
  padding: 0 !important;
}

#buddypress .members-type-navs ul li a {
  display: inline-block !important;
  padding: 5px 14px !important;
  border-radius: 6px !important;
  font-family: var(--font-ui) !important;
  font-size: .68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  color: var(--text3) !important;
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  text-decoration: none !important;
  transition: all .15s !important;
}

#buddypress .members-type-navs ul li.current a,
#buddypress .members-type-navs ul li a:hover {
  color: var(--text) !important;
  background: var(--bg3) !important;
  border-color: rgba(255, 255, 255, .1) !important;
}

/* Sort/order select */
#buddypress #members-order-select select,
#buddypress .bp-members-filters select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text2) !important;
  font-family: var(--font-ui) !important;
  font-size: .72rem !important;
  padding: 7px 12px !important;
  cursor: pointer !important;
}

/* Shared member/friend list â€” horizontal card rows */
#buddypress ul.item-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#buddypress ul.item-list > li {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  transition: border-color .2s !important;
  overflow: hidden !important;
  float: none !important;
  width: auto !important;
  text-align: left !important;
}

#buddypress ul.item-list > li:hover {
  border-color: rgba(255, 255, 255, .12) !important;
}

/* Avatar inside list item */
#buddypress ul.item-list .item-avatar {
  flex-shrink: 0 !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 2px solid var(--border) !important;
  display: block !important;
  margin: 0 !important;
}

#buddypress ul.item-list .item-avatar a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#buddypress ul.item-list .item-avatar img,
#buddypress ul.item-list .item-avatar img.avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* Text block */
#buddypress ul.item-list .item {
  flex: 1 !important;
  min-width: 0 !important;
}

#buddypress ul.item-list .item-title {
  font-family: var(--font-ui) !important;
  font-size: .875rem !important;
  font-weight: 700 !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

#buddypress ul.item-list .item-title h2,
#buddypress ul.item-list .item-title h3 {
  font-family: var(--font-ui) !important;
  font-size: .875rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--text) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

#buddypress ul.item-list .item-title a,
#buddypress ul.item-list .item-title h2 a {
  color: var(--text) !important;
  text-decoration: none !important;
}

#buddypress ul.item-list .item-title a:hover {
  color: var(--accent) !important;
  text-decoration: none !important;
}

#buddypress ul.item-list .item-meta,
#buddypress ul.item-list .activity {
  font-size: .72rem !important;
  color: var(--text3) !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Action button column */
#buddypress ul.item-list .action {
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* â•â•â• FORMS & INPUTS â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress form .editfield,
#buddypress form .bp-profile-section {
  margin-bottom: 20px !important;
}

#buddypress form label,
#buddypress form .label {
  display: block !important;
  font-family: var(--font-ui) !important;
  font-size: .68rem !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  margin-bottom: 6px !important;
  background: none !important;
  border: none !important;
}

#buddypress form input[type="text"],
#buddypress form input[type="email"],
#buddypress form input[type="password"],
#buddypress form input[type="url"],
#buddypress form input[type="search"],
#buddypress form input[type="number"],
#buddypress form input[type="tel"],
#buddypress form textarea,
#buddypress form select {
  width: 100% !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  font-size: .875rem !important;
  padding: 10px 14px !important;
  transition: border-color .2s !important;
  font-family: inherit !important;
  box-shadow: none !important;
  outline: none !important;
}

#buddypress form input:focus,
#buddypress form textarea:focus,
#buddypress form select:focus {
  border-color: var(--accent) !important;
  outline: none !important;
  box-shadow: none !important;
}

#buddypress form textarea {
  resize: vertical !important;
  min-height: 100px !important;
}

#buddypress form select {
  appearance: none !important;
  -webkit-appearance: none !important;
}

#buddypress form input::placeholder,
#buddypress form textarea::placeholder {
  color: var(--text3) !important;
}

#buddypress form input[type="checkbox"],
#buddypress form input[type="radio"] {
  width: auto !important;
  margin-right: 6px !important;
  accent-color: var(--accent) !important;
}

#buddypress form .field-description,
#buddypress form .description {
  font-size: .72rem !important;
  color: var(--text3) !important;
  margin-top: 4px !important;
  line-height: 1.5 !important;
}

#buddypress .profile-field-visibility,
#buddypress .bp-field-css-id-0 {
  display: none !important;
}

/* â•â•â• BUTTONS â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress div.generic-button a,
#buddypress .generic-button input[type="submit"],
#buddypress .generic-button button,
#buddypress a.button,
#buddypress button.button,
#buddypress input[type="submit"],
#buddypress a.bp-button,
#buddypress button[type="submit"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-family: var(--font-ui) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: 1px solid var(--border) !important;
  background: var(--bg3) !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  transition: opacity .2s !important;
  box-shadow: none !important;
}

#buddypress div.generic-button a:hover,
#buddypress a.button:hover,
#buddypress button.button:hover {
  opacity: .85 !important;
  text-decoration: none !important;
}

/* Primary button variants */
#buddypress .generic-button a.add,
#buddypress .generic-button a.send-message,
#buddypress a.button.add,
#buddypress a.button.send-message,
#buddypress input[type="submit"].save {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #000 !important;
}

/* Outline variant (remove, cancel, already-friend) */
#buddypress .generic-button a.remove,
#buddypress .generic-button a.friendship-button.is_friend,
#buddypress .generic-button a.cancel {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text2) !important;
}

/* â•â•â• PAGINATION â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress .pag-count,
#buddypress .pagination-links {
  font-size: .72rem !important;
  color: var(--text3) !important;
  margin-top: 24px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

#buddypress .pagination-links a,
#buddypress .pagination-links span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  border: 1px solid var(--border) !important;
  background: var(--bg2) !important;
  color: var(--text2) !important;
  font-size: .72rem !important;
  text-decoration: none !important;
}

#buddypress .pagination-links a:hover {
  background: var(--bg3) !important;
  color: var(--text) !important;
  text-decoration: none !important;
}

#buddypress .pagination-links .current {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #000 !important;
  font-weight: 700 !important;
}

/* â•â•â• FEEDBACK / NOTICES â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

#buddypress div#message p,
#buddypress div.bp-feedback {
  background: rgba(255, 243, 0, .07) !important;
  border: 1px solid rgba(255, 243, 0, .25) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  margin-bottom: 20px !important;
  font-size: .82rem !important;
  color: var(--accent) !important;
}

#buddypress div#message.error p,
#buddypress div.bp-feedback.error {
  background: rgba(220, 50, 50, .08) !important;
  border-color: rgba(220, 50, 50, .3) !important;
  color: #f87171 !important;
}

/* â•â•â• PROFILE TABS CONTENT WRAPPER â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

.profile-tabs-content {
  padding-top: 24px;
}

#buddypress #content,
#buddypress .entry-content {
  margin: 0 !important;
  padding: 0 !important;
}

/* â•â•â• RESPONSIVE â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•*/

@media (max-width: 800px) {
  .pp-identity {
    margin-top: -36px !important;
  }

  .pp-avatar {
    width: 72px !important;
    height: 72px !important;
    font-size: 1.5rem !important;
  }

  .pp-header-actions {
    margin-left: 0 !important;
    width: 100% !important;
  }

  #buddypress ul.item-list > li {
    flex-wrap: wrap !important;
  }

  #buddypress dl.profile-fields {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  #buddypress dl.profile-fields dt {
    margin-bottom: 0 !important;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GROUPS / TEAMS â€” SINGLE GROUP PAGE (.grp-*)
   Loaded on all is_buddypress() pages; group.php outputs these classes.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Cover banner */
.grp-banner {
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(135deg, rgba(255, 243, 0, .07) 0%, transparent 65%);
  margin-left: calc(var(--container-pad, 0px) * -1);
  margin-right: calc(var(--container-pad, 0px) * -1);
}

/* Identity row â€” avatar + name block + actions */
.grp-identity {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  margin-top: -40px;
}

/* Avatar */
.grp-avatar {
  flex-shrink: 0;
}

.grp-avatar img.avatar,
.grp-avatar img {
  width: 80px !important;
  height: 80px !important;
  border-radius: 8px !important;
  border: 3px solid var(--bg) !important;
  background: var(--bg3);
  object-fit: cover;
  display: block;
}

/* Name block */
.grp-name-block {
  flex: 1;
  min-width: 0;
  padding-top: 44px;
}

.grp-name {
  font-family: var(--font-h) !important;
  font-size: clamp(1.2rem, 3vw, 1.8rem) !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  color: var(--text) !important;
  line-height: 1.1 !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

.grp-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--text2);
  margin-bottom: 10px;
}

.grp-meta strong {
  color: var(--text);
}

.grp-meta-game {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text2);
}

.grp-meta-privacy {
  font-family: var(--font-ui);
  font-size: .68rem;
  color: var(--text3);
}

.grp-desc {
  margin: 0;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--text2);
  max-width: 600px;
}

/* Actions column â€” join / leave / manage */
.grp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 44px;
}

/*
 * BP outputs bp_group_join_button() as either:
 *   <div class="generic-button"><a class="group-button join-group">â€¦</a></div>
 * or simply:
 *   <a class="group-button join-group">â€¦</a>
 * Style both forms.
 */
.grp-actions .group-button,
.grp-actions .generic-button a {
  display: inline-flex !important;
  align-items: center !important;
  padding: 9px 20px !important;
  font-family: var(--font-ui) !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: opacity .2s !important;
  clip-path: var(--blade-xs) !important;
  border-radius: 0 !important;
  background: var(--accent) !important;
  color: #080808 !important;
  border: none !important;
  white-space: nowrap !important;
}

.grp-actions .group-button:hover,
.grp-actions .generic-button a:hover {
  opacity: .88 !important;
  text-decoration: none !important;
}

/* Leave / already-member â€” outline style */
.grp-actions .group-button.leave-group,
.grp-actions .group-button.is_member,
.grp-actions .generic-button a.leave-group {
  background: transparent !important;
  color: var(--text2) !important;
  border: 1px solid var(--border) !important;
  clip-path: none !important;
  border-radius: 3px !important;
}

.grp-actions .group-button.leave-group:hover,
.grp-actions .generic-button a.leave-group:hover {
  color: var(--text) !important;
  border-color: var(--borderl) !important;
  opacity: 1 !important;
}

/* Pending membership request */
.grp-actions .group-button.membership-requested {
  background: var(--bg3) !important;
  color: var(--text3) !important;
  border: 1px solid var(--border) !important;
  clip-path: none !important;
  border-radius: 3px !important;
  cursor: default !important;
}

/* â”€â”€ Members grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.grp-members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.grp-members-title {
  font-family: var(--font-h) !important;
  font-size: .95rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  color: var(--text) !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

.grp-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.grp-member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  clip-path: var(--blade-xs);
  text-decoration: none !important;
  color: var(--text2) !important;
  font-size: .75rem;
  text-align: center;
  transition: border-color .15s, color .15s;
}

.grp-member-card:hover {
  border-color: var(--borderl) !important;
  color: var(--text) !important;
  text-decoration: none !important;
}

.grp-member-card img.avatar,
.grp-member-card img {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--border) !important;
  display: block !important;
}

.grp-member-name {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

.grp-empty {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  color: var(--text3);
  font-size: .85rem;
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@media (max-width: 700px) {
  .grp-identity {
    margin-top: -28px;
  }

  .grp-name-block,
  .grp-actions {
    padding-top: 8px;
    width: 100%;
  }

  .grp-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .grp-members-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GROUP CREATION / SETTINGS FORM â€” Radio, Checkbox, File upload, Step tabs
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Option blocks (.radio / .checkbox containers in BP group forms) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

#buddypress form .radio,
#buddypress form .checkbox {
  margin-bottom: 10px !important;
  padding: 12px 14px !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  transition: border-color .15s !important;
}

#buddypress form .radio:hover,
#buddypress form .checkbox:hover {
  border-color: var(--borderl) !important;
}

/* Label inside option block â€” flex row so input sits beside text */
#buddypress form .radio label,
#buddypress form .checkbox label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  cursor: pointer !important;
  font-size: .85rem !important;
  color: var(--text2) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 400 !important;
  margin-bottom: 0 !important;
}

/* The actual input inside option blocks */
#buddypress form .radio input[type="radio"],
#buddypress form .checkbox input[type="checkbox"] {
  flex-shrink: 0 !important;
  margin-top: 3px !important;
  margin-right: 0 !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--accent) !important;
  cursor: pointer !important;
}

/* Bold option title */
#buddypress form .radio label strong,
#buddypress form .checkbox label strong {
  display: block !important;
  font-family: var(--font-ui) !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  letter-spacing: .02em !important;
  margin-bottom: 2px !important;
}

/* Descriptor text */
#buddypress form .radio label span,
#buddypress form .checkbox label span {
  display: block !important;
  font-size: .71rem !important;
  color: var(--text3) !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
}

/* Highlight the block whose input is currently checked */
#buddypress form .radio:has(input:checked),
#buddypress form .checkbox:has(input:checked) {
  border-color: rgba(255, 243, 0, .35) !important;
  background: rgba(255, 243, 0, .03) !important;
}

/* â”€â”€ File upload input â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

#buddypress form input[type="file"],
#buddypress .avatar-nav input[type="file"] {
  width: 100% !important;
  padding: 10px 14px !important;
  background: var(--bg3) !important;
  border: 1px dashed var(--borderl) !important;
  border-radius: 8px !important;
  color: var(--text2) !important;
  font-size: .82rem !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: border-color .2s !important;
  box-sizing: border-box !important;
}

#buddypress form input[type="file"]:hover,
#buddypress .avatar-nav input[type="file"]:hover {
  border-color: var(--accent) !important;
}

/* The "Choose File" / "Browse" button portion of file inputs */
#buddypress form input[type="file"]::file-selector-button,
#buddypress .avatar-nav input[type="file"]::file-selector-button {
  background: var(--accent) !important;
  color: #080808 !important;
  border: none !important;
  padding: 5px 14px !important;
  border-radius: 4px !important;
  font-family: var(--font-ui) !important;
  font-size: .7rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  margin-right: 12px !important;
  transition: opacity .15s !important;
}

#buddypress form input[type="file"]::file-selector-button:hover,
#buddypress .avatar-nav input[type="file"]::file-selector-button:hover {
  opacity: .85 !important;
}

/* â”€â”€ Group creation step/progress tabs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

#buddypress #group-create-tabs {
  display: flex !important;
  gap: 6px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 24px !important;
  flex-wrap: wrap !important;
}

#buddypress #group-create-tabs li {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#buddypress #group-create-tabs li a,
#buddypress #group-create-tabs li span {
  display: inline-flex !important;
  align-items: center !important;
  padding: 5px 14px !important;
  border-radius: 20px !important;
  font-family: var(--font-ui) !important;
  font-size: .65rem !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  text-decoration: none !important;
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  transition: color .15s, background .15s, border-color .15s !important;
}

#buddypress #group-create-tabs li.current a,
#buddypress #group-create-tabs li.selected a {
  background: var(--bg3) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PROFILE PAGE
   Classes here match the prophecy-proto inline <style> block exactly.
   .card-wrap, .card, .eyebrow, .form-group, .form-label, .form-input come from
   the site's global style.css â€” do not redefine them here.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */


.pp-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
  padding-top: 28px;
}

/* Bio */
.pp-bio {
  font-size: .875rem;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 18px;
  white-space: pre-wrap;
}

.pp-bio.empty {
  color: var(--text3);
  font-style: italic;
}

/* Stats strip */
.pp-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pp-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pp-stat-val {
  font-family: var(--font-h);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.pp-stat-lbl {
  font-family: var(--font-ui);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3);
}

/* Orders */
.pp-orders {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pp-orders-head {
  font-family: var(--font-ui);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
}

.pp-order-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.pp-order-item:last-child { border-bottom: none; }

.pp-order-date {
  font-family: var(--font-ui);
  font-size: .68rem;
  color: var(--text3);
  margin-top: 3px;
}

.pp-order-products {
  font-size: .8rem;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
  min-width: 0;
}

.pp-order-total {
  font-family: var(--font-h);
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.pp-orders-empty {
  font-size: .8rem;
  color: var(--text3);
  font-style: italic;
  padding: 8px 0;
}

/* Receipts */
.pp-receipts {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pp-receipts-head {
  font-family: var(--font-ui);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
}

.pp-receipt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.pp-receipt:last-child { border-bottom: none; }

.pp-receipt-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg4);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

.pp-receipt-info { min-width: 0; }

.pp-receipt-name {
  font-family: var(--font-h);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-receipt-meta {
  font-size: .68rem;
  color: var(--text3);
  margin-top: 3px;
  line-height: 1.5;
}

.pp-receipt-right { text-align: right; flex-shrink: 0; }

.pp-receipt-amount {
  font-family: var(--font-h);
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.pp-receipt-status {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
}

.pp-receipt-status--live { background: rgba(0,200,100,.12); color: #00c864; }
.pp-receipt-status--done { background: rgba(255,255,255,.06); color: var(--text3); }
.pp-receipt-status--reg  { background: rgba(255,243,0,.1); color: var(--accent); }

/* Friends grid */
.pp-friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pp-friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color .15s;
}

.pp-friend-card:hover {
  border-color: var(--borderl);
  text-decoration: none;
}

.pp-friend-card img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.pp-friend-name {
  font-family: var(--font-ui);
  font-size: .65rem;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Activision / Discord badges */
.pp-activision {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
}

.pp-activision-lbl {
  font-family: var(--font-ui);
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text3);
}

.pp-activision-val {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent);
}

.pp-activision-val.empty {
  color: var(--text3);
  font-weight: 400;
  font-style: italic;
}

.pp-discord-badge {
  border-color: rgba(88,101,242,.35) !important;
  background: rgba(88,101,242,.08) !important;
}

.pp-discord-badge svg {
  width: 13px;
  height: 13px;
  fill: #5865F2;
  flex-shrink: 0;
}

.pp-discord-badge .pp-activision-val { color: #5865F2; }

/* â”€â”€ Games checkbox grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.game-check {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: .75rem;
  color: var(--text2);
  padding: 4px 0;
  transition: color .15s;
}

.game-check input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: var(--accent);
  width: 14px !important;
  height: 14px !important;
  cursor: pointer;
}

.game-check:hover { color: var(--text); }

/* â”€â”€ Socials 2-column grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.social-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* â”€â”€ Privacy toggles â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.privacy-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.privacy-toggle-row:last-of-type { border-bottom: none; }

.privacy-toggle-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.privacy-toggle-desc {
  font-size: .68rem;
  color: var(--text3);
  line-height: 1.4;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--text3);
  transition: transform .2s, background .2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #fff300;
  border-color: #fff300;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translate(18px, -50%);
  background: #080808;
}

/* â”€â”€ Wall posts â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.wall-post {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.wall-post:last-child { border-bottom: none; }

.wall-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.wall-post-avatar img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
}

.wall-post-meta { flex: 1; min-width: 0; }

.wall-post-author {
  display: block;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.wall-post-author:hover { color: var(--accent); text-decoration: none; }

.wall-post-time {
  font-size: .65rem;
  color: var(--text3);
}

.wall-delete-btn {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}

.wall-delete-btn:hover {
  color: #f87171;
  background: rgba(248,113,113,.08);
}

.wall-post-content {
  font-size: .82rem;
  color: var(--text2);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* â”€â”€ Bot Management â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.bot-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 24px;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 700;
  color: var(--text2);
}

.remove-role-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: .85rem;
  line-height: 1;
  padding: 0;
  transition: color .15s;
}

.remove-role-btn:hover { color: #f87171; }

.role-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.role-add-row .form-input { flex: 1; }

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@media (max-width: 800px) {
  .pp-body { grid-template-columns: 1fr; }
  .pp-identity { margin-top: -36px; }
  .pp-avatar { width: 72px; height: 72px; font-size: 1.5rem; }
  .social-inputs-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr 1fr; }
  .pp-friends-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
}

/* ══ FIXES ══════════════════════════════════════════════════════════════════*/

/* bp-screen-reader-text — was in BP Nouveau CSS which we dequeue.
   Without this, "Member Activities" and "Post Update" h2s render visibly. */
.bp-screen-reader-text {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

/* Toggle switch checkbox hidden — high-specificity override to survive
   any #buddypress form input[type=checkbox] { width:auto !important } rule. */
#buddypress .toggle-switch input[type="checkbox"],
.pp-edit-card .toggle-switch input[type="checkbox"] {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
  margin: 0 !important;
}

/* Privacy toggle row — enforce flex layout inside BP Nouveau wrapper. */
#buddypress .privacy-toggle-row,
.pp-edit-card .privacy-toggle-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Avatars — Nouveau activity form renders #whats-new-avatar without .avatar class. */
#buddypress #whats-new-avatar img,
#buddypress .activity-update-form img,
#buddypress #activity-stream .activity-avatar img,
#buddypress .comment-reply-list img {
  border-radius: 50% !important;
  object-fit: cover !important;
}

/* Username/password inputs live outside <form> so #buddypress form input
   width:100% !important does not reach them. Style them directly. */
#ppUsernameChange input[type="text"],
#ppUsernameChange input[type="password"] {
  display: block !important;
  width: 100% !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  color: var(--text) !important;
  font-size: .875rem !important;
  font-family: var(--font-ui) !important;
  line-height: 1.5 !important;
  outline: none !important;
  transition: border-color .15s !important;
  margin-bottom: 10px !important;
  box-sizing: border-box !important;
}
#ppUsernameChange input[type="text"]:focus,
#ppUsernameChange input[type="password"]:focus {
  border-color: var(--accent) !important;
}

/* BP Nouveau sub-nav (Personal / Mentions / Favorites / Friends tabs). */
#buddypress #subnav,
#buddypress nav#subnav {
  background: none !important;
  border-bottom: 1px solid var(--border) !important;
  margin-bottom: 20px !important;
}
#buddypress #subnav li a,
#buddypress nav#subnav li a {
  font-family: var(--font-ui) !important;
  font-size: .7rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  padding: 8px 12px !important;
  border-bottom: 2px solid transparent !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: color .15s !important;
}
#buddypress #subnav li.current a,
#buddypress #subnav li.selected a {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
}

/* Activity stream items. */
#buddypress #activity-stream .activity-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#buddypress #activity-stream .activity-item {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
}
#buddypress #activity-stream .activity-header {
  font-size: .8rem !important;
  color: var(--text2) !important;
  line-height: 1.6 !important;
}
#buddypress #activity-stream .activity-header a {
  color: var(--text) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
#buddypress #activity-stream .activity-content .activity-inner {
  font-size: .875rem !important;
  color: var(--text2) !important;
  line-height: 1.7 !important;
  padding: 10px 0 !important;
}
#buddypress #activity-stream .activity-meta a {
  font-family: var(--font-ui) !important;
  font-size: .65rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  margin-right: 12px !important;
  text-decoration: none !important;
}
#buddypress #activity-stream .activity-meta a:hover { color: var(--accent) !important; }

/* Nouveau JS-rendered activity post form container. */
#buddypress #bp-nouveau-activity-form,
#buddypress .activity-update-form {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 16px !important;
  margin-bottom: 20px !important;
}

/* Activity filter bar. */
#buddypress #activity-filter-select {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: .75rem !important;
  color: var(--text3) !important;
}
#buddypress #activity-filter-by {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  font-size: .75rem !important;
  color: var(--text2) !important;
  font-family: var(--font-ui) !important;
}

/* ── BP feedback banners & template notices ──────────────────────────────── */

.bp-feedback,
.bp-template-notice,
#buddypress .bp-feedback,
#buddypress .bp-template-notice {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-family: var(--font-ui) !important;
  font-size: .82rem !important;
  color: var(--text2) !important;
  line-height: 1.6 !important;
  margin-bottom: 16px !important;
  list-style: none !important;
}

/* Dismiss button */
.bp-feedback .bp-close-notice,
.bp-template-notice .bp-close-notice {
  color: var(--text3) !important;
  font-size: .7rem !important;
}

/* Success */
.bp-feedback.success,
.bp-template-notice.success,
#buddypress .bp-feedback.success,
#buddypress .bp-template-notice.success {
  background: rgba(255,243,0,.04) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* Error */
.bp-feedback.error,
.bp-template-notice.error,
#buddypress .bp-feedback.error,
#buddypress .bp-template-notice.error {
  border-color: rgba(248,113,113,.4) !important;
  color: #f87171 !important;
}

/* Info / warning */
.bp-feedback.info,
.bp-template-notice.info,
#buddypress .bp-feedback.info,
#buddypress .bp-template-notice.info {
  border-color: rgba(100,160,255,.3) !important;
  color: #7eb3ff !important;
}

.bp-feedback.warning,
.bp-template-notice.warning,
#buddypress .bp-feedback.warning,
#buddypress .bp-template-notice.warning {
  border-color: rgba(245,158,11,.35) !important;
  color: #f59e0b !important;
}

/* p tag inside notices */
.bp-feedback p,
.bp-template-notice p {
  margin: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MESSAGES PAGE  — two-column sidebar / thread layout
   Matches prophecy-proto/messages.html
   ═══════════════════════════════════════════════════════════════════════════ */

.messages-page {
  padding-bottom: 40px;
}

/* Wrap the BuddyPress messages component in the prototype grid */
.messages-page #buddypress {
  display: grid !important;
  grid-template-columns: 300px 1fr !important;
  height: calc(100dvh - 140px) !important;
  min-height: 480px !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: var(--bg) !important;
}

@media (max-width: 700px) {
  .messages-page #buddypress {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
}

/* ── Sidebar (thread list) ────────────────────────────────────────────────── */

.messages-page #buddypress .messages-sidebar,
.messages-page #buddypress #message-threads {
  background: var(--bg2) !important;
  border-right: 1px solid var(--border) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.messages-page #buddypress .messages-sidebar .msg-sidebar-head,
.messages-page #buddypress #message-threads > h2,
.messages-page #buddypress .messages-options-nav {
  padding: 14px 16px 10px !important;
  border-bottom: 1px solid var(--border) !important;
  flex-shrink: 0 !important;
  font-family: var(--font-ui) !important;
  font-size: .6rem !important;
  font-weight: 700 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  background: none !important;
  margin: 0 !important;
}

.messages-page #buddypress table.messages-list {
  overflow-y: auto !important;
  flex: 1 !important;
  display: block !important;
}

.messages-page #buddypress table.messages-list tbody tr {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(255,255,255,.04) !important;
  cursor: pointer !important;
  transition: background .15s !important;
  position: relative !important;
}

.messages-page #buddypress table.messages-list tbody tr:hover {
  background: rgba(255,255,255,.04) !important;
}

.messages-page #buddypress table.messages-list tbody tr.unread {
  border-left: 2px solid var(--accent) !important;
  background: rgba(255,243,0,.03) !important;
}

/* Thread avatar cell */
.messages-page #buddypress table.messages-list .thread-avatar {
  width: 36px !important;
  height: 36px !important;
  flex-shrink: 0 !important;
}

.messages-page #buddypress table.messages-list .thread-avatar img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1px solid var(--border) !important;
}

/* Thread from / subject */
.messages-page #buddypress table.messages-list .thread-from,
.messages-page #buddypress table.messages-list .thread-subject {
  flex: 1 !important;
  min-width: 0 !important;
}

.messages-page #buddypress table.messages-list .thread-from a {
  font-size: .82rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

.messages-page #buddypress table.messages-list .thread-subject a {
  font-size: .72rem !important;
  color: var(--text3) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  margin-top: 2px !important;
}

/* Unread count badge */
.messages-page #buddypress table.messages-list .thread-unread-count {
  background: var(--accent) !important;
  color: #000 !important;
  font-size: .55rem !important;
  font-weight: 700 !important;
  font-family: var(--font-ui) !important;
  border-radius: 50% !important;
  width: 16px !important;
  height: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Thread date */
.messages-page #buddypress table.messages-list .thread-date {
  font-size: .62rem !important;
  color: var(--text3) !important;
  font-family: var(--font-ui) !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* ── Thread / message view ────────────────────────────────────────────────── */

.messages-page #buddypress .messages-thread-list,
.messages-page #buddypress #message-thread-container {
  display: flex !important;
  flex-direction: column !important;
  background: var(--bg) !important;
  overflow: hidden !important;
  height: 100% !important;
}

/* Thread header */
.messages-page #buddypress .message-thread-header,
.messages-page #buddypress .thread-title {
  padding: 14px 20px !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
  background: var(--bg2) !important;
  font-family: var(--font-h) !important;
  font-size: .85rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 0 !important;
}

/* Scrollable message area */
.messages-page #buddypress #message-thread,
.messages-page #buddypress .message-list {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  background: var(--bg) !important;
}

/* Individual message boxes → chat bubbles */
.messages-page #buddypress .message-box {
  max-width: 72% !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px 12px 12px 2px !important;
  padding: 10px 14px !important;
  align-self: flex-start !important;
}

/* Sent messages aligned right */
.messages-page #buddypress .message-box.sent,
.messages-page #buddypress .message-box.mine {
  background: rgba(255,243,0,.10) !important;
  border-color: rgba(255,243,0,.18) !important;
  border-radius: 12px 12px 2px 12px !important;
  align-self: flex-end !important;
}

.messages-page #buddypress .message-metadata {
  font-size: .62rem !important;
  color: var(--text3) !important;
  font-family: var(--font-ui) !important;
  margin-bottom: 6px !important;
}

.messages-page #buddypress .message-metadata a {
  color: var(--text2) !important;
  font-weight: 600 !important;
}

.messages-page #buddypress .message-content {
  font-size: .83rem !important;
  color: var(--text) !important;
  line-height: 1.5 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

/* ── Reply / compose area ─────────────────────────────────────────────────── */

.messages-page #buddypress #send-reply,
.messages-page #buddypress .compose-container {
  padding: 16px 20px !important;
  border-top: 1px solid var(--border) !important;
  background: var(--bg2) !important;
  flex-shrink: 0 !important;
}

.messages-page #buddypress #send-reply textarea,
.messages-page #buddypress .compose-container textarea {
  width: 100% !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  color: var(--text) !important;
  font-size: .83rem !important;
  font-family: var(--font-ui) !important;
  resize: none !important;
  min-height: 40px !important;
  max-height: 120px !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
  transition: border-color .15s !important;
}

.messages-page #buddypress #send-reply textarea:focus,
.messages-page #buddypress .compose-container textarea:focus {
  outline: none !important;
  border-color: rgba(255,243,0,.4) !important;
}

.messages-page #buddypress #send-reply input[type="submit"],
.messages-page #buddypress #send-reply button[type="submit"],
.messages-page #buddypress .compose-container input[type="submit"] {
  background: var(--accent) !important;
  color: #000 !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 16px !important;
  font-family: var(--font-ui) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  letter-spacing: .06em !important;
  margin-top: 8px !important;
  transition: opacity .15s !important;
}

.messages-page #buddypress #send-reply input[type="submit"]:hover,
.messages-page #buddypress .compose-container input[type="submit"]:hover {
  opacity: .85 !important;
}

/* Empty state */
.messages-page #buddypress .no-messages,
.messages-page #buddypress .msg-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  color: var(--text3) !important;
  font-size: .82rem !important;
  gap: 10px !important;
  text-align: center !important;
  padding: 40px !important;
}

/* New message button */
.messages-page #buddypress a.compose-message,
.messages-page #buddypress .new-message-btn {
  background: rgba(255,243,0,.08) !important;
  border: 1px solid rgba(255,243,0,.18) !important;
  border-radius: 6px !important;
  color: var(--accent) !important;
  font-size: .7rem !important;
  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background .15s !important;
}

.messages-page #buddypress a.compose-message:hover,
.messages-page #buddypress .new-message-btn:hover {
  background: rgba(255,243,0,.13) !important;
}

/* ── Mobile: hide/show columns ────────────────────────────────────────────── */

@media (max-width: 700px) {
  .messages-page #buddypress .messages-sidebar {
    display: flex !important;
  }
  .messages-page #buddypress .messages-thread-list {
    display: none !important;
  }
  .messages-page #buddypress .messages-thread-list.mobile-show {
    display: flex !important;
  }
  .messages-page #buddypress .messages-sidebar.mobile-hide {
    display: none !important;
  }
}
