/* Buddypress Styles */

/* ==========================================================================
   MOBILE-FIRST BUDDYPRESS CSS FRAMEWORK
   ========================================================================== */

/* Reset and Base Styles */
#buddypress {
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1.5;
}

#buddypress *,
#buddypress *::before,
#buddypress *::after {
  box-sizing: inherit;
}

/* ==========================================================================
   MOBILE LAYOUT (Default - Mobile First)
   ========================================================================== */

/* Activity Stream */
#buddypress .activity-list {
  padding: 0;
  margin: 0;
}

#buddypress .activity-list li {
  padding: 15px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}

#buddypress .activity-avatar {
  float: left;
  margin-right: 10px;
  width: 40px;
}

#buddypress .activity-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

#buddypress .activity-content {
  margin-left: 50px;
  overflow: hidden;
}

/* Member Directory */
#buddypress #members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#buddypress #members-list li {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 8px;
}

#buddypress .member-avatar {
  flex-shrink: 0;
  margin-right: 15px;
}

#buddypress .member-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

#buddypress .member-content {
  flex: 1;
  min-width: 0; /* Prevents overflow */
}

#buddypress .member-name {
  font-weight: bold;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Groups */
#buddypress #groups-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#buddypress #groups-list li {
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 8px;
}

#buddypress .group-avatar {
  float: left;
  margin-right: 15px;
  width: 50px;
}

#buddypress .group-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

#buddypress .group-content {
  margin-left: 65px;
  overflow: hidden;
}

/* Navigation */
#buddypress .bp-navs {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#buddypress .bp-navs::-webkit-scrollbar {
  display: none;
}

#buddypress .bp-navs ul {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
}

#buddypress .bp-navs li {
  flex-shrink: 0;
  margin-right: 10px;
}

#buddypress .bp-navs a {
  display: block;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
}

#buddypress .bp-navs .current a,
#buddypress .bp-navs .selected a {
  background: #007cba;
  color: white;
}

/* Forms */
#buddypress .standard-form {
  padding: 0;
}

#buddypress .standard-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

#buddypress .standard-form input[type="text"],
#buddypress .standard-form input[type="email"],
#buddypress .standard-form input[type="password"],
#buddypress .standard-form textarea,
#buddypress .standard-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px; /* Prevents zoom on iOS */
  margin-bottom: 15px;
}

#buddypress .standard-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
#buddypress .button,
#buddypress input[type="submit"],
#buddypress input[type="button"] {
  display: inline-block;
  padding: 12px 20px;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 44px; /* Touch target size */
  min-width: 44px;
}

#buddypress .button:hover {
  background: #005a87;
}

/* Messages */
#buddypress .messages {
  padding: 0;
}

#buddypress .message-thread {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

#buddypress .message-avatar {
  float: left;
  margin-right: 10px;
  width: 40px;
}

#buddypress .message-content {
  margin-left: 50px;
  overflow: hidden;
}

/* Profile */
#buddypress .avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

#buddypress .profile-fields {
  padding: 0;
}

#buddypress .profile-field {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

#buddypress .profile-field:last-child {
  border-bottom: none;
}

/* ==========================================================================
   TABLET BREAKPOINT (768px and up)
   ========================================================================== */
@media (min-width: 768px) {
  #buddypress .activity-avatar {
    width: 50px;
  }
  
  #buddypress .activity-avatar img {
    width: 50px;
    height: 50px;
  }
  
  #buddypress .activity-content {
    margin-left: 60px;
  }
  
  #buddypress #members-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  #buddypress #groups-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* ==========================================================================
   DESKTOP BREAKPOINT (1024px and up)
   ========================================================================== */
@media (min-width: 1024px) {
  #buddypress #members-list {
    grid-template-columns: repeat(3, 1fr);
  }
  
  #buddypress #groups-list {
    grid-template-columns: repeat(3, 1fr);
  }
  
  #buddypress .activity-avatar {
    width: 60px;
  }
  
  #buddypress .activity-avatar img {
    width: 60px;
    height: 60px;
  }
  
  #buddypress .activity-content {
    margin-left: 70px;
  }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

/* Hide elements on mobile */
@media (max-width: 767px) {
  .bp-hide-mobile {
    display: none !important;
  }
}

/* Show only on mobile */
@media (min-width: 768px) {
  .bp-mobile-only {
    display: none !important;
  }
}

/* Touch-friendly spacing */
.bp-touch-target {
  min-height: 44px;
  min-width: 44px;
  padding: 10px;
}

/* Loading states */
.bp-loading {
  opacity: 0.6;
  pointer-events: none;
}