/*
Theme Name: Uncode Child - BuddyPress Styles
Description: BuddyPress styling to match Uncode theme design
Version: 1.0.0
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 - Buttons & Links
2.0 - Forms & Inputs
3.0 - Navigation & Tabs
4.0 - Activity Stream
5.0 - Member & Group Lists
6.0 - Profile Headers
7.0 - Tables & Data Display
8.0 - Messages & Notifications
9.0 - Avatars & Images
10.0 - Misc Components
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 - Buttons & Links
--------------------------------------------------------------*/

/* Apply Uncode button styles to BuddyPress buttons */
#buddypress .button,
#buddypress input[type="submit"],
#buddypress input[type="reset"],
#buddypress input[type="button"],
#buddypress button,
#buddypress .generic-button a,
#buddypress .friendship-button a,
#buddypress .group-button a,
#buddypress .activity-meta a.button,
#buddypress .comment-reply-link,
#buddypress #aw-whats-new-submit,
#buddypress .dir-form .item-list-tabs button,
body.buddypress .buddypress-wrap .bp-navs ul li .count {
    display: inline-block;
    font-style: normal !important;
    text-align: center;
    vertical-align: middle;
    margin-top: 1px;
    margin-bottom: 1px;
    cursor: pointer;
    background-image: none;
    border-style: solid;
    border-radius: 2px;
    white-space: nowrap;
    -webkit-text-stroke: 0px;
    transition: color 200ms ease-in-out, background-color 200ms ease-in-out, border-color 200ms ease-in-out;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    padding: 10px 27px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: none;
}

body:not(.uncode-accessible) #buddypress .button,
body:not(.uncode-accessible) #buddypress input[type="submit"],
body:not(.uncode-accessible) #buddypress button {
    outline: 0;
}

/* Button hover states */
#buddypress .button:hover,
#buddypress input[type="submit"]:hover,
#buddypress button:hover,
#buddypress .generic-button a:hover,
#buddypress .friendship-button a:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* Disabled buttons */
#buddypress .button:disabled,
#buddypress input[type="submit"]:disabled,
#buddypress button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Small buttons */
#buddypress .button.small,
#buddypress .bp-secondary-action {
    padding: 7px 18px;
    font-size: 0.9em;
}

/* Link buttons */
#buddypress a.button.bp-secondary-action {
    background: transparent;
    border: 1px solid currentColor;
}

/*--------------------------------------------------------------
2.0 - Forms & Inputs
--------------------------------------------------------------*/

/* Text inputs, textareas, and selects */
#buddypress input[type="text"],
#buddypress input[type="email"],
#buddypress input[type="number"],
#buddypress input[type="url"],
#buddypress input[type="tel"],
#buddypress input[type="search"],
#buddypress input[type="password"],
#buddypress input[type="date"],
#buddypress textarea,
#buddypress select {
    display: block;
    line-height: initial;
    margin: 9px 0px 0px 0px;
    padding: 10px 15px;
    border-style: solid;
    border-radius: 2px;
    font-weight: normal;
    background-color: #fff;
    border: 1px solid #ddd;
    width: 100%;
    max-width: 100%;
    transition: border-color 200ms ease-in-out;
}

#buddypress input[type="text"]:focus,
#buddypress input[type="email"]:focus,
#buddypress input[type="password"]:focus,
#buddypress input[type="search"]:focus,
#buddypress textarea:focus,
#buddypress select:focus {
    border-style: solid;
    outline: 0;
}

/* Checkboxes and radio buttons */
#buddypress input[type="checkbox"],
#buddypress input[type="radio"] {
    box-sizing: content-box;
    display: inline-block;
    font-size: 1em;
    -webkit-appearance: none;
    margin: 0;
    position: relative;
    text-align: center;
    line-height: normal;
    min-height: 0 !important;
    width: 16px;
    height: 16px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: #fff;
    vertical-align: middle;
}

#buddypress input[type="radio"] {
    border-radius: 50%;
}

#buddypress input[type="checkbox"]:checked,
#buddypress input[type="radio"]:checked {
    background-color: currentColor;
}

/* Labels */
#buddypress label {
    display: inline-block;
    margin-bottom: 9px;
    font-weight: 500;
}

/* Form groups */
#buddypress .editfield,
#buddypress .standard-form label,
#buddypress .dir-search {
    margin-bottom: 18px;
}

/*--------------------------------------------------------------
3.0 - Navigation & Tabs
--------------------------------------------------------------*/

/* Main navigation */
body.buddypress .buddypress-wrap .bp-navs ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress .buddypress-wrap .bp-navs ul li {
    list-style: none;
    margin: 0;
}

body.buddypress .buddypress-wrap .bp-navs ul li a,
body.buddypress .buddypress-wrap .bp-navs ul li span {
    border: 0;
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    transition: background-color 200ms ease-in-out, color 200ms ease-in-out;
}

body.buddypress .buddypress-wrap .bp-navs ul li a:hover,
body.buddypress .buddypress-wrap .bp-navs ul li a:focus {
    text-decoration: none;
}

/* Active/Current nav items */
body.buddypress .buddypress-wrap .bp-navs li.selected a,
body.buddypress .buddypress-wrap .bp-navs li.current a {
    font-weight: 600;
    opacity: 1;
}

/* Nav counters/badges */
body.buddypress .buddypress-wrap .bp-navs ul li .count {
    border-radius: 50%;
    font-size: 11px;
    margin-left: 6px;
    padding: 3px 8px;
    text-align: center;
    vertical-align: middle;
    display: inline-block;
    min-width: 20px;
}

/* Tabs */
#buddypress .item-list-tabs {
    margin: 18px 0;
    border-bottom: 1px solid #ddd;
}

#buddypress .item-list-tabs ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#buddypress .item-list-tabs ul li {
    display: inline-block;
    margin: 0;
}

/*--------------------------------------------------------------
4.0 - Activity Stream
--------------------------------------------------------------*/

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

#buddypress .activity-list > li {
    padding: 27px;
    margin-bottom: 18px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
    background: #fff;
}

/* Activity header */
#buddypress .activity-header {
    font-size: 14px;
    margin-bottom: 13.5px;
    line-height: 1.6;
}

#buddypress .activity-header a {
    font-weight: 500;
    text-decoration: none;
}

/* Activity content */
#buddypress .activity-inner {
    font-size: 15px;
    line-height: 1.75;
    margin: 18px 0;
}

#buddypress .activity-inner p {
    margin: 0 0 13.5px;
}

/* Activity meta */
#buddypress .activity-meta {
    font-size: 13px;
    margin-top: 13.5px;
    padding-top: 13.5px;
    border-top: 1px solid #eaeaea;
}

#buddypress .activity-meta a {
    margin-right: 18px;
    text-decoration: none;
}

/* Activity comments */
#buddypress .activity-comments {
    margin: 18px 0 0;
    padding-left: 36px;
    border-left: 2px solid #eaeaea;
}

#buddypress .activity-comments ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#buddypress .activity-comments li {
    padding: 13.5px 0;
    border-bottom: 1px solid #f5f5f5;
}

/* What's new form */
#buddypress #whats-new-form {
    background: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 2px;
    padding: 27px;
    margin-bottom: 27px;
}

#buddypress #whats-new {
    width: 100%;
    min-height: 80px;
    padding: 13.5px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 15px;
    line-height: 1.6;
}

#buddypress #whats-new:focus {
    border-color: #999;
    outline: 0;
}

/*--------------------------------------------------------------
5.0 - Member & Group Lists
--------------------------------------------------------------*/

/* List items */
#buddypress .item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#buddypress .item-list > li {
    padding: 18px;
    margin-bottom: 13.5px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
    background: #fff;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

/* Item avatar */
#buddypress .item-avatar {
    flex-shrink: 0;
}

#buddypress .item-avatar img {
    border-radius: 2px;
    max-width: 100%;
    height: auto;
}

/* Item content */
#buddypress .item {
    flex: 1;
}

#buddypress .item-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 9px;
    line-height: 1.4;
}

#buddypress .item-title a {
    text-decoration: none;
}

#buddypress .item-meta {
    font-size: 13px;
    margin: 9px 0;
    line-height: 1.6;
}

#buddypress .item-desc {
    font-size: 14px;
    margin: 9px 0;
    line-height: 1.6;
}

/* Item actions */
#buddypress .action {
    margin-top: 13.5px;
}

#buddypress .action > * {
    margin-right: 9px;
}

/*--------------------------------------------------------------
6.0 - Profile Headers
--------------------------------------------------------------*/

/* Item header */
#buddypress #item-header {
    margin-bottom: 36px;
}

#buddypress #item-header-content {
    display: flex;
    align-items: flex-start;
    gap: 27px;
    padding: 27px;
    background: #f9f9f9;
    border-radius: 2px;
}

#buddypress #item-header-avatar {
    flex-shrink: 0;
}

#buddypress #item-header-avatar img {
    border-radius: 2px;
    max-width: 100%;
    height: auto;
}

/* Cover image */
#buddypress #header-cover-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    margin-bottom: 27px;
}

/* User meta */
#buddypress .user-nicename,
#buddypress .item-meta {
    font-size: 14px;
    line-height: 1.6;
}

/*--------------------------------------------------------------
7.0 - Tables & Data Display
--------------------------------------------------------------*/

/* Profile fields tables */
#buddypress table.profile-fields {
    width: 100%;
    border: 1px solid #eaeaea;
    border-radius: 2px;
    margin: 18px 0;
}

#buddypress table.profile-fields th,
#buddypress table.profile-fields td {
    padding: 13.5px 18px;
    border-bottom: 1px solid #eaeaea;
    text-align: left;
}

#buddypress table.profile-fields th {
    font-weight: 600;
    font-size: 14px;
    width: 30%;
    background: #f9f9f9;
}

#buddypress table.profile-fields td {
    font-size: 14px;
}

#buddypress table.profile-fields tr:last-child th,
#buddypress table.profile-fields tr:last-child td {
    border-bottom: none;
}

/* Generic BP tables */
#buddypress table {
    width: 100%;
    border-collapse: collapse;
}

#buddypress table th {
    font-weight: 600;
    text-align: left;
}

/*--------------------------------------------------------------
8.0 - Messages & Notifications
--------------------------------------------------------------*/

/* Message threads */
#buddypress .message-thread {
    padding: 18px;
    margin-bottom: 13.5px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
    background: #fff;
}

#buddypress .message-thread:hover {
    border-color: #ccc;
}

#buddypress .thread-subject {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 9px;
}

#buddypress .thread-excerpt {
    font-size: 14px;
    margin: 9px 0;
    line-height: 1.6;
}

#buddypress .thread-date {
    font-size: 13px;
}

/* Notifications */
#buddypress .notification-item {
    padding: 13.5px 18px;
    margin-bottom: 9px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
    background: #fff;
}

#buddypress .notification-item.unread {
    background: #f9f9f9;
    border-left: 3px solid currentColor;
}

/* Info/Error messages */
#buddypress #message.info,
#buddypress #message.updated,
#buddypress .bp-feedback {
    padding: 13.5px 18px;
    margin: 18px 0;
    border-radius: 2px;
    border-left: 3px solid;
}

#buddypress #message.error,
#buddypress .bp-feedback.error {
    background: #fef7f7;
    border-color: #d63638;
    color: #d63638;
}

#buddypress #message.info,
#buddypress #message.updated,
#buddypress .bp-feedback.success {
    background: #f0f7ff;
    border-color: #0073aa;
    color: #0073aa;
}

/*--------------------------------------------------------------
9.0 - Avatars & Images
--------------------------------------------------------------*/

/* Avatar styling */
#buddypress .avatar {
    border-radius: 2px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Avatar upload form */
#buddypress #avatar-upload-form,
#buddypress #cover-image-upload-form {
    background: #f9f9f9;
    padding: 27px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
}

/*--------------------------------------------------------------
10.0 - Misc Components
--------------------------------------------------------------*/

/* Pagination */
#buddypress .pagination {
    margin: 27px 0;
}

#buddypress .pagination-links {
    display: flex;
    gap: 9px;
    justify-content: center;
    align-items: center;
}

#buddypress .pagination-links span,
#buddypress .pagination-links a {
    display: inline-block;
    padding: 9px 13.5px;
    border: 1px solid #ddd;
    border-radius: 2px;
    text-decoration: none;
    min-width: 40px;
    text-align: center;
    transition: all 200ms ease-in-out;
}

#buddypress .pagination-links a:hover {
    border-color: #999;
}

#buddypress .pagination-links span.current {
    font-weight: 600;
    border-color: #999;
}

/* Loading indicators */
#buddypress .loading {
    padding: 27px;
    text-align: center;
    font-style: italic;
}

/* BP Widgets */
#buddypress .widget {
    margin-bottom: 27px;
}

#buddypress .widget-title,
#buddypress .widgettitle {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Group creation/management steps */
#buddypress #group-create-body,
#buddypress #group-settings-form {
    background: #fff;
    padding: 27px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
}

/* Search forms */
#buddypress .dir-search {
    margin-bottom: 27px;
}

#buddypress .dir-search input[type="search"],
#buddypress .dir-search input[type="text"] {
    width: 100%;
    max-width: 100%;
}

/* Directory filters */
#buddypress .item-list-tabs#subnav {
    margin-bottom: 27px;
}

/* BP Icons (if using icon fonts) */
#buddypress .bp-icon:before {
    font-family: dashicons;
    font-size: 20px;
    line-height: 1;
    vertical-align: middle;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    #buddypress #item-header-content {
        flex-direction: column;
    }

    #buddypress .item-list > li {
        flex-direction: column;
    }

    #buddypress .activity-comments {
        padding-left: 18px;
    }
}

/* Ensure proper spacing */
#buddypress .bp-wrap {
    margin-top: 27px;
}

/* Fix z-index issues */
#buddypress .bp-suggestions {
    z-index: 9999;
}

/* Accessibility improvements */
#buddypress a:focus,
#buddypress button:focus,
#buddypress input:focus,
#buddypress textarea:focus {
    outline: 2px solid;
    outline-offset: 2px;
}

body.uncode-accessible #buddypress a:focus,
body.uncode-accessible #buddypress button:focus {
    outline: 2px solid currentColor;
}
