/* Jim Up – BuddyPress Dark Theme Layer
 * Übernimmt die Variablen aus frontend.css und überlagert die BuddyPress-Optik.
 */

#buddypress {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--jim-text);
  max-width: 1100px;
  margin: 0 auto;
  padding: 1em;
}
#buddypress * { box-sizing: border-box; }

/* Profil-Header */
#buddypress #item-header,
#buddypress div#item-header {
  background: var(--jim-bg-card);
  border-radius: var(--jim-radius);
  box-shadow: var(--jim-shadow);
  padding: 1.5em;
  margin-bottom: 1.5em;
  border: 1px solid var(--jim-border);
  display: flex; flex-wrap: wrap; gap: 1.5em; align-items: center;
}
#buddypress #item-header-avatar { margin: 0; flex-shrink: 0; }
#buddypress #item-header-avatar img.avatar {
  border-radius: 50%;
  border: 3px solid var(--jim-bg-card);
  box-shadow: 0 0 0 1px var(--jim-border);
  width: 100px; height: 100px;
}
#buddypress #item-header-content { flex: 1; min-width: 200px; }
#buddypress #item-header h1,
#buddypress #item-header h2,
#buddypress #item-header .user-nicename {
  font-size: 1.6rem; font-weight: 700; margin: 0 0 .3em;
  color: var(--jim-text);
}
#buddypress #item-meta {
  color: var(--jim-text-muted);
  font-size: .9rem; margin: .5em 0;
}
#buddypress #item-header .jim-rating {
  margin: .8em 0 0;
  padding: .6em .8em;
  background: var(--jim-bg-elevated);
  border-radius: var(--jim-radius);
  display: inline-flex;
}

/* Tab-Navigation */
#buddypress div.item-list-tabs,
#buddypress #object-nav,
#buddypress #subnav {
  background: var(--jim-bg-card);
  border-radius: var(--jim-radius);
  box-shadow: var(--jim-shadow);
  margin-bottom: 1.5em;
  border: 1px solid var(--jim-border);
  overflow: hidden;
}
#buddypress div.item-list-tabs ul,
#buddypress #object-nav ul,
#buddypress #subnav ul {
  display: flex; flex-wrap: wrap; list-style: none;
  margin: 0; padding: 0; background: transparent; border: 0;
}
#buddypress div.item-list-tabs ul li,
#buddypress #object-nav ul li,
#buddypress #subnav ul li {
  margin: 0; background: transparent; border: 0;
}
#buddypress div.item-list-tabs ul li a,
#buddypress #object-nav ul li a,
#buddypress #subnav ul li a {
  display: block; padding: .9em 1.2em;
  color: var(--jim-text-muted); text-decoration: none;
  font-weight: 500; border-bottom: 3px solid transparent;
  transition: all .15s ease;
}
#buddypress div.item-list-tabs ul li a:hover,
#buddypress #object-nav ul li a:hover,
#buddypress #subnav ul li a:hover {
  color: var(--jim-accent);
  background: var(--jim-bg-elevated);
}
#buddypress div.item-list-tabs ul li.current a,
#buddypress div.item-list-tabs ul li.selected a,
#buddypress #object-nav ul li.current a,
#buddypress #object-nav ul li.selected a {
  color: var(--jim-accent);
  border-bottom-color: var(--jim-accent);
  background: transparent;
}
#buddypress div.item-list-tabs ul li a span,
#buddypress #object-nav ul li a span {
  background: var(--jim-bg-elevated);
  color: var(--jim-text-muted);
  border-radius: 999px; padding: 1px 8px;
  font-size: .75em; margin-left: .3em;
}

/* Verzeichnisse (Mitglieder, Gruppen) */
#buddypress #members-list,
#buddypress #groups-list,
#buddypress ul.item-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1em; grid-template-columns: 1fr;
}
@media (min-width: 640px)  { #buddypress #members-list, #buddypress #groups-list, #buddypress ul.item-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { #buddypress #members-list, #buddypress #groups-list, #buddypress ul.item-list { grid-template-columns: repeat(3, 1fr); } }

#buddypress #members-list li,
#buddypress #groups-list li,
#buddypress ul.item-list li {
  background: var(--jim-bg-card);
  border: 1px solid var(--jim-border);
  border-radius: var(--jim-radius);
  box-shadow: var(--jim-shadow);
  padding: 1.2em; margin: 0;
  display: flex; flex-direction: column; gap: .6em;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
#buddypress #members-list li:hover,
#buddypress #groups-list li:hover,
#buddypress ul.item-list li:hover {
  box-shadow: var(--jim-shadow-hover);
  transform: translateY(-2px);
  border-color: #353d4a;
}
#buddypress ul.item-list li img.avatar {
  border-radius: 50%; width: 64px; height: 64px; margin: 0;
}
#buddypress ul.item-list li .item-title,
#buddypress ul.item-list li h2,
#buddypress ul.item-list li h3 {
  font-size: 1.05rem; font-weight: 600; margin: 0;
}
#buddypress ul.item-list li .item-title a,
#buddypress ul.item-list li h2 a,
#buddypress ul.item-list li h3 a {
  color: var(--jim-text); text-decoration: none;
}
#buddypress ul.item-list li .item-title a:hover { color: var(--jim-accent); }
#buddypress ul.item-list li .item-meta,
#buddypress ul.item-list li .item-desc {
  color: var(--jim-text-muted); font-size: .85rem; margin: 0;
}

/* Buttons */
#buddypress a.button,
#buddypress button,
#buddypress input[type="submit"],
#buddypress input[type="button"],
#buddypress .generic-button a,
#buddypress div.generic-button a {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  background: var(--jim-accent); color: #fff;
  border: 0; border-radius: var(--jim-radius-sm);
  padding: .55em 1.2em;
  font-size: .9rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, transform .05s ease;
}
#buddypress a.button:hover,
#buddypress button:hover,
#buddypress input[type="submit"]:hover {
  background: var(--jim-accent-hover); color: #fff;
}
#buddypress a.button:active,
#buddypress button:active { transform: translateY(1px); }
#buddypress .leave-group a,
#buddypress .pending a,
#buddypress button[name="cancel"] {
  background: transparent; color: var(--jim-text-muted);
  border: 1px solid var(--jim-border);
}
#buddypress .leave-group a:hover {
  background: var(--jim-bg-elevated); color: var(--jim-text);
}

/* Suchformulare und Filter */
#buddypress li.last.filter,
#buddypress div.dir-search,
#buddypress div#group-create-tabs {
  background: var(--jim-bg-card);
  border-radius: var(--jim-radius);
  padding: .8em 1em;
  border: 1px solid var(--jim-border);
  margin-bottom: 1em;
}
#buddypress input[type="text"],
#buddypress input[type="email"],
#buddypress input[type="search"],
#buddypress input[type="password"],
#buddypress textarea,
#buddypress select {
  border: 1px solid var(--jim-border);
  border-radius: var(--jim-radius-sm);
  padding: .55em .8em;
  font-size: .95rem;
  background: var(--jim-bg);
  color: var(--jim-text);
  width: 100%; max-width: 100%;
}
#buddypress input[type="text"]:focus,
#buddypress textarea:focus,
#buddypress select:focus {
  outline: none; border-color: var(--jim-accent);
  box-shadow: 0 0 0 3px rgba(47,128,237,0.15);
}

/* Profil-Edit */
#buddypress div.profile {
  background: var(--jim-bg-card);
  border: 1px solid var(--jim-border);
  border-radius: var(--jim-radius);
  padding: 1.5em; box-shadow: var(--jim-shadow);
}
#buddypress div.profile h2 { margin-top: 0; color: var(--jim-text); }
#buddypress div.profile-fields .field-name {
  font-weight: 600; color: var(--jim-text-muted);
  font-size: .85rem; text-transform: uppercase; letter-spacing: .05em;
}

/* Gruppe Body */
#buddypress #item-body {
  background: var(--jim-bg-card);
  border-radius: var(--jim-radius);
  border: 1px solid var(--jim-border);
  padding: 1.5em; box-shadow: var(--jim-shadow);
}

/* Pagination */
#buddypress div.pagination {
  background: transparent; padding: 1em 0;
  display: flex; justify-content: center; gap: .3em;
}
#buddypress div.pagination .page-numbers {
  padding: .4em .8em;
  border-radius: var(--jim-radius-sm);
  border: 1px solid var(--jim-border);
  color: var(--jim-text); text-decoration: none;
  background: var(--jim-bg-card);
}
#buddypress div.pagination .page-numbers.current {
  background: var(--jim-accent); color: #fff;
  border-color: var(--jim-accent);
}

/* Meldungen */
#buddypress div#message,
#buddypress div.bp-feedback {
  border-radius: var(--jim-radius);
  padding: .9em 1.2em;
  border: 1px solid var(--jim-border);
  background: var(--jim-bg-elevated);
  color: var(--jim-text);
  margin: 1em 0;
}
#buddypress div#message.success,
#buddypress div#message.updated {
  background: rgba(81,207,102,0.12);
  border-color: rgba(81,207,102,0.4);
  color: #51cf66;
}
#buddypress div#message.error {
  background: rgba(255,107,107,0.12);
  border-color: rgba(255,107,107,0.4);
  color: #ff6b6b;
}

/* Mobile */
@media (max-width: 640px) {
  #buddypress #item-header { flex-direction: column; text-align: center; }
  #buddypress #item-header-avatar img.avatar { width: 80px; height: 80px; }
  #buddypress #item-header h1,
  #buddypress #item-header h2,
  #buddypress #item-header .user-nicename { font-size: 1.3rem; }
  #buddypress div.item-list-tabs ul,
  #buddypress #object-nav ul {
    overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin;
  }
  #buddypress div.item-list-tabs ul li,
  #buddypress #object-nav ul li { flex-shrink: 0; }
}
