/**
 * VRGoo Community v3 — Facebook Groups Clone Design
 * Pixel-perfect recreation of Facebook Groups UI (2024)
 */

/* ══════════════════════════════════════════════════════════════════════════════
   CSS VARIABLES — Facebook's exact color system
   ══════════════════════════════════════════════════════════════════════════════ */
:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --border: #ced0d4;
    --divider: #e4e6ea;
    --primary: #1877f2;
    --primary-hover: #166fe5;
    --primary-light: #e7f3ff;
    --primary-bg: #ebf5ff;
    --text: #050505;
    --text-secondary: #65676b;
    --text-muted: #8a8d91;
    --hover: #f2f3f5;
    --active: #e4e6e9;
    --green: #42b72a;
    --green-bg: #e6f7e0;
    --red: #e41e3f;
    --orange: #f7b928;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 50px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.1);
    --shadow: 0 2px 4px rgba(0,0,0,.1), 0 8px 16px rgba(0,0,0,.1);
    --shadow-lg: 0 12px 28px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.08);
    --topbar-h: 130px;  /* B2 site header (top utility bar ~40px + nav bar ~50px + sub-nav ~40px) */
    --sidebar-w: 360px;
    --feed-max: 680px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    --transition: .2s ease;
}

[data-theme="dark"] {
    --bg: #18191a;
    --card: #242526;
    --border: #3e4042;
    --divider: #3e4042;
    --text: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-muted: #8a8d91;
    --hover: #3a3b3c;
    --active: #4e4f50;
    --primary-light: #263951;
    --primary-bg: #1d3a5c;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
    --shadow: 0 2px 4px rgba(0,0,0,.2), 0 8px 16px rgba(0,0,0,.2);
    --shadow-lg: 0 12px 28px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.15);
    --green-bg: #1a3a1a;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.b2cp-body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.3333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
img { max-width: 100%; height: auto; display: block; }
input, textarea, select { font-family: inherit; font-size: inherit; color: var(--text); }

/* Facebook uses this exact scrollbar style */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.3); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); }

/* ══════════════════════════════════════════════════════════════════════════════
   TOP NAVIGATION BAR — Facebook exact clone
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    background: var(--card);
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
}

.b2cp-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}
.b2cp-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.b2cp-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.b2cp-logo span {
    font-weight: 700;
    font-size: 22px;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.b2cp-topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 680px;
    margin: 0 auto;
}
.b2cp-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hover);
    border-radius: var(--radius-full);
    padding: 0 16px;
    height: 40px;
    width: 100%;
    max-width: 320px;
    transition: all var(--transition);
}
.b2cp-search-box:focus-within {
    background: var(--card);
    box-shadow: 0 0 0 2px var(--primary);
}
.b2cp-search-box svg { color: var(--text-secondary); flex-shrink: 0; width: 16px; height: 16px; }
.b2cp-search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 15px;
    color: var(--text);
    height: 100%;
}
.b2cp-search-box input::placeholder { color: var(--text-secondary); }

.b2cp-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: flex-end;
}
.b2cp-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background var(--transition);
    position: relative;
}
.b2cp-icon-btn:hover { background: var(--active); }
.b2cp-icon-btn::after {
    /* notification badge placeholder */
    content: '';
    display: none;
}

.b2cp-user-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition);
}
.b2cp-user-menu:hover { background: var(--hover); }
.b2cp-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
}
.b2cp-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b2cp-login-btn {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 16px;
    height: 36px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background var(--transition);
}
.b2cp-login-btn:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }


/* ══════════════════════════════════════════════════════════════════════════════
   GROUPS HORIZONTAL SLIDER — Facebook Groups discovery bar
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-groups-slider {
    position: fixed;
    top: var(--topbar-h);
    left: var(--sidebar-w);
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--divider);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    z-index: 500;  /* below B2's header (z-index: 9999) */
    height: 80px;
}

.b2cp-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--card);
    box-shadow: var(--shadow);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition);
    opacity: 0.9;
}
.b2cp-slider-arrow:hover { opacity: 1; box-shadow: var(--shadow-lg); transform: translateY(-50%) scale(1.05); }
.b2cp-arrow-left { left: 8px; }
.b2cp-arrow-right { right: 8px; }

.b2cp-slider-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    flex: 1;
}
.b2cp-slider-track::-webkit-scrollbar { display: none; }

.b2cp-group-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 8px 12px;
    cursor: pointer;
    transition: all var(--transition);
    min-width: 220px;
    max-width: 280px;
    position: relative;
    overflow: hidden;
}
.b2cp-group-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hover);
    opacity: 0;
    transition: opacity var(--transition);
}
.b2cp-group-card:hover::before { opacity: 1; }
.b2cp-group-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.b2cp-group-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
}
.b2cp-group-card.active::before { display: none; }

.b2cp-group-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.b2cp-group-card-info { overflow: hidden; flex: 1; position: relative; z-index: 1; }
.b2cp-group-card-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.b2cp-group-card-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.b2cp-group-card-action {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition);
    position: relative;
    z-index: 1;
}
.b2cp-group-card-action.join {
    background: var(--primary);
    color: #fff;
}
.b2cp-group-card-action.join:hover { background: var(--primary-hover); }
.b2cp-group-card-action.visit {
    background: var(--primary-light);
    color: var(--primary);
}
.b2cp-group-card-action.visit:hover { background: #d2e9fc; }
[data-theme="dark"] .b2cp-group-card-action.visit:hover { background: #1d3a5c; }

/* ══════════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT — Facebook Groups exact layout
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-layout {
    display: flex;
    padding-top: calc(var(--topbar-h) + 80px);
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════════════════════
   LEFT SIDEBAR — Facebook Groups sidebar (fixed, 360px)
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: var(--sidebar-w);
    height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    background: var(--card);
    border-right: 1px solid var(--divider);
    padding: 8px 8px 16px;
    z-index: 400;  /* below B2's header */
    scrollbar-width: thin;
}

.b2cp-sidebar-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    padding: 12px 8px 4px;
    letter-spacing: -0.5px;
}

.b2cp-sidebar-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    padding: 16px 8px 8px;
}

.b2cp-sidebar-list { display: flex; flex-direction: column; gap: 2px; }

.b2cp-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text);
}
.b2cp-sidebar-item:hover { background: var(--hover); text-decoration: none; }
.b2cp-sidebar-item.active { background: var(--primary-light); }

.b2cp-sidebar-item img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
}
.b2cp-sidebar-item-info { overflow: hidden; }
.b2cp-sidebar-item-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.b2cp-sidebar-item-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Sidebar nav links (like Facebook's "Your Feed", "Discover", etc.) */
.b2cp-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--divider);
    margin-bottom: 8px;
}
.b2cp-sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}
.b2cp-sidebar-nav-item:hover { background: var(--hover); }
.b2cp-sidebar-nav-item.active { background: var(--primary-light); color: var(--primary); }
.b2cp-sidebar-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.b2cp-sidebar-nav-item.active .b2cp-sidebar-nav-icon {
    background: var(--primary-light);
}


/* ══════════════════════════════════════════════════════════════════════════════
   MAIN FEED — full width right of sidebar
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-feed {
    flex: 1;
    min-width: 0;
    padding: 20px;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMPOSER — Facebook "Create post" box (pixel-perfect clone)
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-composer {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    padding: 12px 16px;
}
.b2cp-composer-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.b2cp-composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.b2cp-composer-trigger {
    flex: 1;
    background: var(--hover);
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 12px;
    height: 40px;
    font-size: 17px;
    color: var(--text-secondary);
    text-align: left;
    transition: background var(--transition);
}
.b2cp-composer-trigger:hover { background: var(--active); }

.b2cp-composer-divider {
    height: 1px;
    background: var(--divider);
    margin: 12px 0 8px;
}

.b2cp-composer-types {
    display: flex;
    margin: 0 -4px;
}
.b2cp-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition);
    margin: 0 4px;
}
.b2cp-type-btn:hover { background: var(--hover); }
.b2cp-type-btn.active { background: var(--primary-light); color: var(--primary); }
.b2cp-type-btn .b2cp-type-icon { font-size: 20px; line-height: 1; }

/* ══════════════════════════════════════════════════════════════════════════════
   MODAL — Facebook modal style (centered overlay)
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.b2cp-modal.open { display: flex; }
.b2cp-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.8);
}
[data-theme="dark"] .b2cp-modal-overlay { background: rgba(0,0,0,.7); }

.b2cp-modal-content {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: b2cp-modal-in .2s ease;
}
@keyframes b2cp-modal-in {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}
.b2cp-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider);
    position: relative;
    min-height: 56px;
}
.b2cp-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}
/* Modal close — prevent layout shift on click */
.b2cp-modal-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--hover);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    color: var(--text-secondary);
    cursor: pointer;
    /* Prevent the button from moving when modal closes */
    z-index: 10;
    flex-shrink: 0;
}
.b2cp-modal-close:hover { background: var(--active); }
.b2cp-modal-close:active { transform: translateY(-50%) scale(0.92); }
.b2cp-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.b2cp-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--divider);
}

/* Composer Modal (expanded) */
.b2cp-composer-expanded { max-width: 500px; }
.b2cp-composer-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.b2cp-composer-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.b2cp-composer-user strong { display: block; font-size: 15px; font-weight: 600; }
.b2cp-circle-select {
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    background: var(--hover);
    color: var(--text);
    outline: none;
}
.b2cp-circle-select:focus { border-color: var(--primary); }

.b2cp-composer-types-modal {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider);
}

.b2cp-post-title {
    width: 100%;
    border: none;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
    color: var(--text);
    outline: none;
    margin-bottom: 4px;
}
.b2cp-post-title::placeholder { color: var(--text-muted); font-weight: 400; }
.b2cp-post-content {
    width: 100%;
    border: none;
    padding: 4px 0;
    font-size: 24px;
    background: transparent;
    color: var(--text);
    outline: none;
    resize: none;
    min-height: 120px;
    line-height: 1.3;
}
.b2cp-post-content::placeholder { color: var(--text-muted); }
/* Smaller font when content is long */
.b2cp-post-content.has-content { font-size: 15px; }

.b2cp-vote-options { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.b2cp-vote-input {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 15px;
    background: transparent;
    color: var(--text);
    outline: none;
    transition: border-color var(--transition);
}
.b2cp-vote-input:focus { border-color: var(--primary); }
.b2cp-add-vote-option {
    border: none;
    background: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    text-align: left;
    padding: 8px 0;
}
.b2cp-add-vote-option:hover { text-decoration: underline; }

/* Media upload area */
.b2cp-media-area {
    margin-top: 12px;
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 8px;
    position: relative;
}
.b2cp-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.b2cp-media-preview .b2cp-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--divider);
}
.b2cp-media-preview .b2cp-preview-item img,
.b2cp-media-preview .b2cp-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.b2cp-media-preview .b2cp-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.b2cp-media-preview .b2cp-preview-item:hover .b2cp-preview-remove { opacity: 1; }

/* Modal footer tools */
.b2cp-composer-tools-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-top: 12px;
}
.b2cp-composer-tools-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.b2cp-composer-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}
.b2cp-tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background var(--transition);
    border: none;
    background: transparent;
}
.b2cp-tool-btn:hover { background: var(--hover); }

.b2cp-submit-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 0;
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition);
    height: 36px;
}
.b2cp-submit-btn:hover:not(:disabled) { background: var(--primary-hover); }
.b2cp-submit-btn:disabled { background: var(--active); color: var(--text-muted); cursor: not-allowed; }


/* ══════════════════════════════════════════════════════════════════════════════
   POST CARDS — Facebook post exact design
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-posts { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 700px; }

.b2cp-composer { width: 100%; max-width: 700px; }

.b2cp-load-more { width: 100%; max-width: 700px; text-align: center; padding: 16px; }

.b2cp-post {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Post Header — avatar, name, time, group badge, 3-dot menu */
.b2cp-post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px 0;
}
.b2cp-post-header-left {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}
.b2cp-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.b2cp-post-header-info { flex: 1; min-width: 0; }
.b2cp-post-author {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    line-height: 1.2;
}
.b2cp-post-author:hover { text-decoration: underline; cursor: pointer; }
.b2cp-post-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    flex-wrap: wrap;
}
.b2cp-post-meta-dot::before { content: '·'; margin: 0 2px; }
.b2cp-post-group-name {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}
.b2cp-post-group-name:hover { text-decoration: underline; cursor: pointer; }
.b2cp-post-time { color: var(--text-secondary); }
.b2cp-post-time:hover { text-decoration: underline; cursor: pointer; }
.b2cp-post-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    margin-left: 4px;
}

.b2cp-post-more {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 20px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    flex-shrink: 0;
}
.b2cp-post-more:hover { background: var(--hover); }

/* Post Body — text content */
.b2cp-post-body { padding: 8px 16px 12px; }
.b2cp-post-title-text {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
    line-height: 1.3;
}
.b2cp-post-text {
    font-size: 15px;
    line-height: 1.3333;
    color: var(--text);
    word-break: break-word;
    white-space: pre-wrap;
}
.b2cp-post-text.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.b2cp-see-more {
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    border: none;
    background: none;
    padding: 0;
    margin-top: 4px;
}
.b2cp-see-more:hover { text-decoration: underline; }

/* Post Media — images/video */
.b2cp-post-media {
    margin: 0;
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
}
.b2cp-post-media img {
    width: 100%;
    cursor: pointer;
    transition: filter var(--transition);
}
.b2cp-post-media img:hover { filter: brightness(.97); }
.b2cp-post-media video {
    width: 100%;
    max-height: 500px;
    background: #000;
    display: block;
}
.b2cp-media-grid {
    display: grid;
    gap: 2px;
}
.b2cp-media-grid.grid-1 { grid-template-columns: 1fr; }
.b2cp-media-grid.grid-2 { grid-template-columns: 1fr 1fr; }
.b2cp-media-grid.grid-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.b2cp-media-grid.grid-3 > :first-child { grid-row: span 2; }
.b2cp-media-grid.grid-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.b2cp-media-grid .b2cp-media-item {
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.b2cp-media-grid .b2cp-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 150px;
}
.b2cp-media-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

/* Vote box */
.b2cp-vote-box { padding: 8px 16px 12px; }
.b2cp-vote-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--hover);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}
.b2cp-vote-item:hover { background: var(--active); }
.b2cp-vote-item.voted { border-color: var(--primary); background: var(--primary-light); }
.b2cp-vote-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--primary-light);
    border-radius: var(--radius);
    transition: width .6s cubic-bezier(.4,0,.2,1);
    z-index: 0;
}
[data-theme="dark"] .b2cp-vote-bar { background: var(--primary-bg); }
.b2cp-vote-text { position: relative; z-index: 1; flex: 1; font-size: 15px; font-weight: 500; }
.b2cp-vote-pct { position: relative; z-index: 1; font-size: 15px; font-weight: 700; color: var(--primary); }

/* ══════════════════════════════════════════════════════════════════════════════
   REACTIONS BAR — Facebook exact (emoji icons + count / comments + shares)
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-post-reactions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 0;
    min-height: 32px;
}
.b2cp-post-reactions-left {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.b2cp-post-reactions-left:hover .b2cp-reaction-count { text-decoration: underline; }
.b2cp-reaction-icons {
    display: flex;
    /* Facebook stacks reaction emojis with overlap */
}
.b2cp-reaction-icons span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-right: -3px;
    border: 2px solid var(--card);
    position: relative;
}
/* Background colors for reaction emoji circles */
.b2cp-reaction-icons span[data-type="like"] { background: var(--primary); }
.b2cp-reaction-icons span[data-type="love"] { background: #f33e58; }
.b2cp-reaction-icons span[data-type="haha"],
.b2cp-reaction-icons span[data-type="wow"],
.b2cp-reaction-icons span[data-type="sad"] { background: #f7b928; }
.b2cp-reaction-icons span[data-type="angry"] { background: #e9710f; }

.b2cp-reaction-count {
    margin-left: 6px;
    font-size: 15px;
    color: var(--text-secondary);
}
.b2cp-post-reactions-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
}
.b2cp-post-reactions-right span:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════════
   POST FOOTER — Like, Comment, Share buttons (Facebook exact layout)
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-post-footer {
    display: flex;
    align-items: center;
    margin: 0 16px;
    padding: 4px 0;
    border-top: 1px solid var(--divider);
}
.b2cp-footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all .1s ease;
    position: relative;
    height: 40px;
}
.b2cp-footer-btn:hover { background: var(--hover); }
.b2cp-footer-btn:active { background: var(--active); transform: scale(.97); }
.b2cp-footer-btn.reacted { color: var(--primary); }
.b2cp-footer-btn .b2cp-footer-icon {
    font-size: 20px;
    line-height: 1;
}

/* Reaction Popup — Facebook floating bar */
.b2cp-reaction-popup {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(.3);
    transform-origin: bottom center;
    background: var(--card);
    border-radius: var(--radius-full);
    padding: 4px 8px;
    display: flex;
    gap: 2px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    z-index: 100;
}
/* Only show popup with .visible class (JS controlled) - NOT on pure CSS hover */
.b2cp-reaction-popup.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}
.b2cp-reaction-popup button {
    background: none;
    border: none;
    font-size: 32px;
    padding: 4px 2px;
    border-radius: 50%;
    transition: transform .2s cubic-bezier(.4,0,.2,1);
    line-height: 1;
}
.b2cp-reaction-popup button:hover {
    transform: scale(1.35) translateY(-4px);
}


/* ══════════════════════════════════════════════════════════════════════════════
   COMMENTS — Facebook exact comment design
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-comment-panel {
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.b2cp-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.b2cp-comment {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    padding: 4px 0;
}
.b2cp-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}
.b2cp-comment-body { flex: 1; min-width: 0; }
.b2cp-comment-bubble {
    background: var(--hover);
    border-radius: 18px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 100%;
}
.b2cp-comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    line-height: 1.2;
}
.b2cp-comment-author:hover { text-decoration: underline; cursor: pointer; }
.b2cp-comment-text {
    font-size: 15px;
    color: var(--text);
    line-height: 1.3333;
    word-break: break-word;
    margin-top: 2px;
}
.b2cp-comment-actions {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 2px 12px;
    font-size: 12px;
}
.b2cp-comment-action {
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 0 4px;
}
.b2cp-comment-action:hover { text-decoration: underline; }
.b2cp-comment-action.liked { color: var(--primary); }
.b2cp-comment-time { font-size: 12px; color: var(--text-muted); padding: 0 4px; }
.b2cp-comment-separator { color: var(--text-muted); font-size: 12px; }

/* Replies (Facebook indented style) */
.b2cp-comment-replies {
    margin-left: 38px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}
.b2cp-comment-replies .b2cp-comment-avatar { width: 24px; height: 24px; }

.b2cp-view-replies-btn {
    margin-left: 38px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.b2cp-view-replies-btn:hover { text-decoration: underline; }
.b2cp-view-replies-btn::before { content: '↳'; }

/* Comment Input — Facebook style */
.b2cp-comment-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--divider);
}
.b2cp-comment-input-area .b2cp-comment-avatar {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
}
.b2cp-comment-input-wrap {
    flex: 1;
    background: var(--hover);
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    position: relative;
    min-height: 40px;
}
.b2cp-comment-input-wrap textarea {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: var(--text);
    resize: none;
    padding: 0;
    line-height: 1.3333;
    max-height: 120px;
    min-height: 20px;
}
.b2cp-comment-input-wrap textarea::placeholder { color: var(--text-muted); }
.b2cp-comment-tools {
    display: flex;
    align-items: center;
    gap: 2px;
}
.b2cp-comment-tool-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
    transition: background var(--transition);
}
.b2cp-comment-tool-btn:hover { background: var(--active); }
.b2cp-comment-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0.4;
}
.b2cp-comment-send.active,
.b2cp-comment-send:not(:disabled):hover { opacity: 1; transform: scale(1.05); }
.b2cp-comment-send:disabled { opacity: 0.3; cursor: not-allowed; }

/* Mention dropdown */
.b2cp-mention-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 240px;
    overflow-y: auto;
    z-index: 300;
}
.b2cp-mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background .05s;
}
.b2cp-mention-item:hover { background: var(--hover); }
.b2cp-mention-item img { width: 36px; height: 36px; border-radius: 50%; }
.b2cp-mention-item-info { flex: 1; }
.b2cp-mention-item-name { font-size: 15px; font-weight: 600; }
.b2cp-mention-item-handle { font-size: 13px; color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════════════════════
   LOADING STATES — Facebook skeleton shimmer
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-skeleton {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin-bottom: 16px;
}
.b2cp-skeleton-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.b2cp-skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hover);
    animation: b2cp-shimmer 2s infinite;
}
.b2cp-skeleton-lines { flex: 1; }
.b2cp-skeleton-line {
    height: 12px;
    background: var(--hover);
    border-radius: 4px;
    margin-bottom: 8px;
    animation: b2cp-shimmer 2s infinite;
}
.b2cp-skeleton-line:nth-child(1) { width: 50%; animation-delay: .1s; }
.b2cp-skeleton-line:nth-child(2) { width: 30%; animation-delay: .2s; }
.b2cp-skeleton-body {
    height: 200px;
    background: var(--hover);
    border-radius: var(--radius);
    animation: b2cp-shimmer 2s infinite .3s;
}
.b2cp-skeleton-footer {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.b2cp-skeleton-btn {
    flex: 1;
    height: 32px;
    background: var(--hover);
    border-radius: 4px;
    animation: b2cp-shimmer 2s infinite .4s;
}

@keyframes b2cp-shimmer {
    0% { opacity: 1; }
    50% { opacity: .4; }
    100% { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   LOAD MORE
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-load-more { text-align: center; padding: 16px 0; }
.b2cp-loadmore-btn {
    background: transparent;
    color: var(--primary);
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 6px;
    transition: all var(--transition);
}
.b2cp-loadmore-btn:hover { background: var(--primary-light); }

/* Spinner */
.b2cp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--divider);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: b2cp-spin .6s linear infinite;
}
@keyframes b2cp-spin { to { transform: rotate(360deg); } }


/* ══════════════════════════════════════════════════════════════════════════════
   TOAST / SNACKBAR
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}
.b2cp-toast.show { transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════════════════════════════════
   SCROLL TO TOP
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    border: none;
    font-size: 20px;
    box-shadow: var(--shadow);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 800;
    transition: all var(--transition);
}
.b2cp-scroll-top.visible { display: flex; }
.b2cp-scroll-top:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.b2cp-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: .5;
}
.b2cp-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.b2cp-empty-text {
    font-size: 15px;
    max-width: 400px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — Facebook mobile experience
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    :root { --sidebar-w: 300px; }
    .b2cp-groups-slider { left: var(--sidebar-w); }
}

@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }
    .b2cp-sidebar { display: none; }
    .b2cp-groups-slider { left: 0; height: 70px; padding: 10px 40px; }
    .b2cp-feed {
        margin-left: 0;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .b2cp-topbar-center { display: none; }
    .b2cp-user-name { display: none; }
    .b2cp-topbar { padding: 0 8px; }

    .b2cp-groups-slider { padding: 8px 32px; height: 64px; }
    .b2cp-group-card { min-width: 180px; padding: 6px 10px; }
    .b2cp-group-card-icon { width: 40px; height: 40px; }
    .b2cp-group-card-action { padding: 4px 10px; font-size: 12px; }

    .b2cp-layout { padding-top: calc(var(--topbar-h) + 64px); }
    .b2cp-feed { padding: 8px 0; }

    .b2cp-post { border-radius: 0; box-shadow: none; border-bottom: 8px solid var(--bg); }
    .b2cp-composer { border-radius: 0; margin-bottom: 8px; box-shadow: none; border-bottom: 8px solid var(--bg); }

    .b2cp-footer-btn span:not(.b2cp-footer-icon) { display: none; }

    .b2cp-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .b2cp-groups-slider { padding: 8px 28px; height: 58px; }
    .b2cp-group-card { min-width: 150px; padding: 4px 8px; gap: 8px; }
    .b2cp-group-card-icon { width: 36px; height: 36px; }
    .b2cp-group-card-name { font-size: 13px; }
    .b2cp-group-card-action { display: none; }

    .b2cp-layout { padding-top: calc(var(--topbar-h) + 58px); }

    .b2cp-composer-types .b2cp-type-btn span { display: none; }
    .b2cp-composer-types .b2cp-type-btn .b2cp-type-icon { font-size: 22px; }
    .b2cp-composer-types .b2cp-type-btn { padding: 10px; }

    .b2cp-post-header { padding: 8px 12px 0; }
    .b2cp-post-body { padding: 8px 12px; }
    .b2cp-post-footer { margin: 0 12px; }
    .b2cp-post-reactions { padding: 8px 12px 0; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PRINT HIDDEN
   ══════════════════════════════════════════════════════════════════════════════ */
@media print {
    .b2cp-topbar, .b2cp-sidebar, .b2cp-groups-slider,
    .b2cp-composer, .b2cp-scroll-top { display: none !important; }
    .b2cp-layout { padding-top: 0; }
    .b2cp-feed { margin-left: 0; max-width: 100%; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   JOINED BUTTON STATE
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-group-card-action.joined {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green);
}
.b2cp-group-card-action.joined:hover {
    background: #d0f0c0;
    cursor: pointer;
}
[data-theme="dark"] .b2cp-group-card-action.joined {
    background: rgba(66, 183, 42, 0.15);
    border-color: var(--green);
}

/* ══════════════════════════════════════════════════════════════════════════════
   ICON FALLBACK (letter avatar when no image)
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-icon-fallback {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #1877f2, #42b72a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}
.b2cp-icon-fallback.b2cp-icon-small {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

/* Fix SVG icons in slider to have proper dimensions */
svg.b2cp-group-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   COMMENT EDIT / DELETE
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-edit-comment-btn,
.b2cp-delete-comment-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition);
}
.b2cp-edit-comment-btn:hover { color: var(--primary); }
.b2cp-delete-comment-btn:hover { color: var(--red); }

.b2cp-inline-edit {
    width: 100%;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    resize: none;
    outline: none;
    margin-top: 4px;
    line-height: 1.4;
}
.b2cp-inline-edit-btns {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.b2cp-save-edit {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.b2cp-save-edit:hover { background: var(--primary-hover); }
.b2cp-cancel-edit {
    background: var(--hover);
    color: var(--text);
    border: none;
    border-radius: var(--radius);
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.b2cp-cancel-edit:hover { background: var(--active); }

/* ══════════════════════════════════════════════════════════════════════════════
   POST ACTIONS DROPDOWN (⋯ menu)
   ══════════════════════════════════════════════════════════════════════════════ */
.b2cp-post-actions-wrap {
    position: relative;
    flex-shrink: 0;
}
.b2cp-post-actions-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 600;
    overflow: hidden;
}
.b2cp-post-actions-menu.open { display: block; }
.b2cp-post-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}
.b2cp-post-action-item:hover { background: var(--hover); }
.b2cp-post-action-item.danger { color: var(--red); }
.b2cp-post-action-item.danger:hover { background: #fff0f0; }
[data-theme="dark"] .b2cp-post-action-item.danger:hover { background: #3a1010; }

/* Edit post inline */
.b2cp-post-edit-area {
    padding: 8px 16px 12px;
    display: none;
}
.b2cp-post-edit-area.open { display: block; }
.b2cp-post-edit-textarea {
    width: 100%;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
    outline: none;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.4;
}
.b2cp-post-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}
.b2cp-post-edit-save {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.b2cp-post-edit-save:hover { background: var(--primary-hover); }
.b2cp-post-edit-cancel {
    background: var(--hover);
    color: var(--text);
    border: none;
    border-radius: 6px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
