:root{
  --w2d-primary:#3713ed;
  --w2d-primary-hover:#4360f0;
}

/* Map Facebook-like vars to your primary color */
.fbp-card{
  --ink: var(--w2d-primary);
  --muted:#65676B;
  --text:#111;
  --border:#e5e7eb;
}

/* Existing w2dm look (kept) */
.w2dm-card{max-width:920px;margin:1rem auto;padding:0;border-radius:1rem;border:1px solid rgba(0,0,0,.08);box-shadow:0 6px 24px rgba(0,0,0,.06);background:#fff;overflow:hidden}
.w2dm-title{font-size:1.4rem;margin:0}
.w2dm-sub{color:#555;margin:.25rem 0 0}
.w2dm-section{display:block;margin:1rem 0;padding:0 1rem}
.w2dm-grid{display:grid;gap:.5rem}
.w2dm-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.w2dm-input, textarea, select, input[type="text"], input[type="url"], input[type="number"]{width:100%;padding:.7rem;border-radius:.75rem;border:1px solid #ddd;outline:none}
.w2dm-button{padding:5px 5px;border:0;border-radius:.75rem;background:var(--w2d-primary);color:#fff;cursor:pointer}
.w2dm-button:hover{background:var(--w2d-primary-hover)}
.w2dm-button-secondary{padding:5px 5px;border:1px solid #ddd;border-radius:.7rem;background:#fff;color:#111;cursor:pointer}

/* Header / banner */
.w2dm-header{position:relative}
.w2dm-banner{position:relative;height:220px;background:linear-gradient(120deg,#ecebff,#f7f7ff);background-size:cover;background-repeat:no-repeat;background-position:center 50%}
.w2dm-banner-controls{position:absolute;top:.75rem;right:.75rem;display:flex;gap:.5rem;align-items:center}
.w2dm-edit-banner-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:.5rem;align-items:center;z-index:3;pointer-events:auto;}
.w2dm-range-stack{display:flex;flex-direction:column;align-items:center}
.w2dm-range-stack input{width:300px}

/* Avatar + identity layout */
.w2dm-header-bottom{position:relative;display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:end;padding:0 1rem 1rem}
.w2dm-avatar-wrap{position:relative;transform:translateY(-50%); margin-top:-48px; text-align:center}
.w2dm-avatar-img{width:140px;height:140px;border-radius:9999px!important;object-fit:cover;aspect-ratio:1/1;border:4px solid #bbb;box-shadow:0 6px 18px rgba(0,0,0,.12);background:#fff;display:block}
.w2dm-avatar-wrap.is-online .w2dm-avatar-img{border-color:#22c55e}
.w2dm-online-label{position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);font-size:.75rem;padding:.15rem .45rem;border-radius:.5rem;background:#22c55e;color:#fff;border:1px solid rgba(0,0,0,.08);pointer-events:none}
.w2dm-upload-avatar-overlay{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.35);border-radius:9999px;cursor:pointer}
#w2dm-profile:not(.is-edit) .w2dm-upload-avatar-overlay{display:none}

.w2dm-header-info{display:flex;justify-content:space-between;align-items:flex-end;padding-bottom:.25rem}
.w2dm-handle{display:inline-block;padding:.35rem .6rem;border-radius:.6rem;background:#f4f5ff;color:#2b2f7b;border:1px solid #e6e8ff}

/* Tabs */
.w2dm-tabs{display:flex;gap:.25rem;overflow:auto;padding:.15rem .75rem;border-top:1px solid #eee;border-bottom:1px solid #eee;background:#fff}
.w2dm-tab{display:inline-block;padding:.3rem .5rem;border-radius:.75rem;white-space:nowrap;color:var(--w2d-primary)}
.w2dm-tab.is-active{background:var(--w2d-primary);color:#fff}
.w2dm-tab:not(.is-active):hover{background:#f1f3ff;color:var(--w2d-primary-hover)}
.w2dm-tabpanel{padding:.75rem 1rem;min-height:140px;position:relative}
.w2dm-loader{position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.68);border-radius:.75rem}
.w2dm-spinner{width:28px;height:28px;border-radius:50%;border:3px solid #bbb;border-top-color:var(--w2d-primary);animation:w2dm-spin 1s linear infinite}
@keyframes w2dm-spin{to{transform:rotate(360deg)}}

/* Edit mode */
#w2dm-profile:not(.is-edit) .w2dm-edit-only{display:none}
#w2dm-profile.is-edit .w2dm-edit-only{display:block}
.w2dm-edit-panel{padding:0 1rem 1rem}
.w2dm-edit-grid{display:grid;gap:.75rem}
.w2dm-edit-grid-a1{grid-template-columns:1fr 1fr}
.w2dm-edit-bio{grid-column:1/-1}
@media (max-width:640px){ .w2dm-edit-grid-a1{grid-template-columns:1fr} }

/* Header action buttons */
.w2dm-banner-controls .w2dm-button,
.w2dm-banner-controls .w2dm-button-secondary{padding:8px 16px;border-radius:9999px;box-shadow:0 4px 10px rgba(0,0,0,.08);transition:all .2s ease}

/* Organisers (under name, above tabs) */
.fbp-name{margin:0;font-size:24px;font-weight:700;color:var(--text)}
.fbp-handle{font-size:14px;color:var(--muted);margin-top:2px}
.fbp-identity{position:relative;z-index:3}

.fbp-orgs{margin-top:12px}
.fbp-section-title{font-size:14px;color:var(--muted);margin:0 0 8px 0;font-weight:700}
.fbp-orgs-list{list-style:none;margin:0;padding:0;display:flex;gap:12px;overflow-x:auto}
.fbp-org-item{flex:0 0 auto}
.fbp-org-card{display:flex;align-items:center;gap:8px;text-decoration:none;border:1px solid var(--border);border-radius:12px;background:#fff;padding:6px 10px;min-width:180px}
.fbp-org-thumb{width:60px;height:60px;border-radius:8px;background:#f3f4f6;background-size:cover;background-position:center;flex:0 0 60px}
.fbp-org-title{font-weight:600;color:#111;display:block}

/* Pill badges */
.fbp-badge{display:inline-block;font-size:11px;line-height:1;padding:3px 6px;border-radius:999px;font-weight:600;margin-top:2px}
.fbp-badge-ink{background:var(--ink);color:#fff}
.fbp-badge-muted{background:#f0f2f5;color:var(--muted)}

@media (max-width:800px){
  .w2dm-avatar-img{width:96px;height:96px}
  .fbp-name{font-size:20px}
  .fbp-org-card{min-width:160px}
}


.fbp-orgs-list {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding-bottom:4px;
}
/* Role badges for organisers */
.fbp-badge {
  display:inline-block;
  font-size:11px;
  line-height:1;
  padding:4px 8px;
  border-radius:999px;
  font-weight:600;
  vertical-align:middle;
}
.fbp-badge-ink {
  background:var(--ink);
  color:#fff;
}
.fbp-badge-muted {
  background:#f0f2f5;
  color:var(--muted);
}


/* Remove bullets from the organiser strip, no matter what the theme sets */
#w2dm-profile .fbp-orgs-list,
#w2dm-profile .fbp-orgs-list li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}
#w2dm-profile .fbp-orgs-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  /* also remove UA padding on UL */
  padding-inline-start: 0 !important;
}
#w2dm-profile .fbp-orgs-list li::marker { content: "" !important; }


/* FORCE name/handle next to avatar (one row), organisers under identity */
.fbp-header{
  display:grid;
  grid-template-columns:140px 1fr auto;           /* avatar | identity | actions */
  grid-template-areas:"avatar identity actions";
  gap:16px;
  align-items:end;
  padding:0 var(--gap) 12px;
  margin-top:-72px; /* keep the FB overlap */
}

.fbp-avatar-wrap{
  grid-area:avatar;
  position:relative;
  width:140px; height:140px;
  border-radius:50%;
  border:4px solid #fff;
  overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.15);
  /* IMPORTANT: remove any transforms that push it off the grid baseline */
  transform:none !important;
  margin-top:0 !important;
}

.fbp-identity{
  grid-area:identity;
  align-self:end;      /* line up to the bottom like FB */
  min-width:0;         /* allow text to shrink instead of wrapping early */
}

.fbp-actions{
  grid-area:actions;
  align-self:end;
  display:flex; gap:8px; padding-bottom:8px;
}

/* Name + handle look */
.fbp-name{ margin:0; font-size:28px; font-weight:700; color:var(--text) }
.fbp-handle{ font-size:14px; color:var(--muted); margin-top:2px }

/* Responsive tweak */
@media (max-width:800px){
  .fbp-header{ grid-template-columns:96px 1fr; grid-template-areas:"avatar identity" "actions actions"; gap:12px; margin-top:-56px }
  .fbp-avatar-wrap{ width:96px; height:96px }
  .fbp-name{ font-size:22px }
}


/* Make the organisers container behave horizontally even without Swiper CSS */
#w2d-orgs-swiper{ padding:4px 0; overflow:hidden }
#w2d-orgs-swiper .swiper-wrapper{ display:flex; align-items:stretch }
#w2d-orgs-swiper .swiper-slide{ width:auto; flex:0 0 auto }

/* === Force name/handle to show beside avatar and be visible === */
.fbp-header{
  display:grid !important;
  grid-template-columns:140px 1fr auto !important;  /* avatar | identity | actions */
  gap:16px !important;
  align-items:end !important;
  margin-top:-72px !important; /* keep FB overlap */
  padding:0 var(--gap) 12px !important;
}
.fbp-avatar-wrap{
  position:relative; width:140px; height:140px;
  border-radius:50%; border:4px solid #fff; overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.15);
  transform:none !important;         /* kill any old translate */
  margin-top:0 !important;           /* keep it on the grid baseline */
  z-index:3;                         /* above the cover */
}
.fbp-identity{
  align-self:end !important;
  min-width:0;
  position:relative; z-index:3;      /* ensure over the cover gradient */
}
.fbp-name{
  margin:0; font-size:28px; font-weight:700;
  color:#111 !important;             /* force visible text */
}
.fbp-handle, .fbp-handle-right{
  font-size:14px; color:#65676B !important; margin-top:2px;
}

/* Mobile layout keeps identity next to avatar, actions below */
@media (max-width:800px){
  .fbp-header{
    grid-template-columns:96px 1fr !important;
    grid-auto-rows:auto;
    gap:12px !important;
    margin-top:-56px !important;
  }
  .fbp-avatar-wrap{ width:96px; height:96px }
  .fbp-name{ font-size:22px }
  .fbp-actions{ grid-column:1 / -1 }
}

/* Name to the left + handle as a pill label */
.fbp-identity{ text-align:left; }
.fbp-name-row{
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
}
.fbp-name{
  margin:0;
  font-size:28px;
  font-weight:700;
  color:#111;
}
.fbp-handle-badge{
  display:inline-block;
  font-size:12px;
  line-height:1;
  padding:4px 8px;
  border-radius:999px;
  font-weight:600;
  background:#f4f5ff;
  color:#2b2f7b;
  border:1px solid #e6e8ff;
}

/* (Optional) tighten on mobile */
@media (max-width:800px){
  .fbp-name{ font-size:22px; }
}

/* Hide organisers section title */
.fbp-section-title {
  display: none !important;
}

/* Force hide organisers title */
#w2dm-profile .fbp-orgs .fbp-section-title {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* Organiser / Member role badge */
.fbp-badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 4px;
  white-space: nowrap;
}

.fbp-badge-ink {
  background: var(--ink);
  color: #fff;
}

.fbp-badge-muted {
  background: #f0f2f5;
  color: var(--muted);
}

.fbp-badge {
  display:inline-block !important;
  font-size:11px;
  line-height:1;
  padding:4px 8px;
  border-radius:999px;
  font-weight:600;
  margin-top:4px;
  vertical-align:middle;
}
.fbp-badge-ink { background:var(--ink); color:#fff; }   /* Organiser */
.fbp-badge-muted { background:#f0f2f5; color:var(--muted); } /* Member */

/* Timeline feed */
.fbp-feed { display:flex; flex-direction:column; gap:16px; }

.fbp-post {
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  padding:12px 16px;
}

.fbp-post-header {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.fbp-post-header img {
  width:40px; height:40px; border-radius:50%; object-fit:cover;
}
.fbp-post-user {
  font-weight:600;
  color:#111;
}
.fbp-post-time {
  font-size:12px;
  color:#65676B;
}

.fbp-post-content { margin:8px 0; line-height:1.4; }
.fbp-post-photo {
  width:100%; border-radius:10px; margin-top:8px;
}

.fbp-post-actions {
  display:flex;
  gap:16px;
  padding-top:8px;
  border-top:1px solid #e5e7eb;
  font-size:14px;
  color:#65676B;
}
.fbp-post-actions button {
  background:none;
  border:0;
  cursor:pointer;
  color:inherit;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:4px;
}
.fbp-post-actions button:hover {
  color:var(--ink);
}

/* Wrapper for actions */
.fbp-composer-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Add Photo button (inside label) */
.fbp-action-btn button {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  background: #f0f2f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  color: #111;
  transition: all .2s ease;
}

.fbp-action-btn button:hover {
  background: #e4e6eb;
  border-color: #ccc;
}

/* Post button */
.fbp-btn-post {
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: var(--ink, #1b74e4);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease;
}

.fbp-btn-post:hover {
  background: #1558c0;
}


.fbp-action-btn button {
  background: #f0f2f5 !important;
}

.fbp-post-actions .is-active { color: var(--ink); }
.fbp-comments { margin-top:8px; border-top:1px solid #e5e7eb; padding-top:8px; }
.fbp-comment { display:flex; gap:8px; margin-top:8px; }
.fbp-comment img { width:32px; height:32px; border-radius:50%; object-fit:cover; }
.fbp-comment-user { font-weight:600; color:#111; }
.fbp-comment-text { color:#111; }
.fbp-comment-form { display:flex; gap:8px; margin-top:8px; }
.fbp-comment-form .js-comment-input { flex:1; padding:8px 10px; border:1px solid #e5e7eb; border-radius:8px; }
.fbp-comment-form .js-comment-send { padding:6px 12px; border-radius:8px; border:0; background:var(--ink,#1b74e4); color:#fff; cursor:pointer; }

/* W2D Member: prevent bottom-avatar bleed on shortcode pages */
.w2dm-page #mobile-panel[aria-hidden="false"] ~ .w2d-tabbar .w2d-tab-avatar,
.w2dm-page body.w2d-drawer-open .w2d-tabbar .w2d-tab-avatar{
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  will-change: auto !important;   /* avoid compositor ghosts */
  transform: none !important;
  filter: none !important;
}

/* Drawer header text never squishes */
.w2d-panel__profile{ grid-template-columns:56px minmax(0,1fr); }
.w2d-panel__who{ min-width:0; }
.w2d-panel__profile .w2d-name{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }




