/**
 * BP Profile Customizer Styles
 * Version: 1.0.0
 */

/* Profile Layout */
.bppc-profile-wrapper {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    gap: 20px;
    max-width: 1020px;
    margin: 0 auto;
    padding: 20px;
}

.bppc-profile-sidebar {
    width: 300px;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    order: -1;
}

.bppc-profile-main,
.bppc-main-widget-area {
    width: 685px;
    -webkit-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}

/* Widgets */
.bppc-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.bppc-widget-header {
    background: linear-gradient(135deg, var(--bppc-primary, #4a90d9), var(--bppc-secondary, #7c5cc4));
    color: #fff;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bppc-widget-content {
    padding: 20px;
}

/* User Card */
.bppc-user-card {
    text-align: center;
    padding: 30px 20px;
}

.bppc-user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--bppc-primary, #4a90d9);
    margin: 0 auto 15px;
    overflow: hidden;
}

.bppc-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bppc-user-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.bppc-user-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #2e7d32;
}

.bppc-user-status.offline {
    background: #ffebee;
    color: #c62828;
}

.bppc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.bppc-user-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.bppc-stat-item {
    text-align: center;
}

.bppc-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--bppc-primary, #4a90d9);
}

.bppc-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

/* User Card Actions - Send Message Button */
.bppc-user-card-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.bppc-send-message-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bppc-primary, #4a90d9), var(--bppc-secondary, #7c5cc4));
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.3);
}

.bppc-send-message-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 217, 0.4);
    color: #fff !important;
}

.bppc-send-message-btn svg {
    flex-shrink: 0;
}

/* Points Balance */
.bppc-points-balance {
    background: linear-gradient(135deg, var(--bppc-primary, #4a90d9), var(--bppc-secondary, #7c5cc4));
    color: #fff;
    padding: 25px 20px;
    text-align: center;
}

.bppc-points-label {
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 5px;
}

.bppc-points-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.bppc-points-suffix {
    font-size: 14px;
    opacity: 0.8;
    margin-left: 5px;
}

/* Badges */
.bppc-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.bppc-badge-item {
    position: relative;
    text-align: center;
}

.bppc-badge-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.bppc-badge-level {
    display: none !important; /* HIDDEN - no level overlay */
}

/* Social Links */
.bppc-social-links {
    margin-top: 15px;
}

.bppc-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bppc-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.2s;
}

.bppc-social-link:hover {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
}

.bppc-social-icon {
    font-size: 16px;
}

/* Social Links Editor */
.bppc-social-editor {
    margin-top: 15px;
}

.bppc-social-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bppc-social-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bppc-social-field label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bppc-social-field input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.bppc-social-field input:focus {
    outline: none;
    border-color: var(--bppc-primary, #4a90d9);
}

.bppc-save-social-btn {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.bppc-save-social-btn:hover {
    background: var(--bppc-secondary, #7c5cc4);
}

.bppc-social-status {
    font-size: 13px;
    color: #2e7d32;
    margin-left: 10px;
}

/* Friends Widget */
.bppc-friends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.bppc-friend-item {
    text-align: center;
}

.bppc-friend-link {
    text-decoration: none;
    color: inherit;
}

.bppc-friend-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

.bppc-friend-avatar-wrap img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.bppc-friend-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #c62828;
}

.bppc-friend-status.online {
    background: #2e7d32;
}

.bppc-friend-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-friend-badges {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 5px;
}

.bppc-friend-badge-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.bppc-view-all {
    text-align: center;
    margin: 15px 0 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.bppc-view-all a {
    color: var(--bppc-primary, #4a90d9);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.bppc-no-friends,
.bppc-no-photos,
.bppc-no-badges {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

/* About Widget */
.bppc-about-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.bppc-about-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.bppc-about-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.bppc-about-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.bppc-about-icon {
    flex-shrink: 0;
}

.bppc-about-label {
    font-weight: 600;
    color: #555;
    min-width: 100px;
}

.bppc-about-value,
.bppc-about-item a {
    color: #333;
}

.bppc-about-item a {
    text-decoration: none;
}

.bppc-about-item a:hover {
    color: var(--bppc-primary, #4a90d9);
}

.bppc-bio p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Photo Gallery Widget */
.bppc-gallery-upload {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.bppc-upload-btn {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.bppc-upload-btn:hover {
    background: var(--bppc-secondary, #7c5cc4);
}

.bppc-upload-info {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 8px;
}

.bppc-gallery-grid {
    display: grid;
    gap: 10px;
}

.bppc-gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
}

.bppc-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.bppc-gallery-item:hover img {
    transform: scale(1.05);
}

.bppc-delete-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.bppc-gallery-item:hover .bppc-delete-photo {
    opacity: 1;
}

/* Profile Settings Widget */
.bppc-settings-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-settings-item {
    border-bottom: 1px solid #f0f0f0;
}

.bppc-settings-item:last-child {
    border-bottom: none;
}

.bppc-settings-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: color 0.2s;
}

.bppc-settings-item a:hover {
    color: var(--bppc-primary, #4a90d9);
}

.bppc-settings-icon {
    font-size: 18px;
}

.bppc-settings-label {
    font-weight: 500;
}

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

.bppc-activity-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bppc-activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bppc-activity-item:first-child {
    padding-top: 0;
}

.bppc-activity-avatar {
    flex-shrink: 0;
}

.bppc-activity-avatar img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
}

.bppc-activity-content {
    flex-grow: 1;
    min-width: 0;
}

.bppc-activity-header {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.bppc-activity-header a {
    font-weight: 600;
    color: var(--bppc-primary, #4a90d9);
    text-decoration: none;
}

.bppc-activity-text {
    font-size: 14px;
    color: #555;
    margin-top: 8px;
    line-height: 1.5;
}

.bppc-activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
    line-height: 1.2;
}

.bppc-activity-time {
    line-height: 1.2;
}

.bppc-activity-reactions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.bppc-like-btn,
.bppc-dislike-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
}

.bppc-like-btn:hover,
.bppc-like-btn.active {
    border-color: var(--bppc-like-color, #4a90d9);
    color: var(--bppc-like-color, #4a90d9);
    background: rgba(74, 144, 217, 0.1);
}

.bppc-dislike-btn:hover,
.bppc-dislike-btn.active {
    border-color: var(--bppc-dislike-color, #dc3545);
    color: var(--bppc-dislike-color, #dc3545);
    background: rgba(220, 53, 69, 0.1);
}

.bppc-like-btn svg,
.bppc-dislike-btn svg {
    width: 14px;
    height: 14px;
}

/* No Activity */
.bppc-no-activity {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

/* BuddyPress Home Page - Force 2 columns for collection items */
.bp-user ul.g1-collection-items,
ul.g1-collection-items {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    list-style: none !important;
}

.bp-user ul.g1-collection-items li.g1-collection-item,
ul.g1-collection-items li.g1-collection-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Constrain all images and content inside collection items */
.bp-user ul.g1-collection-items li.g1-collection-item *,
ul.g1-collection-items li.g1-collection-item * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Widget thumbnails - 44x44 for BPPC friends widget, activity wall ONLY */
.bppc-friend-avatar img,
.bppc-widget .bppc-friend-avatar img,
.bppc-activity-avatar img {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Collection item images - responsive but constrained */
/* EXCLUDE: ARS widgets, badge containers (.bimber-badges-image, .bimber-badges-badge) */
.bp-user ul.g1-collection-items li.g1-collection-item:not(.bimber-badges-badge-single-level) .entry-media img:not(.mycred-badge-image),
.bp-user ul.g1-collection-items li.g1-collection-item:not(.bimber-badges-badge-single-level) .entry-thumbnail img:not(.mycred-badge-image),
.bp-user ul.g1-collection-items li.g1-collection-item:not(.bimber-badges-badge-single-level) figure:not(.bimber-badges-image) img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 180px !important;
    object-fit: cover !important;
}

/* Constrain entry media containers - but NOT badge containers */
.bp-user .g1-collection-item .entry-media:not(.bimber-badges-image),
.bp-user .g1-collection-item .entry-thumbnail:not(.bimber-badges-image) {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Ensure parent container constrains the grid */
.bp-user #item-body,
.bp-user .item-body,
.bp-user #buddypress,
.bp-user .buddypress-wrap {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* MyCred/Bimber badges on badge page - theme expects these to be properly sized */
/* The theme uses .bimber-badges-image with max-width/max-height constraints */
.bp-user .bimber-badges-shortcode .bimber-badges-image,
.bimber-badges-shortcode .bimber-badges-image {
    text-align: center !important;
}

.bp-user .bimber-badges-shortcode .bimber-badges-image img,
.bimber-badges-shortcode .bimber-badges-image img,
.bp-user .bimber-badges-badge .bimber-badges-image img,
.bimber-badges-badge .bimber-badges-image img {
    /* Theme expects badges to scale within container, max 100px typical */
    width: auto !important;
    height: auto !important;
    max-width: 100px !important;
    max-height: 100px !important;
    border-radius: initial !important;
    object-fit: contain !important;
}

/* MyCred profile header badges */
#mycred-users-badges .mycred-badge-image,
.bp-user #mycred-users-badges img {
    border-radius: initial !important;
}

/* Small inline badges (like in friends widget) should stay small */
.bppc-friend-badge-img {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
}

/* ARS Widget exclusions - let ARS widgets use their own theme sizing */
.bp-user .ars-widget img,
.bp-user .ars-widget-theme1-trending img,
.bp-user .ars-theme1-thumb,
.bp-user .ars-widget .ars-theme1-thumb,
.ars-widget img,
.ars-widget-theme1-trending img,
.ars-theme1-thumb {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
}

/* ARS Widget Theme 1/2 thumbnail wrapper - use 140px height as defined by ARS */
.bp-user .ars-theme1-thumb-wrap,
.bp-user .ars-widget .ars-theme1-thumb-wrap,
.ars-theme1-thumb-wrap {
    height: 140px !important;
    overflow: hidden !important;
}

.bp-user .ars-theme1-thumb,
.bp-user .ars-widget .ars-theme1-thumb,
.ars-theme1-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* ARS Default theme widget items - 44px thumbnails */
.bp-user .ars-widget-item img:not(.ars-theme1-thumb),
.ars-widget-item img:not(.ars-theme1-thumb) {
    width: 44px !important;
    height: 44px !important;
    border-radius: 4px !important;
    object-fit: cover !important;
}

/* MyCred badges list container */
.bp-user .mycred-badges-list,
.bp-user .mycred-user-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    max-width: 100% !important;
}

/* Hide Reviews nav item from BuddyPress profile - COMPREHENSIVE */
#buddypress nav.main-navs ul li#user-reviews,
#buddypress .bp-navs li#user-reviews,
.bp-navs.bp-subnavs li#reviews-subnav,
nav.bp-navs ul li#reviews-personal-li,
nav.bp-navs.user-main-nav ul li a[href*="/reviews"],
nav.bp-navs.user-main-nav ul li a[href*="/reviews/"],
#buddypress nav ul li a[href$="/reviews/"],
#buddypress nav ul li a[href$="/reviews"],
.bp-navs ul li a[href*="/reviews"],
li.bp-personal-sub-tab a[href*="/reviews"],
#object-nav li a[href*="/reviews"],
/* Parent LI elements containing reviews links */
nav.bp-navs ul li:has(a[href*="/reviews"]),
.bp-navs.main-navs ul li:has(a[href*="/reviews"]),
#buddypress nav ul li:has(a[href*="/reviews"]),
/* Direct class targeting */
li#reviews-personal-li,
li.reviews-nav,
/* Text-based targeting for nav items */
nav.bp-navs ul li a span:contains("Reviews"),
.bp-user nav ul li a[href*="reviews"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Hide Reviews page content area too */
.bp-user.reviews #item-body,
body.bp-user.reviews article#post-0,
.bp-user.reviews .bp-wrap {
    display: none !important;
}

/* Friends Page - SugarCayne List Style Layout */
/* Override grid to display as full-width list rows */
.bp-user.friends ul#members-list,
.bp-user.friends ul.members-friends-list,
.bp-user.friends ul.item-list.bp-list,
.bp-user.friends .members.friends ul#members-list,
body.bp-user.friends ul#members-list,
.bp-user.friends ul#members-list.grid,
.bp-user.friends ul#members-list.grid.four,
.bp-user.friends ul#members-list.grid.three {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Each friend row - list style like SugarCayne */
.bp-user.friends ul#members-list > li,
.bp-user.friends ul.members-friends-list > li,
.bp-user.friends ul#members-list li.item-entry,
.bp-user.friends .members.friends ul#members-list li,
body.bp-user.friends ul#members-list li,
.bp-user.friends ul#members-list.grid > li,
.bp-user.friends ul#members-list.grid.four > li.item-entry {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 15px 20px !important;
    float: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    border-bottom: 1px solid #eee !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.bp-user.friends ul#members-list > li:last-child,
.bp-user.friends ul#members-list.grid > li:last-child {
    border-bottom: none !important;
}

/* Hide the .list-wrap container to restructure */
.bp-user.friends ul#members-list li .list-wrap,
.bp-user.friends ul#members-list li .list-wrap.csstodo-bp-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Friend avatar - round, fixed size */
.bp-user.friends ul#members-list li .item-avatar,
.bp-user.friends ul#members-list li .member-avatar {
    flex-shrink: 0 !important;
    width: 50px !important;
    height: 50px !important;
    margin: 0 !important;
    position: relative !important;
}

.bp-user.friends ul#members-list li .item-avatar img,
.bp-user.friends ul#members-list li .member-avatar img,
.bp-user.friends ul#members-list li .item-avatar a img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Hide rank badge overlay on avatar */
.bp-user.friends ul#members-list li .item-avatar img.author-info-rank {
    display: none !important;
}

/* Friend info section */
.bp-user.friends ul#members-list li .item,
.bp-user.friends ul#members-list li .item-block,
.bp-user.friends ul#members-list li .member-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Item header - contains name and last activity */
.bp-user.friends ul#members-list li .item-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Friend name styling */
.bp-user.friends ul#members-list li .item-title,
.bp-user.friends ul#members-list li .item-title a,
.bp-user.friends ul#members-list li .list-title,
.bp-user.friends ul#members-list li .list-title a,
.bp-user.friends ul#members-list li h2.list-title,
.bp-user.friends ul#members-list li h2.list-title.member-name,
.bp-user.friends ul#members-list li h2.list-title.member-name a {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.bp-user.friends ul#members-list li .item-title a:hover,
.bp-user.friends ul#members-list li .list-title a:hover,
.bp-user.friends ul#members-list li h2.list-title.member-name a:hover {
    color: var(--bppc-primary, #4a90d9) !important;
}

/* Last active time - below name, uppercase like SugarCayne */
.bp-user.friends ul#members-list li .item-meta,
.bp-user.friends ul#members-list li .activity,
.bp-user.friends ul#members-list li .last-activity,
.bp-user.friends ul#members-list li p.item-meta.last-activity,
.bp-user.friends ul#members-list li span.activity {
    font-size: 12px !important;
    color: #888 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 600 !important;
}

/* Hide extra elements for clean list view */
.bp-user.friends ul#members-list li .action,
.bp-user.friends ul#members-list li .item-action,
.bp-user.friends ul#members-list li .member-latest-activity,
.bp-user.friends ul#members-list li .generic-button,
.bp-user.friends ul#members-list li .user-update,
.bp-user.friends ul#members-list li .item-desc,
.bp-user.friends ul#members-list li .followers-count,
.bp-user.friends ul#members-list li .g1-members-item-details {
    display: none !important;
}

/* ====== FULL WIDTH LAYOUTS FOR SPECIFIC PAGES ====== */
/* Ensure Friends, Notifications, Messages, and Profile Edit pages use full width */

/* Friends page - full width content */
.bp-user.friends #item-body,
.bp-user.friends .bp-wrap,
.bp-user.friends #buddypress {
    width: 100% !important;
    max-width: 100% !important;
}

.bp-user.friends .members.friends {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px !important;
}

/* Notifications page - full width */
.bp-user.notifications #item-body,
.bp-user.notifications .bp-wrap,
.bp-user.notifications #buddypress,
.bp-user.notifications .notifications {
    width: 100% !important;
    max-width: 100% !important;
}

/* Messages page - full width */
.bp-user.messages #item-body,
.bp-user.messages .bp-wrap,
.bp-user.messages #buddypress,
.bp-user.messages .messages {
    width: 100% !important;
    max-width: 100% !important;
}

/* ====== MESSAGES PAGE - MINIMAL MODERN STYLING ====== */

/* Messages container subtle enhancements */
.bp-user.messages #message-threads {
    border-radius: 8px;
    overflow: hidden;
}

.bp-user.messages .thread-item,
.bp-user.messages #message-threads li {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.bp-user.messages .thread-item:hover,
.bp-user.messages #message-threads li:hover {
    background: #f8f9fa;
}

/* Avatar styling */
.bp-user.messages .thread-avatar img {
    border-radius: 50%;
}

/* Compose button enhancement */
.bp-user.messages #compose-personal-li a,
.bp-user.messages a.compose-message {
    display: inline-block;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.bp-user.messages #compose-personal-li a:hover,
.bp-user.messages a.compose-message:hover {
    background: var(--bppc-secondary, #357abd);
}

/* Reply form */
.bp-user.messages #send-reply textarea {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #ddd;
}

.bp-user.messages #send-reply input[type="submit"] {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 10px;
}

/* ====== CUSTOM INBOX PAGE - MODERN MESSAGING UI ====== */

.bppc-inbox-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.bppc-inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.bppc-inbox-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.bppc-inbox-compose-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.bppc-inbox-compose-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-1px);
    color: #fff;
}

.bppc-inbox-compose-btn svg {
    flex-shrink: 0;
}

.bppc-inbox-empty {
    text-align: center;
    padding: 60px 20px;
}

.bppc-inbox-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.bppc-inbox-empty h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.bppc-inbox-empty p {
    margin: 0;
    color: #888;
    font-size: 15px;
}

.bppc-inbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-inbox-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.bppc-inbox-item:last-child {
    border-bottom: none;
}

.bppc-inbox-item:hover {
    background: #f8fafc;
}

.bppc-inbox-item.unread {
    background: linear-gradient(90deg, rgba(102,126,234,0.08) 0%, rgba(255,255,255,0) 100%);
}

.bppc-inbox-item.unread:hover {
    background: linear-gradient(90deg, rgba(102,126,234,0.12) 0%, #f8fafc 100%);
}

.bppc-inbox-link {
    display: flex;
    gap: 16px;
    padding: 18px 28px;
    text-decoration: none;
    color: inherit;
}

.bppc-inbox-avatar {
    position: relative;
    flex-shrink: 0;
}

.bppc-inbox-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bppc-inbox-unread-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #fff;
    border-radius: 50%;
}

.bppc-inbox-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bppc-inbox-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.bppc-inbox-sender {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a2e;
}

.bppc-inbox-item.unread .bppc-inbox-sender {
    font-weight: 700;
    color: #667eea;
}

.bppc-inbox-date {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.bppc-inbox-subject {
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-inbox-item.unread .bppc-inbox-subject {
    font-weight: 600;
    color: #333;
}

.bppc-inbox-preview {
    font-size: 13px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-inbox-footer {
    text-align: center;
    padding: 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.bppc-inbox-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.bppc-inbox-footer a:hover {
    color: #764ba2;
}

/* Inbox page - ensure full width */
.bp-user.inbox #item-body,
.bp-user.inbox .bp-wrap,
.bp-user.inbox #buddypress {
    width: 100% !important;
    max-width: 100% !important;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .bppc-inbox-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    .bppc-inbox-header {
        padding: 18px 20px;
    }
    
    .bppc-inbox-header h2 {
        font-size: 20px;
    }
    
    .bppc-inbox-compose-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .bppc-inbox-link {
        padding: 14px 20px;
        gap: 12px;
    }
    
    .bppc-inbox-avatar img {
        width: 44px;
        height: 44px;
    }
    
    .bppc-inbox-sender {
        font-size: 14px;
    }
    
    .bppc-inbox-subject {
        font-size: 13px;
    }
    
    .bppc-inbox-preview {
        font-size: 12px;
    }
}

/* Badges page - full width */
.bp-user.badges #item-body,
.bp-user.badges .bp-wrap,
.bp-user.badges #buddypress {
    width: 100% !important;
    max-width: 100% !important;
}

/* Profile Edit page - full width */
.bp-user.profile.edit #item-body,
.bp-user.profile.edit .bp-wrap,
.bp-user.profile.edit #buddypress,
.bp-user.profile.public #item-body,
.bp-user.profile.public .bp-wrap,
.bp-user.profile.public #buddypress,
.bp-user.settings #item-body,
.bp-user.settings .bp-wrap,
.bp-user.settings #buddypress {
    width: 100% !important;
    max-width: 100% !important;
}

/* Profile edit form styling */
.bp-user.profile .profile-fields,
.bp-user.profile .editfield,
.bp-user.profile .editfield input[type="text"],
.bp-user.profile .editfield textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Social Links Section in Profile Edit */
.bppc-social-links-section {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.bppc-social-links-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.bppc-social-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.bppc-social-edit-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bppc-social-edit-item label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.bppc-social-edit-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bppc-social-edit-item input:focus {
    border-color: var(--bppc-primary, #4a90d9);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

@media (max-width: 768px) {
    .bppc-social-edit-grid {
        grid-template-columns: 1fr;
    }
}

/* Messages Widget */
.bppc-messages-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-message-item {
    border-bottom: 1px solid #eee;
}

.bppc-message-item:last-child {
    border-bottom: none;
}

.bppc-message-item.unread {
    background: #f0f7ff;
}

.bppc-message-link {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

.bppc-message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.bppc-message-content {
    flex: 1;
    min-width: 0;
}

.bppc-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.bppc-message-sender {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.bppc-message-badge {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.bppc-message-subject {
    font-size: 13px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-message-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Notifications Widget */
.bppc-notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-notification-item {
    border-bottom: 1px solid #eee;
}

.bppc-notification-item:last-child {
    border-bottom: none;
}

.bppc-notification-item.unread {
    background: #f0f7ff;
}

.bppc-notification-link {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

.bppc-notification-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
}

.bppc-notification-item.unread .bppc-notification-icon {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
}

.bppc-notification-content {
    flex: 1;
    min-width: 0;
}

.bppc-notification-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.bppc-notification-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* My Likes/Dislikes Widget */
.bppc-votes-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-vote-item {
    border-bottom: 1px solid #eee;
}

.bppc-vote-item:last-child {
    border-bottom: none;
}

.bppc-vote-link {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

.bppc-vote-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.bppc-vote-like .bppc-vote-icon {
    background: #e3f2fd;
}

.bppc-vote-dislike .bppc-vote-icon {
    background: #ffebee;
}

.bppc-vote-content {
    flex: 1;
    min-width: 0;
}

.bppc-vote-header {
    margin-bottom: 4px;
}

.bppc-vote-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
}

.bppc-vote-type.like {
    background: #e3f2fd;
    color: #1976d2;
}

.bppc-vote-type.dislike {
    background: #ffebee;
    color: #c62828;
}

.bppc-vote-comment {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-vote-meta {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.bppc-vote-author {
    font-weight: 500;
}

/* Shared Widget Styles */
.bppc-no-items {
    text-align: center;
    color: #888;
    font-size: 13px;
    padding: 20px 0;
}

.bppc-view-all {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

.bppc-view-all a {
    color: var(--bppc-primary, #4a90d9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.bppc-view-all a:hover {
    text-decoration: underline;
}

/* Messages Widget Date */
.bppc-message-date {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Harsh Reviews Widget */
.bppc-harsh-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-harsh-item {
    border-bottom: 1px solid #eee;
}

.bppc-harsh-item:last-child {
    border-bottom: none;
}

.bppc-harsh-link {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.bppc-harsh-rating {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.bppc-harsh-content {
    flex: 1;
    min-width: 0;
}

.bppc-harsh-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-harsh-date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Top Rated Reviews Widget */
.bppc-top-reviews-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-top-review-item {
    border-bottom: 1px solid #eee;
}

.bppc-top-review-item:last-child {
    border-bottom: none;
}

.bppc-top-review-link {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.bppc-top-review-rating {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.bppc-top-review-content {
    flex: 1;
    min-width: 0;
}

.bppc-top-review-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-top-review-date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Latest Ratings Widget */
.bppc-latest-ratings-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-latest-rating-item {
    border-bottom: 1px solid #eee;
}

.bppc-latest-rating-item:last-child {
    border-bottom: none;
}

.bppc-latest-rating-link {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.bppc-latest-rating-badge {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.bppc-latest-rating-content {
    flex: 1;
    min-width: 0;
}

.bppc-latest-rating-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bppc-latest-rating-date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Activity Widget Condensed */
.bppc-activity-condensed {
    padding: 10px 0 !important;
}

.bppc-activity-condensed .bppc-activity-content {
    line-height: 1.3;
}

.bppc-activity-condensed .bppc-activity-header {
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.bppc-activity-condensed .bppc-activity-text {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.bppc-activity-condensed .bppc-activity-meta {
    margin-top: 4px;
}

.bppc-activity-condensed .bppc-activity-time {
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    .bppc-profile-wrapper {
        flex-direction: column;
        padding: 15px;
    }
    
    .bppc-profile-sidebar,
    .bppc-profile-main,
    .bppc-main-widget-area {
        width: 100%;
    }
    
    .bppc-profile-sidebar {
        order: 0;
    }
    
    .bppc-user-stats {
        gap: 20px;
    }
    
    .bppc-stat-value {
        font-size: 20px;
    }
    
    .bppc-points-value {
        font-size: 36px;
    }
    
    .bppc-badges-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .bppc-friends-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Keep 2 columns on mobile too, or 1 column on very small screens */
    .bp-user ul.g1-collection-items,
    ul.g1-collection-items {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    
    .bppc-messenger-popup {
        width: 95vw;
        max-height: 90vh;
    }
    
    .bppc-message-btn-header {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Hide ARS Comment thumbs on mobile */
    .ars-comment-reactions,
    .ars-like-btn,
    .ars-dislike-btn,
    .ars-comment-like-btn,
    .ars-comment-dislike-btn {
        display: none !important;
    }
}

/* Friends List - SugarCayne style */
.bppc-friends-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-friends-list .bppc-friend-item {
    border-bottom: 1px solid #eee;
}

.bppc-friends-list .bppc-friend-item:last-child {
    border-bottom: none;
}

.bppc-friends-list .bppc-friend-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

.bppc-friends-list .bppc-friend-avatar {
    position: relative;
    flex-shrink: 0;
}

.bppc-friends-list .bppc-friend-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.bppc-friend-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border: 2px solid #fff;
    border-radius: 50%;
}

.bppc-friends-list .bppc-friend-info {
    flex: 1;
    min-width: 0;
}

.bppc-friends-list .bppc-friend-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bppc-verified-badge {
    background: #1da1f2;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bppc-friend-active {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* About Widget Edit Button */
.bppc-widget-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.bppc-edit-about-btn {
    background: none;
    border: none;
    color: var(--bppc-primary, #4a90d9);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
}

.bppc-edit-about-btn:hover {
    text-decoration: underline;
}

.bppc-job-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

/* About Me Editor Popup */
.bppc-about-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: none;
}

.bppc-about-editor-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 95vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0,0,0,0.3);
    z-index: 100000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.bppc-about-editor-header {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bppc-about-editor-title {
    font-weight: 600;
    font-size: 16px;
}

.bppc-about-editor-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.bppc-about-editor-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.bppc-about-editor-field {
    margin-bottom: 15px;
}

.bppc-about-editor-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
    color: #333;
}

.bppc-about-editor-field input,
.bppc-about-editor-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.bppc-about-editor-field textarea {
    min-height: 100px;
    resize: vertical;
}

.bppc-about-editor-avatar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.bppc-about-editor-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.bppc-about-editor-avatar-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.bppc-about-editor-social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.bppc-about-editor-social-grid input {
    padding: 8px;
    font-size: 13px;
}

.bppc-about-editor-save {
    width: 100%;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 15px;
}

.bppc-about-editor-save:hover {
    background: var(--bppc-secondary, #7c5cc4);
}

/* Hide ARS Comment Thumbs on Mobile - COMPREHENSIVE */
@media (max-width: 768px) {
    .ars-comment-reactions,
    .ars-like-btn,
    .ars-dislike-btn,
    .ars-comment-like-btn,
    .ars-comment-dislike-btn,
    .ars-comment-likes-wrap,
    .ars-comment-likes,
    .ars-thumbs-wrap,
    .ars-comment-vote,
    .ars-vote-buttons,
    .comment-vote-buttons,
    [class*="ars-like"],
    [class*="ars-dislike"],
    [class*="ars-thumb"] {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Message Button in Profile Header */
.bppc-header-message-btn {
    display: inline-block;
    margin-left: 8px;
}

.bppc-message-btn-header {
    background: linear-gradient(135deg, var(--bppc-primary, #4a90d9), var(--bppc-secondary, #7c5cc4)) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.3) !important;
}

.bppc-message-btn-header:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.4) !important;
}

.bppc-msg-icon {
    font-size: 16px;
}

/* Messenger Popup - Facebook/Better Messages Style */
.bppc-messenger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: none;
}

.bppc-messenger-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: 95vw;
    height: 480px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0,0,0,0.3);
    z-index: 100000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.bppc-messenger-header {
    background: linear-gradient(135deg, var(--bppc-primary, #4a90d9), var(--bppc-secondary, #7c5cc4));
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bppc-messenger-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bppc-messenger-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.bppc-messenger-name {
    font-weight: 600;
    font-size: 15px;
}

.bppc-messenger-status {
    font-size: 12px;
    opacity: 0.8;
}

.bppc-messenger-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.bppc-messenger-close:hover {
    opacity: 1;
}

.bppc-messenger-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f7fb;
}

.bppc-messenger-empty {
    text-align: center;
    color: #888;
    padding: 40px 20px;
}

.bppc-messenger-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.bppc-messenger-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bppc-messenger-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.bppc-messenger-msg.sent {
    align-self: flex-end;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bppc-messenger-msg.received {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.bppc-messenger-footer {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
}

.bppc-messenger-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.bppc-messenger-input-wrap {
    flex: 1;
}

.bppc-messenger-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    overflow-y: auto;
}

.bppc-messenger-input:focus {
    outline: none;
    border-color: var(--bppc-primary, #4a90d9);
}

.bppc-messenger-send {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.bppc-messenger-send:hover {
    background: var(--bppc-secondary, #7c5cc4);
}

.bppc-messenger-send svg {
    width: 20px;
    height: 20px;
}

.bppc-messenger-success {
    color: #28a745;
    font-size: 13px;
    text-align: center;
    padding: 10px;
}

.bppc-messenger-error {
    color: #dc3545;
    font-size: 13px;
    text-align: center;
    padding: 10px;
}

@media (max-width: 768px) {
    .bppc-messenger-popup {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .bppc-message-btn-header {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
}

/* ========================================
   INBOX APP - STANDALONE MESSAGING SYSTEM
   ======================================== */

.bppc-inbox-app {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    min-height: 500px;
    display: flex;
}

.bppc-inbox-app.bppc-chat-mode {
    min-height: 600px;
}

.bppc-inbox-main {
    flex: 1;
    min-width: 0;
}

.bppc-inbox-panel {
    width: 100%;
}

/* ========================================
   FRIENDS SIDEBAR (Chat Mode)
   ======================================== */

.bppc-inbox-friends-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #f8f9fa, #fff);
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.bppc-friends-sidebar-header {
    padding: 16px;
    background: linear-gradient(135deg, var(--bppc-header-bg, #1a1a2e), #2d2d44);
}

.bppc-friends-sidebar-header h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.bppc-friends-search-wrap input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.bppc-friends-search-wrap input::placeholder {
    color: rgba(255,255,255,0.6);
}

.bppc-friends-search-wrap input:focus {
    outline: none;
    background: rgba(255,255,255,0.25);
}

.bppc-friends-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.bppc-friends-loading {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 13px;
}

.bppc-friend-chat-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.bppc-friend-chat-item:hover {
    background: #e8f4fd;
}

.bppc-friend-chat-avatar {
    position: relative;
    flex-shrink: 0;
    margin-right: 10px;
}

.bppc-friend-chat-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.bppc-friend-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #28a745;
    border: 2px solid #fff;
    border-radius: 50%;
}

.bppc-friend-chat-info {
    flex: 1;
    min-width: 0;
}

.bppc-friend-chat-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bppc-friend-chat-status {
    font-size: 12px;
    color: #888;
}

.bppc-friend-chat-status.online {
    color: #28a745;
}

.bppc-friend-member-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border-radius: 10px;
    margin-left: 6px;
}

/* Notification Badge in Header */
.bppc-inbox-notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: #dc3545;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 11px;
    margin-left: 10px;
    animation: bppc-badge-pulse 2s infinite;
}

@keyframes bppc-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.bppc-inbox-title {
    display: inline;
}

/* New message toast notification */
.bppc-new-message-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--bppc-primary, #4a90d9), var(--bppc-secondary, #7c5cc4));
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: bppc-toast-slide-in 0.3s ease;
    max-width: 350px;
}

@keyframes bppc-toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.bppc-toast-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.bppc-toast-content {
    flex: 1;
}

.bppc-toast-sender {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.bppc-toast-preview {
    font-size: 13px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bppc-toast-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
}

.bppc-toast-close:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .bppc-inbox-friends-sidebar {
        display: none;
    }
    
    .bppc-inbox-app.bppc-chat-mode .bppc-inbox-friends-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .bppc-inbox-app.bppc-chat-mode .bppc-inbox-friends-sidebar.show {
        transform: translateX(0);
    }
}

.bppc-inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bppc-header-bg, #1a1a2e), #2d2d44);
    border-bottom: 1px solid #eee;
}

.bppc-inbox-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}

.bppc-inbox-compose-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bppc-inbox-compose-btn:hover {
    background: var(--bppc-secondary, #7c5cc4);
    transform: translateY(-1px);
    color: #fff;
}

.bppc-inbox-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 6px;
}

.bppc-inbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 450px;
    overflow-y: auto;
}

.bppc-inbox-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bppc-inbox-item:hover {
    background: #f8f9fa;
}

.bppc-inbox-item.unread {
    background: #f0f7ff;
}

.bppc-inbox-item.unread:hover {
    background: #e3f0ff;
}

.bppc-inbox-item.active {
    background: #e8f4fd;
    border-left: 3px solid var(--bppc-primary, #4a90d9);
}

.bppc-inbox-avatar {
    position: relative;
    flex-shrink: 0;
    margin-right: 16px;
}

.bppc-inbox-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.bppc-avatar-link {
    display: block;
}

.bppc-inbox-unread-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: var(--bppc-primary, #4a90d9);
    border: 2px solid #fff;
    border-radius: 50%;
}

.bppc-inbox-content {
    flex: 1;
    min-width: 0;
}

.bppc-inbox-sender {
    font-size: 18px !important;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.bppc-inbox-sender:hover {
    color: var(--bppc-primary, #4a90d9);
}

.bppc-inbox-subject {
    font-size: 17px !important;
    color: #555;
    margin-bottom: 2px;
}

.bppc-inbox-preview {
    font-size: 16px !important;
    color: #888;
}

.bppc-inbox-date {
    font-size: 13px;
    color: #999;
}

/* Hide old Messages tab */
#buddypress nav ul li#messages-personal-li,
#buddypress .bp-navs li#messages-personal-li,
nav.bp-navs ul li a[href*='/messages'],
#buddypress nav ul li a[href$='/messages/'],
#buddypress nav ul li a[href$='/messages'],
li.bp-personal-sub-tab a[href*='/messages'],
#object-nav li a[href*='/messages'] {
    display: none !important;
}

/* Inbox nav icon */
.bppc-inbox-nav-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

/* Message reactions */
.bppc-msg-reactions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bppc-msg-reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.bppc-msg-reaction:hover {
    background: #e0e0e0;
}

.bppc-msg-reaction.active {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
}

.bppc-reaction-picker {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bppc-reaction-btn {
    font-size: 20px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.bppc-reaction-btn:hover {
    background: #f0f0f0;
    transform: scale(1.2);
}

/* Attachment preview */
.bppc-attachment-preview {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.bppc-attachment-preview img {
    max-width: 150px;
    max-height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.bppc-attach-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    color: #666;
}

.bppc-attach-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.bppc-reply-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bppc-reply-actions {
    display: flex;
    gap: 8px;
}

/* Larger message bubbles */
.bppc-msg-body {
    padding: 16px 20px;
    border-radius: 18px;
    font-size: 18px !important;
    line-height: 1.6;
    position: relative;
}

.bppc-msg-sender {
    font-size: 15px !important;
}

.bppc-msg-avatar img {
    width: 40px;
    height: 40px;
}

.bppc-view-name {
    font-size: 20px !important;
}

/* Reaction picker on messages - INSIDE the message body */
.bppc-msg-reaction-trigger {
    position: absolute;
    bottom: 4px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
}

.bppc-msg-bubble:hover .bppc-msg-reaction-trigger {
    opacity: 1;
}

/* Reactions display - below the message body content, inside the bubble */
.bppc-msg-reactions-display {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.bppc-msg-reaction-picker {
    position: absolute;
    bottom: 100%;
    right: 0;
    display: none;
    gap: 4px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 100;
    margin-bottom: 8px;
}

.bppc-msg-reaction-picker.show {
    display: flex;
}

.bppc-msg-reaction-picker button {
    font-size: 24px;
    padding: 4px 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
}

.bppc-msg-reaction-picker button:hover {
    background: #f0f0f0;
    transform: scale(1.3);
}

.bppc-msg-reactions-display {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.bppc-msg-reaction-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 14px;
}

.bppc-msg-reaction-item span {
    font-size: 16px;
}

.bppc-msg-reaction-item .count {
    font-size: 12px;
    color: #666;
}

/* User badges in view header */
.bppc-view-badges {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.bppc-view-badge-item {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

.bppc-view-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.bppc-view-user-link:hover .bppc-view-name {
    text-decoration: underline;
}

/* Inbox Widget Styling */
.bppc-inbox-widget-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.bppc-inbox-unread-banner {
    background: linear-gradient(135deg, var(--bppc-primary, #4a90d9), var(--bppc-secondary, #7c5cc4));
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.bppc-inbox-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bppc-inbox-widget-item {
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.bppc-inbox-widget-item:last-child {
    border-bottom: none;
}

.bppc-inbox-widget-link {
    display: flex;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

.bppc-inbox-widget-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
}

.bppc-inbox-widget-content {
    flex: 1;
    min-width: 0;
}

.bppc-inbox-widget-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.bppc-inbox-widget-preview {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bppc-inbox-widget-dot {
    width: 10px;
    height: 10px;
    background: var(--bppc-primary, #4a90d9);
    border-radius: 50%;
    flex-shrink: 0;
}

.bppc-inbox-widget-item.unread .bppc-inbox-widget-name {
    color: #1a1a2e;
}

.bppc-inbox-widget-empty {
    text-align: center;
    padding: 30px;
    color: #888;
}

.bppc-inbox-widget-empty p {
    margin: 10px 0 0;
}

.bppc-inbox-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.bppc-inbox-sender {
    font-weight: 600;
    font-size: 18px !important;
    color: #333;
}

.bppc-inbox-item.unread .bppc-inbox-sender {
    color: #1a1a2e;
}

.bppc-inbox-date {
    font-size: 13px;
    color: #888;
}

.bppc-inbox-item.unread .bppc-inbox-date {
    color: var(--bppc-primary, #4a90d9);
    font-weight: 600;
}

.bppc-inbox-subject {
    font-size: 17px !important;
    color: #555;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bppc-inbox-item.unread .bppc-inbox-subject {
    color: #333;
    font-weight: 500;
}

.bppc-inbox-preview {
    font-size: 15px !important;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bppc-inbox-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.bppc-inbox-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.bppc-inbox-empty h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #333;
}

.bppc-inbox-empty p {
    margin: 0;
    color: #888;
}

/* Thread View Panel */
.bppc-inbox-view-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

.bppc-inbox-view-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bppc-header-bg, #1a1a2e), #2d2d44);
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.bppc-inbox-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.bppc-inbox-back-btn:hover {
    background: rgba(255,255,255,0.25);
}

.bppc-inbox-view-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bppc-view-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.bppc-view-name {
    font-weight: 600;
    font-size: 18px;
    color: #fff;
}

.bppc-view-user-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.bppc-view-user-badge {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: contain;
    background: rgba(255,255,255,0.1);
    padding: 2px;
}

.bppc-inbox-delete-btn {
    padding: 8px;
    background: rgba(220,53,69,0.2);
    color: #ff6b7a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.bppc-inbox-delete-btn:hover {
    background: rgba(220,53,69,0.4);
}

.bppc-inbox-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
    max-height: 350px;
}

.bppc-msg-bubble {
    max-width: 75%;
    display: flex;
    flex-direction: column;
}

.bppc-msg-bubble.mine {
    align-self: flex-end;
}

.bppc-msg-bubble.theirs {
    align-self: flex-start;
}

.bppc-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.bppc-msg-bubble.mine .bppc-msg-header {
    flex-direction: row-reverse;
}

.bppc-msg-avatar img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.bppc-msg-sender {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
}

.bppc-msg-sender:hover {
    text-decoration: underline;
}

.bppc-msg-body {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 18px !important;
    line-height: 1.5;
    position: relative;
}

.bppc-msg-bubble.mine .bppc-msg-body {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bppc-msg-bubble.theirs .bppc-msg-body {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bppc-msg-body p {
    margin: 0;
}

.bppc-msg-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

.bppc-msg-bubble.mine .bppc-msg-date {
    text-align: right;
}

.bppc-inbox-reply-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #eee;
}

#bppc-reply-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    overflow-y: auto;
    font-family: inherit;
}

#bppc-reply-input:focus {
    outline: none;
    border-color: var(--bppc-primary, #4a90d9);
}

.bppc-inbox-send-btn {
    width: 44px;
    height: 44px;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.bppc-inbox-send-btn:hover {
    background: var(--bppc-secondary, #7c5cc4);
}

.bppc-inbox-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Compose Panel */
.bppc-inbox-compose-panel {
    padding: 0;
}

.bppc-inbox-compose-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bppc-header-bg, #1a1a2e), #2d2d44);
    border-bottom: 1px solid #eee;
    gap: 16px;
}

.bppc-inbox-compose-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.bppc-compose-form {
    padding: 24px;
}

.bppc-compose-field {
    margin-bottom: 20px;
    position: relative;
}

.bppc-compose-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.bppc-compose-field input[type="text"],
.bppc-compose-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bppc-compose-field input[type="text"]:focus,
.bppc-compose-field textarea:focus {
    outline: none;
    border-color: var(--bppc-primary, #4a90d9);
}

.bppc-compose-field textarea {
    resize: vertical;
    min-height: 120px;
}

.bppc-user-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.bppc-user-search-results.show {
    display: block;
}

.bppc-user-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.bppc-user-result:hover {
    background: #f5f5f5;
}

.bppc-user-result img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.bppc-user-result-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.bppc-compose-actions {
    margin-top: 24px;
}

.bppc-compose-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.bppc-compose-send-btn:hover {
    background: var(--bppc-secondary, #7c5cc4);
    transform: translateY(-1px);
}

.bppc-compose-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.bppc-inbox-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Comment Reply Notice Styles */
.bppc-comment-reply-notice {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid var(--bppc-primary, #4a90d9);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 12px;
}

.bppc-comment-reply-notice strong {
    color: var(--bppc-primary, #4a90d9);
    font-size: 16px !important;
}

.bppc-comment-reply-notice a {
    color: var(--bppc-primary, #4a90d9);
    text-decoration: none;
    font-weight: 600;
}

.bppc-comment-reply-notice a:hover {
    text-decoration: underline;
}

.bppc-comment-reply-notice blockquote {
    background: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-style: italic;
    font-size: 15px !important;
}

.bppc-view-comment-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--bppc-primary, #4a90d9);
    color: #fff !important;
    border-radius: 20px;
    font-size: 14px !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s;
}

.bppc-view-comment-btn:hover {
    background: var(--bppc-secondary, #7c5cc4);
}

.bppc-comment-sync-notice {
    text-align: center;
    padding: 10px 16px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    margin: 8px 0;
    font-size: 14px !important;
}

.bppc-comment-sync-notice a {
    color: #1b5e20;
    font-weight: 600;
}

@media (max-width: 768px) {
    .bppc-inbox-header {
        padding: 16px;
    }
    
    .bppc-inbox-header h2 {
        font-size: 18px;
    }
    
    .bppc-inbox-compose-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .bppc-inbox-item {
        padding: 12px 16px;
    }
    
    .bppc-inbox-avatar img {
        width: 44px;
        height: 44px;
    }
    
    .bppc-inbox-preview {
        display: none;
    }
    
    .bppc-msg-bubble {
        max-width: 85%;
    }
    
    .bppc-compose-form {
        padding: 16px;
    }
}

/* ========================================
   BUDDYPRESS MESSAGES PAGE - MODERN STYLING
   ======================================== */

/* Messages page container */
#buddypress #message-threads,
#buddypress .messages-screen {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

/* Messages nav tabs */
#buddypress #subnav.bp-navs ul {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin: 0;
    list-style: none;
}

#buddypress #subnav.bp-navs ul li a {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

#buddypress #subnav.bp-navs ul li a:hover {
    background: #e9ecef;
    color: #333;
}

#buddypress #subnav.bp-navs ul li.current a,
#buddypress #subnav.bp-navs ul li.selected a {
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
}

/* Message thread list */
#buddypress #message-threads {
    margin: 0;
    padding: 0;
}

#buddypress .message-box,
#buddypress table#message-threads {
    width: 100%;
    border-collapse: collapse;
}

#buddypress table#message-threads thead {
    display: none;
}

#buddypress table#message-threads tbody tr,
#buddypress .message-box {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
    cursor: pointer;
}

#buddypress table#message-threads tbody tr:hover,
#buddypress .message-box:hover {
    background: #f8f9fa;
}

#buddypress table#message-threads tbody tr.unread,
#buddypress .message-box.unread {
    background: #f0f7ff;
}

#buddypress table#message-threads tbody tr.unread:hover,
#buddypress .message-box.unread:hover {
    background: #e3f0ff;
}

/* Thread checkbox */
#buddypress table#message-threads td.thread-checkbox,
#buddypress table#message-threads td.bulk-select-check {
    padding-right: 15px;
}

#buddypress table#message-threads td.thread-checkbox input[type="checkbox"],
#buddypress table#message-threads td.bulk-select-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
}

/* Thread avatar */
#buddypress table#message-threads td.thread-avatar,
#buddypress .message-box .thread-avatar {
    flex-shrink: 0;
    padding-right: 15px;
}

#buddypress table#message-threads td.thread-avatar img,
#buddypress .message-box .thread-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Thread content */
#buddypress table#message-threads td.thread-content,
#buddypress .message-box .thread-content {
    flex: 1;
    min-width: 0;
}

#buddypress table#message-threads td.thread-content .thread-from,
#buddypress .message-box .thread-from {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

#buddypress table#message-threads tr.unread td.thread-content .thread-from,
#buddypress .message-box.unread .thread-from {
    color: #1a1a2e;
}

#buddypress table#message-threads td.thread-content .thread-subject,
#buddypress .message-box .thread-subject {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#buddypress table#message-threads td.thread-content .thread-subject a {
    color: inherit;
    text-decoration: none;
}

#buddypress table#message-threads tr.unread td.thread-content .thread-subject,
#buddypress .message-box.unread .thread-subject {
    color: #333;
    font-weight: 500;
}

/* Thread excerpt/preview */
#buddypress table#message-threads td.thread-content .thread-excerpt,
#buddypress .message-box .thread-excerpt {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

/* Thread date */
#buddypress table#message-threads td.thread-date,
#buddypress .message-box .thread-date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    padding-left: 15px;
}

#buddypress table#message-threads tr.unread td.thread-date,
#buddypress .message-box.unread .thread-date {
    color: var(--bppc-primary, #4a90d9);
    font-weight: 600;
}

/* Star message indicator */
#buddypress table#message-threads td.thread-star,
#buddypress .thread-star {
    padding: 0 10px;
}

#buddypress table#message-threads td.thread-star a,
#buddypress .thread-star a {
    font-size: 18px;
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

#buddypress table#message-threads td.thread-star a:hover,
#buddypress table#message-threads td.thread-star a.bp-icons.is-starred,
#buddypress .thread-star a:hover,
#buddypress .thread-star a.bp-icons.is-starred {
    color: #ffc107;
}

/* Message actions */
#buddypress .message-action-buttons,
#buddypress #message-threads tfoot,
#buddypress .bulk-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

#buddypress .message-action-buttons select,
#buddypress .bulk-actions select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

#buddypress .message-action-buttons input[type="submit"],
#buddypress .bulk-actions input[type="submit"],
#buddypress .message-action-buttons button,
#buddypress .bulk-actions button {
    padding: 8px 16px;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

#buddypress .message-action-buttons input[type="submit"]:hover,
#buddypress .bulk-actions input[type="submit"]:hover {
    background: var(--bppc-secondary, #7c5cc4);
}

/* Single message view */
#buddypress #message-thread {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

#buddypress #message-thread .message-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

#buddypress #message-thread .message-header h2,
#buddypress #message-thread .message-subject {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Individual message in thread */
#buddypress #message-thread .message-content,
#buddypress #message-thread .message-box {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

#buddypress #message-thread .message-content:last-of-type,
#buddypress #message-thread .message-box:last-of-type {
    border-bottom: none;
}

#buddypress #message-thread .message-metadata {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#buddypress #message-thread .message-metadata img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

#buddypress #message-thread .message-metadata .message-author {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

#buddypress #message-thread .message-metadata .message-date,
#buddypress #message-thread .message-metadata .activity {
    font-size: 12px;
    color: #888;
}

#buddypress #message-thread .message-body {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

/* Compose message form */
#buddypress #send-reply,
#buddypress #send_message_form,
#buddypress .send-reply-form {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

#buddypress #send-reply label,
#buddypress #send_message_form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

#buddypress #send-reply textarea,
#buddypress #send_message_form textarea,
#buddypress .message-content-box textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#buddypress #send-reply textarea:focus,
#buddypress #send_message_form textarea:focus {
    outline: none;
    border-color: var(--bppc-primary, #4a90d9);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

#buddypress #send-reply input[type="submit"],
#buddypress #send_message_form input[type="submit"],
#buddypress .send-reply-form button[type="submit"] {
    padding: 12px 28px;
    background: var(--bppc-primary, #4a90d9);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-top: 12px;
}

#buddypress #send-reply input[type="submit"]:hover,
#buddypress #send_message_form input[type="submit"]:hover {
    background: var(--bppc-secondary, #7c5cc4);
    transform: translateY(-1px);
}

/* Compose new message page */
#buddypress #compose-message {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
}

#buddypress #compose-message .compose-header {
    margin-bottom: 20px;
}

#buddypress #compose-message input[type="text"],
#buddypress #compose-message input#send-to-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 15px;
}

#buddypress #compose-message input[type="text"]:focus,
#buddypress #compose-message input#send-to-input:focus {
    outline: none;
    border-color: var(--bppc-primary, #4a90d9);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

/* Sent and Starred indicators */
#buddypress .message-sent-status,
#buddypress .thread-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* No messages state */
#buddypress .bp-feedback.info {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
}

#buddypress .bp-feedback.info::before {
    content: "📭";
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

/* Messages page responsive */
@media (max-width: 768px) {
    #buddypress #subnav.bp-navs ul {
        flex-wrap: wrap;
        padding: 10px;
    }
    
    #buddypress #subnav.bp-navs ul li a {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    #buddypress table#message-threads tbody tr,
    #buddypress .message-box {
        padding: 12px 15px;
    }
    
    #buddypress table#message-threads td.thread-avatar img,
    #buddypress .message-box .thread-avatar img {
        width: 40px;
        height: 40px;
    }
    
    #buddypress table#message-threads td.thread-content .thread-excerpt {
        display: none;
    }
    
    #buddypress #compose-message {
        padding: 15px;
    }
}

