/* Blog Manager Pro — tables.css */

/* ── Table ── */
.bmp-table-scroll { overflow-x: auto; }
.bmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--font);
}
.bmp-table thead th {
    background: var(--c-surf2);
    color: var(--c-subtle);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
}
.bmp-table tbody tr { border-bottom: 1px solid var(--c-border); transition: background .1s; }
.bmp-table tbody tr:last-child { border-bottom: none; }
.bmp-table tbody tr:hover { background: var(--c-surf2); }
.bmp-table tbody td { padding: 12px 14px; color: var(--c-text); vertical-align: middle; }

.bmp-col-num   { color: var(--c-subtle) !important; font-size: 12px !important; width: 36px; }
.bmp-col-topic { max-width: 240px; }
.bmp-topic-wrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-weight: 500; }
.bmp-has-note  { font-size: 14px; cursor: help; margin-left: 4px; }
.bmp-col-email { color: var(--c-muted) !important; font-size: 12px !important; }
.bmp-col-date  { color: var(--c-subtle) !important; font-size: 12px !important; white-space: nowrap; }
.bmp-col-notes { color: var(--c-muted) !important; font-size: 12px !important; max-width: 160px; }
.bmp-nil       { color: var(--c-subtle); }

.bmp-status-sel {
    background: var(--c-surf2);
    border: 1px solid var(--c-border2);
    border-radius: var(--r-sm);
    color: var(--c-text);
    font-family: var(--font);
    font-size: 12px;
    padding: 5px 8px;
    cursor: pointer;
}
.bmp-status-sel:focus { outline: none; border-color: var(--c-primary); }

.bmp-tbl-link { color: var(--c-blue); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 3px; }
.bmp-tbl-link:hover { opacity: .8; }

.bmp-tag {
    background: var(--c-surf2);
    border: 1px solid var(--c-border2);
    padding: 3px 9px;
    border-radius: var(--r-sm);
    font-size: 11px;
    white-space: nowrap;
}
.bmp-tag-blue { background: rgba(88,166,255,.1); border-color: rgba(88,166,255,.2); color: var(--c-blue); }

.bmp-role-tag {
    background: rgba(163,113,247,.12);
    color: var(--c-violet);
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
}

.bmp-status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bmp-status-draft     { background: rgba(139,148,158,.12); color: #8b949e; }
.bmp-status-pending   { background: rgba(240,136,62,.12);  color: #f0883e; }
.bmp-status-published { background: rgba(63,185,80,.12);   color: #3fb950; }
.bmp-status-rejected  { background: rgba(248,81,73,.12);   color: #f85149; }

.bmp-cell-user { display: flex; align-items: center; gap: 10px; }
.bmp-avatar-sm {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-violet));
    color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bmp-av-green { background: linear-gradient(135deg, #10b981, #34d399); }
.bmp-row-btns { display: flex; gap: 5px; }

/* ── Empty states ── */
.bmp-empty-hero {
    text-align: center;
    padding: 80px 30px;
}
.bmp-empty-graphic { font-size: 56px; margin-bottom: 18px; opacity: .6; }
.bmp-empty-hero h3  { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.bmp-empty-hero p   { font-size: 14px; color: var(--c-muted); max-width: 380px; margin: 0 auto 24px; line-height: 1.6; }
.bmp-empty-panel {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.bmp-ep-icon { font-size: 36px; opacity: .5; }
.bmp-empty-panel p { font-size: 13px; color: var(--c-muted); }

/* ── Level badges in team table ──────────────────── */
.bmp-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}
.bmp-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; background: rgba(139,148,158,.1); color: var(--c-muted); }
.bmp-tag-green { background: rgba(63,185,80,.1) !important; color: #3fb950 !important; }
.bmp-tag-link  { background: rgba(88,166,255,.1) !important; color: var(--c-blue) !important; text-decoration: none; }
.bmp-tag-link:hover { background: rgba(88,166,255,.2) !important; }
.bmp-site-tag { background:rgba(88,166,255,.1); border:1px solid rgba(88,166,255,.2); color:#58a6ff; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:600; white-space:nowrap; }
.bmp-tag-blue { background:rgba(88,166,255,.1); color:#58a6ff; }

/* ═══════════════════════════════════════════════════
   HIERARCHICAL BLOG MANAGER (tab-blogs.php)
   ═══════════════════════════════════════════════════ */
.bmp-blog-manager { display: flex; flex-direction: column; gap: 0; }

/* Top action bar */
.bmp-bm-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0 14px; gap: 12px; flex-wrap: wrap;
}
.bmp-bm-topbar-left { display: flex; align-items: center; gap: 10px; }
.bmp-bm-topbar-left h3 { font-size: 16px; font-weight: 700; color: var(--c-text); }
.bmp-bm-topbar-right { display: flex; align-items: center; gap: 8px; }

/* Guide for new users */
.bmp-bm-guide {
    display: flex; align-items: center; gap: 16px;
    background: rgba(99,102,241,.06);
    border: 1px dashed rgba(99,102,241,.3);
    border-radius: var(--r);
    padding: 18px 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.bmp-bm-guide-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.bmp-bm-guide strong { display: block; font-size: 14px; color: var(--c-text); margin-bottom: 3px; }
.bmp-bm-guide p { font-size: 13px; color: var(--c-muted); }
.bmp-bm-guide .bmp-btn { margin-left: auto; flex-shrink: 0; }

/* Site section card */
.bmp-site-section {
    background: var(--c-surf);
    border: 1px solid var(--c-border);
    border-radius: var(--r);
    margin-bottom: 14px;
    overflow: hidden;
}
.bmp-site-section-unassigned { border-style: dashed; }

/* Site section header */
.bmp-site-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; gap: 12px; flex-wrap: wrap;
    background: var(--c-surf2);
    border-bottom: 1px solid var(--c-border);
}
.bmp-site-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bmp-site-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.bmp-site-name { font-size: 15px; font-weight: 700; color: var(--c-text); }
.bmp-site-url  { font-size: 12px; color: var(--c-blue); display: block; margin-top: 1px; }
.bmp-site-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Empty site message */
.bmp-site-empty {
    padding: 20px 18px;
    font-size: 13px; color: var(--c-muted);
    display: flex; align-items: center; gap: 12px;
}

/* Blog table inside site section */
.bmp-bm-table-wrap { overflow-x: auto; }
.bmp-bm-table     { width: 100%; border-collapse: collapse; font-size: 13px; }
.bmp-bm-table thead th {
    background: transparent;
    color: var(--c-subtle); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 9px 14px; text-align: left;
    border-bottom: 1px solid var(--c-border); white-space: nowrap;
}
.bmp-bm-table tbody tr { border-bottom: 1px solid var(--c-border); }
.bmp-bm-table tbody tr:last-child { border-bottom: none; }
.bmp-bm-table tbody tr:hover { background: rgba(255,255,255,.02); }
.bmp-bm-table td { padding: 10px 14px; vertical-align: middle; }
.bmp-col-num   { color: var(--c-subtle) !important; width: 30px; font-size: 12px !important; }
.bmp-col-topic { max-width: 280px; }
.bmp-topic-text { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Writer chip */
.bmp-writer-chip { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-text); }

/* Link button */
.bmp-link-btn { color: var(--c-blue); font-size: 12px; font-weight: 500; }

/* Site locked badge in modal */
.bmp-site-locked { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.25); border-radius: var(--r-sm); }
.bmp-site-lock-badge { font-size: 13px; font-weight: 600; color: var(--c-text); flex: 1; }
.bmp-site-unlock-btn { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--c-muted); padding: 0; transition: color .15s; }
.bmp-site-unlock-btn:hover { color: var(--c-text); }

/* ═══════════════════════════════════════════════════
   STYLED STATUS DROPDOWN (replaces native browser look)
   ═══════════════════════════════════════════════════ */
.bmp-status-wrap {
    position: relative;
    display: inline-block;
}
.bmp-status-wrap::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--sc, #8b949e);
    pointer-events: none;
    transition: border-top-color .15s;
}
.bmp-status-wrap:hover::after { border-top-color: var(--c-text); }
.bmp-status-sel {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: rgba(var(--sc-r, 139), var(--sc-g, 148), var(--sc-b, 158), .12) !important;
    border: 1px solid color-mix(in srgb, var(--sc, #8b949e) 40%, transparent) !important;
    border-radius: var(--r-sm);
    color: var(--sc, #8b949e) !important;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 28px 5px 10px;
    cursor: pointer;
    transition: all .15s;
    min-width: 100px;
}
.bmp-status-sel:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc, #6366f1) 25%, transparent); }
.bmp-status-sel:hover { filter: brightness(1.1); }
.bmp-s-draft     { --sc: #8b949e; }
.bmp-s-pending   { --sc: #f0883e; }
.bmp-s-published { --sc: #3fb950; }
.bmp-s-rejected  { --sc: #f85149; }
.bmp-s-trashed   { --sc: #545d68; }
/* Default option colours (dark theme) */
.bmp-status-sel option { background: #1c2128; color: #e6edf3; font-weight: 500; }
/* Light theme: override hardcoded dark option colours */
#bmp-app.bmp-lt .bmp-status-sel,
#bmp-app.bmp-lt .bmp-status-wrap { filter: none; }
#bmp-app.bmp-lt .bmp-status-sel option { background: #ffffff !important; color: #1c2128 !important; }
#bmp-app.bmp-lt .bmp-status-sel:focus { box-shadow: 0 0 0 2px rgba(99,102,241,.18); }

/* ═══════════════════════════════════════════════════
   SITE PILLS NAVIGATION
   ═══════════════════════════════════════════════════ */
.bmp-site-pills-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 16px;
}
.bmp-site-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--c-surf2);
    border: 1px solid var(--c-border2);
    border-radius: 99px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--c-muted);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.bmp-site-pill:hover {
    background: rgba(99,102,241,.1);
    border-color: rgba(99,102,241,.35);
    color: var(--c-text);
}
.bmp-site-pill-active {
    background: rgba(99,102,241,.15) !important;
    border-color: var(--c-primary) !important;
    color: var(--c-primary) !important;
    box-shadow: 0 0 0 1px rgba(99,102,241,.2);
}
.bmp-pill-count {
    background: var(--c-surf);
    border: 1px solid var(--c-border);
    border-radius: 99px;
    padding: 1px 6px;
    font-size: 10px;
    color: var(--c-subtle);
    min-width: 18px;
    text-align: center;
}
.bmp-site-pill-active .bmp-pill-count {
    background: rgba(99,102,241,.2);
    border-color: rgba(99,102,241,.3);
    color: var(--c-primary);
}

/* ═══════════════════════════════════════════════════
   BULK ACTIONS BAR
   ═══════════════════════════════════════════════════ */
.bmp-bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(99,102,241,.07);
    border: 1px solid rgba(99,102,241,.25);
    border-radius: var(--r);
    margin-bottom: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 63px;
    z-index: 100;
    backdrop-filter: blur(8px);
    animation: bmpBulkIn .15s ease;
}
@keyframes bmpBulkIn {
    from { opacity:0; transform: translateY(-4px); }
    to   { opacity:1; transform: translateY(0); }
}
.bmp-bulk-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.bmp-bulk-chk-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--c-muted);
    cursor: pointer;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid var(--c-border2);
    border-radius: var(--r-sm);
}
.bmp-bulk-chk-label input { cursor: pointer; }
.bmp-bulk-count-label {
    font-size: 12px;
    color: var(--c-text);
    font-weight: 700;
    padding: 0 6px;
    border-left: 1px solid var(--c-border2);
}
.bmp-bulk-bar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}
.bmp-bulk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--c-surf2);
    border: 1px solid var(--c-border2);
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.bmp-bulk-action-btn:hover { background: var(--c-surf); border-color: var(--c-primary); color: var(--c-primary); }
.bmp-bulk-action-warn { color: #f0883e !important; border-color: rgba(240,136,62,.3) !important; }
.bmp-bulk-action-warn:hover { background: rgba(240,136,62,.1) !important; border-color: #f0883e !important; }
.bmp-bulk-action-danger { color: #f85149 !important; border-color: rgba(248,81,73,.3) !important; }
.bmp-bulk-action-danger:hover { background: rgba(248,81,73,.1) !important; border-color: #f85149 !important; }
.bmp-bulk-action-export { color: var(--c-blue) !important; border-color: rgba(88,166,255,.3) !important; }
.bmp-bulk-action-export:hover { background: rgba(88,166,255,.1) !important; border-color: var(--c-blue) !important; }
.bmp-bulk-close-btn {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--c-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--r-sm);
    transition: color .15s;
    flex-shrink: 0;
}
.bmp-bulk-close-btn:hover { color: var(--c-text); background: var(--c-surf2); }

/* Bulk dropdowns */
.bmp-bulk-dropdown {
    position: relative;
    display: inline-flex;
}
.bmp-bulk-dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 160px;
    background: var(--c-surf);
    border: 1px solid var(--c-border2);
    border-radius: var(--r);
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    z-index: 300;
    overflow: hidden;
    display: none;
    animation: bmpDDIn .12s ease;
}
@keyframes bmpDDIn {
    from { opacity:0; transform:translateY(-4px); }
    to   { opacity:1; transform:translateY(0); }
}
.bmp-bulk-dd-menu.bmp-dd-open { display: block; }
.bmp-bulk-dd-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: var(--c-text);
    cursor: pointer;
    text-align: left;
    transition: background .1s;
}
.bmp-bulk-dd-menu button:hover { background: var(--c-surf2); }
.bmp-dd-caret { font-size: 9px; opacity: .7; }
.bmp-dd-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════
   TABLE CONTROL BAR (above tables, select all + import/export)
   ═══════════════════════════════════════════════════ */
.bmp-table-ctrl-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    margin-bottom: 8px;
    gap: 10px;
    flex-wrap: wrap;
}
.bmp-chk-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-muted);
    cursor: pointer;
    user-select: none;
}
.bmp-chk-label input[type=checkbox],
.bmp-bulk-chk-label input[type=checkbox] {
    width: 14px; height: 14px;
    accent-color: var(--c-primary);
    cursor: pointer;
}

/* Checkbox column */
.bmp-chk-col {
    width: 36px !important;
    padding: 10px 8px !important;
    text-align: center;
}
.bmp-chk-col input[type=checkbox] {
    width: 14px; height: 14px;
    accent-color: var(--c-primary);
    cursor: pointer;
}

/* Site section select-all checkbox */
.bmp-site-chk-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.bmp-site-chk-wrap input[type=checkbox] {
    width: 14px; height: 14px;
    accent-color: var(--c-primary);
    cursor: pointer;
}

/* Checked row highlight */
tr.bmp-row-selected { background: rgba(99,102,241,.06) !important; }

/* ═══════════════════════════════════════════════════
   SCROLLABLE TABLES — max 5 rows then scroll
   ═══════════════════════════════════════════════════ */
.bmp-scrollable-table {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 0 0 var(--r) var(--r);
    scrollbar-width: thin;
    scrollbar-color: var(--c-border2) transparent;
}
.bmp-scrollable-table::-webkit-scrollbar { width: 5px; height: 5px; }
.bmp-scrollable-table::-webkit-scrollbar-track { background: transparent; }
.bmp-scrollable-table::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 99px; }
.bmp-scrollable-table::-webkit-scrollbar-thumb:hover { background: var(--c-subtle); }
/* Sticky thead in scrollable tables */
.bmp-scrollable-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--c-surf2) !important;
}

/* Overview scrollable panels */
.bmp-overview-scroll {
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--c-border2) transparent;
}
.bmp-overview-scroll::-webkit-scrollbar { width: 4px; }
.bmp-overview-scroll::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 99px; }

/* ═══════════════════════════════════════════════════
   TRASH UI
   ═══════════════════════════════════════════════════ */
.bmp-trash-toggle-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-muted);
    padding: 4px 10px;
    border: 1px solid var(--c-border2);
    border-radius: 99px;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.bmp-trash-toggle-link:hover { border-color: #f0883e; color: #f0883e; }
.bmp-trash-count-badge {
    background: rgba(248,81,73,.15);
    color: #f85149;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}
.bmp-trash-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(248,81,73,.3);
    gap: 12px;
    flex-wrap: wrap;
}
.bmp-trash-title {
    font-size: 14px;
    font-weight: 700;
    color: #f85149;
    opacity: .8;
}
.bmp-trash-bar-actions { display: flex; align-items: center; gap: 6px; }

/* Icon buttons extra variants */
.bmp-icon-btn-blue {
    color: var(--c-blue) !important;
    border-color: rgba(88,166,255,.3) !important;
}
.bmp-icon-btn-blue:hover { background: rgba(88,166,255,.1) !important; }
.bmp-icon-btn-warn {
    color: #f0883e !important;
    border-color: rgba(240,136,62,.3) !important;
}
.bmp-icon-btn-warn:hover { background: rgba(240,136,62,.1) !important; }

/* Level dot for vault bulk menu */
.bmp-level-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}
.bmp-level-dot.bmp-level-owner       { background: #a371f7; }
.bmp-level-dot.bmp-level-manager     { background: #58a6ff; }
.bmp-level-dot.bmp-level-editor      { background: #3fb950; }
.bmp-level-dot.bmp-level-contributor { background: #f0883e; }
.bmp-level-dot.bmp-level-viewer      { background: #8b949e; }

/* ═══════════════════════════════════════════════════
   VAULT MANAGER WRAPPER
   ═══════════════════════════════════════════════════ */
.bmp-vault-manager { display: flex; flex-direction: column; gap: 0; }

/* ═══════════════════════════════════════════════════
   SITE MEMBER ASSIGNMENT MODAL ROW
   ═══════════════════════════════════════════════════ */
.bmp-assign-member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--c-surf2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}
.bmp-assign-member-row:hover { border-color: var(--c-primary); background: rgba(99,102,241,.06); }
.bmp-assign-member-row input[type=checkbox] {
    width: 14px; height: 14px;
    accent-color: var(--c-primary);
    cursor: pointer;
    flex-shrink: 0;
}
