/*
Theme Name:   BuddyX Child
Description:  Custom features for Pop Up LA
Author:       Your Name
Template:     buddyx
Version:      1.0.5
Text Domain:  buddyx-child
*/

/* =============================================================================
   POP UP LA - iOS STYLE FEED PAGE (Shortcode UI)
============================================================================= */
body {
  background: linear-gradient(135deg, #FFF5F7 0%, #ffffff 100%) !important;
}

/* Feed root */
.popup-la-feed {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 14px 80px 14px;
}

/* Header */
.popup-la-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 6px 14px 6px;
}
.popup-la-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #ff1d58 0%, #7a2cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.0;
}
.popup-la-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #777;
  font-weight: 700;
}

/* Live/Ended toggle */
.popup-la-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  font-weight: 900 !important;
  color: #fff !important;
  background: linear-gradient(90deg, #ff1d58 0%, #ff69b4 100%) !important;
  box-shadow: 0 10px 24px rgba(255, 29, 88, 0.25);
  cursor: pointer;
}
.popup-la-toggle.is-ended {
  background: linear-gradient(90deg, #6b6b6b 0%, #9a9a9a 100%) !important;
}
.popup-la-toggle .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Filter block */
.popup-la-filter-block {
  margin-top: 6px;
  margin-bottom: 14px;
}

/* Category row */
.popup-la-cat-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 6px;
  -webkit-overflow-scrolling: touch;
}
.popup-la-cat-row::-webkit-scrollbar { display: none; }

/* Filter pills */
.filter-pill {
  white-space: nowrap;
  background: rgba(255,255,255,0.9) !important;
  color: #ff1d58 !important;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
  border: 1px solid rgba(255, 29, 88, 0.08) !important;
  box-shadow: 0 8px 18px rgba(255, 29, 88, 0.08);
}
.filter-pill.is-active {
  background: #ff1d58 !important;
  color: #fff !important;
}

/* Month row (like iOS chips) */
.popup-la-month-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 6px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.popup-la-month-row::-webkit-scrollbar { display: none; }
.popup-la-month {
  white-space: nowrap;
  font-size: 13px !important;
  font-weight: 900 !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  background: rgba(255,255,255,0.6) !important;
  color: #2D0052 !important;
  box-shadow: 0 6px 16px rgba(45,0,82,0.08);
}
.popup-la-month.is-active {
  background: #2D0052 !important;
  color: #fff !important;
}

/* Cards container */
.popup-la-cards { padding: 8px 0 0 0; }
.popup-la-cards.is-loading { opacity: 0.65; pointer-events: none; }

/* Card styling */
.feed-card {
  background-color: #2D0052 !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  margin-bottom: 20px !important;
  padding: 0 !important;
  box-shadow: 0 18px 45px rgba(45, 0, 82, 0.22);
  transform: translateZ(0);
}
.feed-card .app-card-image {
  width: 100%;
  height: 220px !important;
  overflow: hidden;
  position: relative;
}
.feed-card .app-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* NEW badge on cards (matches iOS app) */
.card-new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(90deg, #ff8c00, #ff1d58);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 8px;
  z-index: 2;
  letter-spacing: 0.3px;
}

.popup-la-catwrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.card-cat-pill {
  display: inline-block;
  background: rgba(255, 29, 88, 0.20) !important;
  color: #ff1d58 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  padding: 5px 9px !important;
  border-radius: 6px;
  text-transform: uppercase;
}
.card-title {
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 950 !important;
  margin: 0 0 10px 0 !important;
}
.app-divider {
  height: 1px;
  background: rgba(255,255,255,0.25);
  margin: 12px 0;
}
.app-card-content-wrap { padding: 18px 18px 14px 18px; }
.app-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700;
  opacity: 0.95;
}
.app-card-footer .footer-left { white-space: nowrap; }
.app-card-footer .footer-right {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 58%;
}

/* Tappable card hover */
.event-card-link-wrapper {
  text-decoration: none !important;
  display: block;
}
.event-card-link-wrapper:hover .feed-card {
  transform: translateY(-2px);
  transition: transform 0.18s ease;
}

/* Empty state */
.popup-la-empty {
  padding: 70px 0;
  text-align: center;
  color: #888;
  font-weight: 800;
}

/* =============================================================================
   SORT & FILTER TOOLBAR (matches iOS app filter bar)
============================================================================= */
.popup-la-toolbar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 6px 10px 6px;
  -webkit-overflow-scrolling: touch;
}
.popup-la-toolbar::-webkit-scrollbar { display: none; }

.toolbar-chip {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.92);
  color: #2D0052;
  box-shadow: 0 6px 16px rgba(45,0,82,0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.toolbar-chip:hover {
  background: rgba(255,255,255,1);
}
.toolbar-chip.is-active {
  background: #2D0052;
  color: #fff;
}
.toolbar-chip.is-active-orange {
  background: #ff8c00;
  color: #fff;
}
.toolbar-chip.is-active-purple {
  background: #7a2cff;
  color: #fff;
}
.toolbar-chip.is-active-gray {
  background: #6b6b6b;
  color: #fff;
}
.toolbar-chip.is-clear {
  background: rgba(255, 59, 48, 0.85);
  color: #fff;
}
.toolbar-chip.is-clear:hover {
  background: rgba(255, 59, 48, 1);
}

/* =============================================================================
   MODAL DETAIL VIEW (iOS-ish)
============================================================================= */
.popup-la-noscroll { overflow: hidden; }
.popup-la-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999999;
}
.popup-la-modal.is-open { display: flex; }
.popup-la-modal-panel {
  width: min(980px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  position: relative;
}
.popup-la-modal-close {
  position: sticky;
  top: 10px;
  margin-left: auto;
  display: block;
  border: none !important;
  background: rgba(255,255,255,0.9) !important;
  color: #2D0052 !important;
  font-weight: 900 !important;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  z-index: 2;
}
.popup-la-detail-hero { position: relative; }
.popup-la-detail-hero img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}
.popup-la-detail-inner { padding: 22px 22px 26px 22px; }
.popup-la-detail-title {
  font-size: 28px;
  font-weight: 950;
  color: #2D0052;
  margin-bottom: 12px;
}

/* Timezone selector */
.popup-la-tz { margin: 10px 0 16px 0; }
.popup-la-tz-label {
  font-size: 12px;
  font-weight: 900;
  color: #777;
  margin-bottom: 8px;
}
.popup-la-tz-seg {
  display: flex;
  background: rgba(255, 29, 88, 0.10);
  border-radius: 14px;
  padding: 6px;
  gap: 6px;
}
.popup-la-tz-btn {
  flex: 1;
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 10px !important;
  font-weight: 950 !important;
  color: #ff1d58 !important;
  background: transparent !important;
}
.popup-la-tz-btn.is-active {
  background: #ff1d58 !important;
  color: #fff !important;
}

/* Detail rows */
.popup-la-detail .app-row {
  background: #ffffff;
  border: 1px solid rgba(45,0,82,0.08);
  box-shadow: 0 10px 24px rgba(45,0,82,0.08);
  border-radius: 16px !important;
  margin-bottom: 12px;
  padding: 14px 16px;
}
.popup-la-detail .app-row-left {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.popup-la-detail .app-label {
  font-size: 12px;
  font-weight: 900;
  color: #7b7b7b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.popup-la-detail .app-value {
  font-size: 15px;
  font-weight: 950;
  color: #2D0052;
  text-align: right;
}

/* Event details content */
.popup-la-detail-section-title {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 950;
  color: #ff1d58;
}
.popup-la-detail-desc {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
}

/* Hide theme junk */
.entry-footer, .posted-in, .post-navigation, .entry-meta {
  display: none !important;
}

/* GET TICKETS button */
.popup-la-detail .detail-ticket-btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 18px 22px;
  text-align: center;
  text-decoration: none !important;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0.4px;
  color: #fff !important;
  background: linear-gradient(90deg, #ff1d58 0%, #ff69b4 100%);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(255, 29, 88, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.popup-la-detail .detail-ticket-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(255, 29, 88, 0.45);
  opacity: 0.98;
}
.popup-la-detail .detail-ticket-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 10px 22px rgba(255, 29, 88, 0.35);
}
.popup-la-detail .detail-ticket-btn::after {
  content: "→";
  margin-left: 10px;
  font-size: 18px;
  opacity: 0.9;
}

/* =============================================================================
   MODAL COMMENTS
============================================================================= */
.popup-la-comments-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(45,0,82,0.12);
}
.popup-la-comment-form-wrap {
  margin-bottom: 14px;
  background: rgba(45,0,82,0.04);
  border: 1px solid rgba(45,0,82,0.08);
  border-radius: 18px;
  padding: 14px;
}
.popup-la-comments-subtitle {
  font-weight: 950;
  color: #2D0052;
  font-size: 14px;
  margin-bottom: 10px;
}
.popup-la-form-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.popup-la-input {
  flex: 1;
  border-radius: 14px;
  border: 1px solid rgba(45,0,82,0.12);
  padding: 12px 12px;
  font-weight: 800;
  outline: none;
  background: #fff;
}
.popup-la-textarea {
  width: 100%;
  min-height: 92px;
  border-radius: 14px;
  border: 1px solid rgba(45,0,82,0.12);
  padding: 12px 12px;
  font-weight: 700;
  outline: none;
  resize: vertical;
  background: #fff;
}
.popup-la-comment-submit {
  width: 100%;
  margin-top: 10px;
  border: none !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  font-weight: 950 !important;
  color: #fff !important;
  background: linear-gradient(90deg, #ff1d58 0%, #ff69b4 100%) !important;
  box-shadow: 0 14px 34px rgba(255, 29, 88, 0.25);
  cursor: pointer;
}
.popup-la-comment-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.popup-la-comment-status {
  margin-top: 10px;
  font-weight: 800;
  color: #2D0052;
  font-size: 12px;
  opacity: 0.85;
}
.popup-la-comments-title {
  font-weight: 950;
  color: #2D0052;
  font-size: 14px;
  margin: 10px 0 10px 0;
}
.popup-la-comments-empty {
  font-weight: 800;
  color: rgba(45,0,82,0.65);
  font-size: 13px;
  padding: 10px 0;
}
.popup-la-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.popup-la-comment {
  background: #fff;
  border: 1px solid rgba(45,0,82,0.08);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 10px 22px rgba(45,0,82,0.06);
}
.popup-la-comment-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.popup-la-comment-author {
  font-weight: 950;
  color: #2D0052;
  font-size: 13px;
}
.popup-la-comment-date {
  font-weight: 800;
  color: rgba(45,0,82,0.55);
  font-size: 12px;
  white-space: nowrap;
}
.popup-la-comment-body {
  font-size: 14px;
  line-height: 1.55;
  color: #222;
}

/* =============================================================================
   INTEGRATED COMPONENTS (RSVP, Pins, BuddyPress)
============================================================================= */
.popup-la-rsvp-stack-wrap {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.popup-la-full-guestlist {
  max-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.view-full-guestlist {
  display: inline-block;
  padding: 2px 4px;
  background: #eef6ff;
  border-radius: 4px;
  font-size: 11px;
  color: #007aff;
}
.popup-la-avatar-stack {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  margin-bottom: 10px;
}
.popup-la-stack-item {
  width: 32px;
  height: 32px;
  margin-left: -12px;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: 0.2s;
  cursor: pointer;
}
.popup-la-stack-item:hover {
  transform: translateY(-3px);
  z-index: 10;
  border-color: #007aff;
}
.popup-la-pin-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 99;
}
.popup-la-pin-btn.is-pinned {
  background: #ff3b30;
  color: #fff;
}

#buddypress ul.nav-primary li#my-events-personal-li a span,
#buddypress .item-list-tabs ul li#my-events-personal-li a span {
  background: #007aff;
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 5px;
  vertical-align: middle;
  font-weight: bold;
}

/* =============================================================================
   CUSTOM PROFILE PAGE (cp-*)
============================================================================= */

/* Past event cards get dimmed */
.feed-card.is-past {
  opacity: 0.7;
  filter: saturate(0.6);
}
.feed-card.is-past:hover {
  opacity: 0.9;
  filter: saturate(0.85);
}

/* ── Cover Photo ── */
.cp-profile {
  max-width: 100%;
  background: #f0f2f5;
  min-height: 100vh;
}
.cp-cover {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #2D0052 0%, #7a2cff 50%, #ff1d58 100%);
  background-size: cover;
  background-position: center;
  border-radius: 0 0 16px 16px;
}

/* ── Header ── */
.cp-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}
.cp-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -60px;
}
.cp-avatar img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  object-fit: cover;
  background: #fff;
}
.cp-actions {
  display: flex;
  gap: 8px;
  padding-bottom: 10px;
}
.cp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s;
}
.cp-btn:hover { filter: brightness(0.95); }
.cp-btn-primary {
  background: linear-gradient(90deg, #ff1d58, #ff69b4);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,29,88,0.25);
}
.cp-btn-secondary {
  background: #e4e6eb;
  color: #1c1e21;
}

.cp-name-block {
  margin-top: 12px;
}
.cp-display-name {
  font-size: 26px;
  font-weight: 950;
  color: #1c1e21;
  margin: 0;
  line-height: 1.2;
}
.cp-username {
  font-size: 15px;
  color: #65676b;
  font-weight: 600;
}
.cp-quick-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 15px;
  color: #65676b;
  font-weight: 600;
  padding-bottom: 14px;
}
.cp-quick-stats strong { color: #1c1e21; font-weight: 800; }
.cp-dot { color: #ccc; }

/* ── Tab Bar ── */
.cp-tabs {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #fff;
  border-bottom: 1px solid #dddfe2;
  padding: 0 4px;
}
.cp-tabs::-webkit-scrollbar { display: none; }
.cp-tab {
  flex-shrink: 0;
  padding: 16px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #65676b;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.cp-tab:hover {
  color: #1c1e21;
  background: rgba(0,0,0,0.03);
  border-radius: 8px 8px 0 0;
}
.cp-tab.is-active {
  color: #ff1d58;
  border-bottom-color: #ff1d58;
}
.cp-tab-count {
  display: inline-block;
  background: #f0f2f5;
  color: #65676b;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Content Area ── */
.cp-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 60px 16px;
}

/* ── Cards (reusable containers) ── */
.cp-card {
  background: #fff;
  border: 1px solid #dddfe2;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.cp-card-title {
  font-size: 17px;
  font-weight: 900;
  color: #1c1e21;
  margin-bottom: 12px;
}

/* Bio */
.cp-bio {
  font-size: 15px;
  line-height: 1.6;
  color: #1c1e21;
}
.cp-bio p { margin: 0 0 6px 0; }
.cp-bio p:last-child { margin-bottom: 0; }

/* Personal details */
.cp-detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 15px;
  font-weight: 600;
  color: #1c1e21;
}
.cp-detail-row:last-child { border-bottom: none; }
.cp-detail-icon { font-size: 18px; width: 28px; text-align: center; }

/* Mutual friends */
.cp-mutual-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cp-mutual-item {
  display: inline-block;
  margin-left: -8px;
}
.cp-mutual-item:first-child { margin-left: 0; }
.cp-mutual-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.cp-mutual-text {
  font-size: 13px;
  font-weight: 700;
  color: #65676b;
}

/* Horizontal scroll for mini cards */
.cp-events-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 8px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cp-events-scroll::-webkit-scrollbar { display: none; }

/* Mini card */
.cp-mini-card {
  flex-shrink: 0;
  width: 160px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #dddfe2;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cp-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.cp-mini-img {
  width: 100%;
  height: 100px;
  overflow: hidden;
}
.cp-mini-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cp-mini-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a0070;
  color: #fff;
  font-size: 20px;
}
.cp-mini-info { padding: 10px; }
.cp-mini-title {
  font-size: 13px;
  font-weight: 800;
  color: #1c1e21;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.cp-mini-meta {
  font-size: 11px;
  font-weight: 700;
  color: #65676b;
}

/* Count badge */
.cp-count-badge {
  display: inline-block;
  background: #f0f2f5;
  color: #65676b;
  font-size: 13px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* See all link */
.cp-see-all {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #ff1d58;
  text-decoration: none;
}
.cp-see-all:hover { text-decoration: underline; }

/* ── Events Tab ── */
.cp-stats-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #2D0052 0%, #4a0e8f 100%);
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(45,0,82,0.25);
}
.cp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.cp-stat-num {
  font-size: 28px;
  font-weight: 950;
  color: #fff;
  line-height: 1.1;
}
.cp-stat-lbl {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.cp-section-title {
  font-size: 18px;
  font-weight: 950;
  color: #2D0052;
  margin-bottom: 14px;
}
.cp-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.cp-empty {
  padding: 50px 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #888;
  background: rgba(45,0,82,0.04);
  border-radius: 18px;
  border: 1px dashed rgba(45,0,82,0.15);
}

/* ── Friends Tab ── */
.cp-friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.cp-friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  background: #fff;
  border: 1px solid #dddfe2;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cp-friend-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.cp-friend-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 8px;
}
.cp-friend-name {
  font-size: 13px;
  font-weight: 800;
  color: #1c1e21;
  text-align: center;
  line-height: 1.3;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .cp-cover {
    height: 180px;
    border-radius: 0;
  }
  .cp-header-top {
    margin-top: -45px;
    flex-direction: column;
    align-items: flex-start;
  }
  .cp-avatar img {
    width: 100px;
    height: 100px;
    border-width: 4px;
  }
  .cp-actions {
    margin-top: 10px;
    padding-bottom: 0;
  }
  .cp-display-name { font-size: 22px; }
  .cp-tab {
    padding: 14px 12px;
    font-size: 13px;
  }
  .cp-quick-stats { font-size: 13px; }
  .cp-events-grid {
    grid-template-columns: 1fr;
  }
  .cp-stats-bar {
    padding: 14px 16px;
    gap: 10px;
  }
  .cp-stat-num { font-size: 22px; }
  .cp-mini-card { width: 140px; }
  .cp-mini-img { height: 85px; }
  .cp-friends-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }
  .cp-friend-avatar { width: 56px; height: 56px; }
}

/* =============================================================================
   BUDDYPRESS / BUDDYX SHELL OVERRIDES (Facebook-style profile layout)
   These target BuddyX theme's specific selectors for maximum specificity.
============================================================================= */

/* ── Cover image ── */
.buddyx-cover-image,
.buddyx-cover-image .header-cover-image,
#buddypress #header-cover-image,
.bp-header-cover-image,
.site-content .buddyx-cover-image {
    height: 280px !important;
    min-height: 280px !important;
    border-radius: 0 0 16px 16px !important;
}

/* ── Header area: flex row, avatar left ── */
#buddypress #item-header,
.buddyx-profile-header,
body.buddypress #item-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 16px !important;
    padding: 0 20px !important;
    max-width: 980px !important;
    margin: 0 auto !important;
    text-align: left !important;
}

/* ── Avatar: overlap cover, left side ── */
#buddypress #item-header .item-header-avatar,
#buddypress #item-header #item-header-avatar,
.buddyx-profile-header .item-header-avatar,
body.buddypress .item-header-avatar {
    margin-top: -60px !important;
    position: relative !important;
    z-index: 2 !important;
    text-align: left !important;
    flex-shrink: 0 !important;
}
#buddypress #item-header .item-header-avatar a,
body.buddypress .item-header-avatar a {
    display: inline-block !important;
}
#buddypress #item-header .item-header-avatar img,
#buddypress #item-header .item-header-avatar .avatar,
body.buddypress .item-header-avatar img,
body.buddypress .item-header-avatar .avatar {
    width: 130px !important;
    height: 130px !important;
    max-width: 130px !important;
    border-radius: 50% !important;
    border: 5px solid #fff !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18) !important;
    object-fit: cover !important;
    background: #fff !important;
}

/* ── Name + meta: left-aligned next to avatar ── */
#buddypress #item-header #item-header-content,
#buddypress #item-header .item-header-content,
body.buddypress #item-header-content {
    text-align: left !important;
    flex: 1 !important;
    padding-bottom: 10px !important;
}
#buddypress #item-header-content h2,
#buddypress #item-header-content h1,
#buddypress #item-header-content .user-nicename,
#buddypress #item-header-content .activity,
body.buddypress #item-header-content h2 {
    text-align: left !important;
}
#buddypress #item-header-content h2,
#buddypress #item-header-content h1 {
    font-size: 26px !important;
    font-weight: 950 !important;
    color: #1c1e21 !important;
    margin: 0 0 4px 0 !important;
}
#buddypress #item-header-content .activity,
#buddypress #item-header-content .user-nicename {
    font-size: 14px !important;
    color: #65676b !important;
}

/* ── Action buttons row ── */
#buddypress #item-header .member-header-actions,
#buddypress .header-actions,
body.buddypress .member-header-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 8px !important;
    justify-content: flex-start !important;
}
#buddypress .member-header-actions .generic-button a,
#buddypress .member-header-actions a,
body.buddypress .member-header-actions a {
    border-radius: 10px !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    padding: 9px 18px !important;
}

/* ── Remove BuddyX card wrapper around header ── */
#buddypress #item-header .bp-inner-wrap,
.buddyx-profile-header .bp-inner-wrap,
#buddypress .item-header-wrap {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* ── Tab bar: horizontal, scrollable ── */
#buddypress div.item-list-tabs,
#buddypress #object-nav,
#buddypress nav.bp-navs,
#buddypress .main-navs,
body.buddypress .main-navs,
body.buddypress div.item-list-tabs,
.buddyx-profile-navs {
    background: #fff !important;
    border-top: none !important;
    border-bottom: 1px solid #dddfe2 !important;
    box-shadow: none !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 4px !important;
    max-width: 980px !important;
    margin: 0 auto !important;
}
#buddypress div.item-list-tabs::-webkit-scrollbar,
#buddypress .main-navs::-webkit-scrollbar,
body.buddypress .main-navs::-webkit-scrollbar {
    display: none;
}
#buddypress div.item-list-tabs ul,
#buddypress #object-nav ul,
#buddypress nav.bp-navs ul,
#buddypress .main-navs ul,
body.buddypress .main-navs ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    border: none !important;
    background: transparent !important;
}
#buddypress div.item-list-tabs ul li,
#buddypress .main-navs ul li,
body.buddypress .main-navs ul li {
    flex-shrink: 0 !important;
    float: none !important;
    list-style: none !important;
}
#buddypress div.item-list-tabs ul li a,
#buddypress .main-navs ul li a,
body.buddypress .main-navs ul li a {
    display: block !important;
    padding: 16px 16px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #65676b !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    border-bottom: 3px solid transparent !important;
    background: transparent !important;
    transition: color 0.15s, border-color 0.15s;
}
#buddypress div.item-list-tabs ul li a:hover,
#buddypress .main-navs ul li a:hover,
body.buddypress .main-navs ul li a:hover {
    color: #1c1e21 !important;
    background: rgba(0,0,0,0.03) !important;
}
#buddypress div.item-list-tabs ul li.current a,
#buddypress div.item-list-tabs ul li.selected a,
#buddypress .main-navs ul li.current a,
#buddypress .main-navs ul li.selected a,
body.buddypress .main-navs ul li.current a,
body.buddypress .main-navs ul li.selected a {
    color: #ff1d58 !important;
    border-bottom-color: #ff1d58 !important;
}

/* ── Content area ── */
#buddypress #item-body,
#buddypress .bp-wrap .bp-content,
body.buddypress #item-body {
    max-width: 980px !important;
    margin: 0 auto !important;
    padding: 20px 16px 60px 16px !important;
}

/* ── Hide sub-nav default styling ── */
#buddypress .item-list-tabs#subnav,
#buddypress #subnav {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .buddyx-cover-image,
    .buddyx-cover-image .header-cover-image,
    #buddypress #header-cover-image {
        height: 180px !important;
        min-height: 180px !important;
        border-radius: 0 !important;
    }
    #buddypress #item-header,
    .buddyx-profile-header,
    body.buddypress #item-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0 14px !important;
    }
    #buddypress #item-header .item-header-avatar,
    body.buddypress .item-header-avatar {
        margin-top: -45px !important;
    }
    #buddypress #item-header .item-header-avatar img,
    #buddypress #item-header .item-header-avatar .avatar,
    body.buddypress .item-header-avatar img {
        width: 100px !important;
        height: 100px !important;
        max-width: 100px !important;
        border-width: 4px !important;
    }
    #buddypress #item-header-content h2,
    #buddypress #item-header-content h1 {
        font-size: 22px !important;
    }
    #buddypress div.item-list-tabs ul li a,
    #buddypress .main-navs ul li a,
    body.buddypress .main-navs ul li a {
        padding: 14px 12px !important;
        font-size: 13px !important;
    }
}
