/* ──────────────────────────────────────────────────────────────────────────
   newsfeed.css — styles for the newsfeed section header bar and panels
   on /newsfeed (newsfeed_main.php). Extends .subs-section-header from
   homepage.css with newsfeed-specific buttons, toggle, layout, and the
   Algorithm Control popup panel.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Poppins (self-hosted, no CDN) — fonts live in /fonts/Poppins/ ── */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Right quick-nav panel: markup in includes/nav_quick_panel.php, styles in
   the global css/nav_quick_panel.css (linked by includes/page_header_bar.php). */

/* ── SHOW NEW MEMBERS toggle (matches script_nav_page.php original) ── */
.mh-show-new-members{position:absolute;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;margin-left:10px;line-height:1;}
.mh-snm-label{font-size:11px;font-weight:bold;color:#000;text-transform:uppercase;}
.mh-snm-switch{position:relative;display:inline-block;cursor:pointer;}
.mh-snm-switch input{display:none;}
.mh-snm-pill{position:relative;width:60px;height:22px;border-radius:999px;display:flex;align-items:center;justify-content:space-between;padding:0 7px;box-sizing:border-box;font-size:11px;font-weight:bold;color:#fff;background:#d9534f;border:1px solid #b52b27;}
.mh-snm-pill:after{content:"";position:absolute;left:3px;top:50%;transform:translateY(-50%);width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.15);transition:left .15s;}
.mh-snm-on{opacity:.35;}
#toggle_show_new_members:checked + .mh-snm-pill{background:#28a745;border-color:#1f7a33;}
#toggle_show_new_members:checked + .mh-snm-pill:after{left:41px;}
#toggle_show_new_members:checked + .mh-snm-pill .mh-snm-on{opacity:1;}
#toggle_show_new_members:checked + .mh-snm-pill .mh-snm-off{opacity:.35;}

/* ── Action buttons row (dropdown + buttons inline) ── */
.nf-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    flex-wrap: wrap;
}

/* Buttons match the shared .ph-nav-page-select dropdown (nav_page_select.css) */
/* S586: THE MASTER. These values define css/mh_ui.css's button tokens (fallbacks = the measured values). */
.nf-header-btn {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-weight: normal;
    font-size: var(--mh-btn-fs, 13.34px);
    border: var(--mh-btn-border, 1px solid #000);
    border-radius: var(--mh-ctl-radius, 4px);
    background: #fff;
    color: #333;
    cursor: pointer;
    padding: var(--mh-btn-pad, 3px 8px);
    height: var(--mh-ctl-h, 30px);
    min-width: var(--mh-btn-min-w, 140px);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    margin: 6px 0 0 0;
}
.nf-header-btn:hover {
    background: #eee;
}
/* Active state — set while the Algorithm Control popup is open */
.nf-btn-algorithm.nf-btn-active {
    font-weight: bold;
}

/* Greyed-out state for free members */
.nf-btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.nf-btn-disabled:hover {
    background: #fff;
    color: #333;
}
.nf-btn-disabled.nf-btn-algorithm,
.nf-btn-disabled.nf-btn-algorithm:hover {
    background: #2a2c50;
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .nf-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin: 14px 4px 14px 4px;
    }
    .nf-section-header .subs-nav-left { min-width: 0; }
    /* sizing/centering comes from the global nav_quick_panel.css */
    .nf-section-header .ph-nav-right {
        order: 3;
    }
    /* SHOW NEW MEMBERS toggle: drop it onto its own line below the buttons
       (after "Black Listing") instead of overlapping the right edge. */
    .nf-section-header .subs-nav-page-info {
        position: relative;
        padding-bottom: 52px;
    }
    .nf-section-header .mh-show-new-members {
        position: absolute;
        bottom: -4px;
        left: 0;
        margin-left: 0;
        align-items: flex-start;
    }
}
@media (max-width: 640px) {
    .nf-header-buttons {
        gap: 6px;
    }
}

.the_newsfeed_container #column_main {
    border: none;
}

.the_newsfeed_container #newsfeed-editor .full_width_main_content_text_area_container {
    border: 1px #DFDFDF solid;
    margin-bottom: 0;
}

.the_newsfeed_container .full_width_main_content_container {
    margin: 0 auto;
    padding: 0 0 10px 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   Algorithm Control Popup Panel
   ══════════════════════════════════════════════════════════════════════════ */

#nf-algo-popup-overlay,
#nf-block-popup-overlay {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    font-family: 'Tahoma', Geneva, sans-serif;
    z-index: 100;
}

/* ── Header content (injected into .ph-nav-right when popup is open) ── */
.nf-algo-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    text-align: center;
}
.nf-algo-header-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a2e;
}
.nf-algo-header-desc {
    font-size: 11px;
    color: #333;
    line-height: 1.4;
    max-width: 420px;
    border: 1px solid #999;
    border-radius: 4px;
    padding: 2px 2px;
    background: #fff;
}

/* ── Close button (inside the overlay, top-right of the white panel) ── */
.nf-algo-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 110;
    line-height: 1;
    text-align: center;
}
.nf-algo-popup-close:hover { color: #000; }

/* ── Body: single white panel containing left description + right controls ── */
.nf-algo-popup-body {
    position: relative;
    display: flex;
    gap: 0;
    min-height: 555px;
    background: #fff;
    border: 1px solid #000;
}
.nf-algo-popup-body-left {
    flex: 0 0 40%;
    padding: 24px 24px;
    overflow-y: auto;
}
.nf-algo-popup-body-title {
    font-family: 'Poppins', Georgia, 'Times New Roman', serif;
    font-size: 32.77px;
    font-weight: 900;
    color: #000;
    margin: 0 0 32px 0;
    text-align: center;
    text-transform: uppercase;
}
.nf-algo-popup-body-desc {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 13px;
    color: #000;
    line-height: 1.55;
}
.nf-algo-popup-body-desc p {
    font-size: 14px;
    margin: 0 0 15px 0;
}
.nf-algo-popup-body-desc strong {
    font-weight: bold;
}

/* ── Right column: Filter Controls / Prediction Controls ── */
.nf-algo-popup-body-right {
    flex: 1 1 60%;
    padding: 37px 32px 14px 0;
    overflow-y: auto;
    position: relative;
    background: #fff;
}

/* Inner panel wrapper (lavender background with rounded corners) */
.nf-algo-inner-panel {
    background: #c8cade;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #999;
}

/* Panel header bar (shared by Filter Controls and Prediction Controls) */
.nf-algo-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #6d83b4;
    color: #fff;
    padding: 7px 14px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
}
.nf-algo-filter-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nf-algo-filter-header-icon {
    width: 35px;
    height: 35px;
}
.nf-algo-filter-header-label {
    white-space: nowrap;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.nf-algo-filter-header select {
    background: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 13px;
    padding: 4px 24px 4px 8px;
    font-family: 'Tahoma', Geneva, sans-serif;
    font-weight: normal;
    cursor: pointer;
    min-width: 150px;
}

/* Panel body area (below header bar) */
.nf-algo-filter-body {
    padding: 14px 16px;
}

/* Switchable panels */
.nf-algo-panel { display: none; }
.nf-algo-panel.nf-algo-panel-active { display: block; }

/* ── Filter Controls Panel ── */

/* 2x2 grid for word/member filter sections */
.nf-algo-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-bottom: 18px;
}

.nf-algo-filter-section {
    display: flex;
    flex-direction: column;
}
.nf-algo-filter-section-label {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin-bottom: 6px;
}
.nf-algo-filter-input-row {
    display: flex;
    gap: 0;
    margin-bottom: 6px;
}
.nf-algo-filter-input-row input[type="text"] {
    flex: 1;
    border: 1px solid #888;
    border-right: none;
    padding: 5px 8px;
    font-size: 13px;
    font-family: 'Tahoma', Geneva, sans-serif;
    min-width: 0;
    background: #fff;
    color: #666;
}
.nf-algo-filter-input-row input[type="text"]::placeholder {
    color: #999;
}
.nf-algo-filter-add-btn {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 12px;
    font-weight: bold;
    background: #999;
    color: #000;
    border: 1px solid #888;
    padding: 5px 10px;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
}
.nf-algo-filter-add-btn:hover {
    background: #aaa;
}

/* Tags container */
.nf-algo-tags-area {
    border: 1px solid #888;
    min-height: 100px;
    max-height: 140px;
    overflow-y: scroll;
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 5px;
    background: #fff;
}

/* Tag chip */
.nf-algo-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid #999;
    border-radius: 2px;
    padding: 3px 8px;
    font-size: 13px;
    color: #000;
    background: #ddd;
    line-height: 1.3;
    gap: 5px;
}
.nf-algo-tag-remove {
    cursor: pointer;
    font-size: 14px;
    color: #666;
    line-height: 1;
    font-weight: bold;
}
.nf-algo-tag-remove:hover {
    color: #c00;
}

/* ── Threshold sections (Activity Level + Validation Level) ── */
.nf-algo-threshold-section {
    margin-bottom: 14px;
}
.nf-algo-threshold-label {
    font-family: 'Poppins', Georgia, 'Times New Roman', serif;
    font-size: 15.77px;
    font-weight: bold;
    color: #000;
    margin-bottom: 6px;
}
.nf-algo-threshold-icons-bar {
    background: #bbbfc6;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}
.nf-algo-threshold-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    transition: opacity 0.2s;
}
.nf-algo-threshold-icon.nf-greyed {
    opacity: 0.35;
}

/* Range slider (navy track, white thumb) */
.nf-algo-threshold-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #2f4371;
    outline: none;
    margin: 0;
    display: block;
}
.nf-algo-threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #333;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.nf-algo-threshold-slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #333;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.nf-algo-threshold-slider-wrap {
    background: #a0a0a0;
    border-radius: 0 0 4px 4px;
    /* Horizontal padding = icons-bar padding (12px) + half the icon/thumb
       size difference (6px) so the 30px thumb centers under each 42px icon. */
    padding: 6px 18px 10px 18px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Algorithm Prediction Controls Panel
   ══════════════════════════════════════════════════════════════════════════ */

.nf-algo-predict-title {
    font-family: 'Poppins', Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 400;
    color: #000;
    margin: 0 0 4px 0;
    line-height: 1.2;
}
.nf-algo-predict-subtitle {
    font-size: 13px;
    color: #444;
    margin: 0 0 18px 0;
    line-height: 1.4;
}
.nf-algo-predict-weights-title {
    font-size: 14px;
    font-weight: 400;
    color: #000;
    margin: 0 0 14px 0;
}

/* Slider rows */
.nf-algo-predict-row {
    margin-bottom: 16px;
}
.nf-algo-predict-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.nf-algo-predict-row-label {
    font-size: 14px;
    font-weight: 400;
    color: #000;
}
.nf-algo-predict-row-value {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    min-width: 40px;
    text-align: right;
}

/* Colored sliders */
.nf-algo-predict-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    outline: none;
    margin: 0;
}
.nf-algo-predict-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #333;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.nf-algo-predict-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #333;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.nf-algo-predict-slider.nf-slider-blue    { background: #4a90d9; }
.nf-algo-predict-slider.nf-slider-green   { background: #2ecc71; }
.nf-algo-predict-slider.nf-slider-red     { background: #c0392b; }
.nf-algo-predict-slider.nf-slider-orange  { background: #e67e22; }
.nf-algo-predict-slider.nf-slider-purple  { background: #9b59b6; }
.nf-algo-predict-slider.nf-slider-dkgreen { background: #27ae60; }
.nf-algo-predict-slider.nf-slider-dkred   { background: #b03a2e; }

/* Action buttons */
.nf-algo-predict-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}
.nf-algo-predict-btn {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: #6d83b4;
    border: 1px solid #4a4e80;
    border-radius: 6px;
    padding: 8px 20px;
    cursor: pointer;
    white-space: nowrap;
}
.nf-algo-predict-btn:hover {
    background: #5a5f99;
}
.nf-algo-predict-hint {
    font-size: 13px;
    color: #fff;
    background: #6d83b4;
    border: 2px solid #4a4e80;
    border-radius: 8px;
    padding: 8px 14px;
    line-height: 1.35;
    max-width: 300px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Members Blocking (Black Listing) Popup Panel
   Reuses .nf-algo-popup-* / .nf-algo-inner-panel / .nf-algo-filter-header for
   the overlay shell, left description column, and panel header bar. Only the
   blocking cards below need their own styles.
   ══════════════════════════════════════════════════════════════════════════ */

/* Switchable panels inside the blocking controls (About vs. cards) */
.nf-block-panel { display: none; }
.nf-block-panel.nf-block-panel-active { display: block; }
.nf-block-controls.nf-block-panel-active {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* About Markethive Blocking sub-panel (white rounded card) */
.nf-block-about-card {
    position: relative;
    background: #fff;
    border: 1px solid #b9bcd0;
    border-radius: 8px;
    padding: 18px 24px 22px 24px;
    min-height: 470px;
}
.nf-block-about-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 22px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    line-height: 1;
}
.nf-block-about-close:hover { color: #444; }
.nf-block-about-title {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin: 0 0 18px 0;
    padding-right: 28px;
}
.nf-block-about-card p {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #000;
    margin: 0 0 18px 0;
}
.nf-block-about-card p:last-child { margin-bottom: 0; }
.nf-block-about-card p strong { font-weight: bold; }

/* Single blocking option card */
.nf-block-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #eceef4;
    border: 1px solid #b9bcd0;
    border-radius: 6px;
    padding: 12px 14px;
}
.nf-block-card-active {
    border-color: #6d83b4;
    box-shadow: 0 0 0 2px rgba(109,131,180,0.4);
}
.nf-block-card-text {
    flex: 1 1 auto;
    min-width: 0;
}
.nf-block-card-title {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin-bottom: 3px;
}
.nf-block-card-desc {
    font-size: 13px;
    line-height: 1.4;
    color: #222;
}

/* EDIT button on the right of each card */
.nf-block-edit-btn {
    flex: 0 0 auto;
    align-self: flex-start;
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    background: #fff;
    color: #000;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 4px 12px;
    cursor: pointer;
}
.nf-block-edit-btn:hover {
    background: #f0f0f0;
}

/* ══════════════════════════════════════════════════════════════════════════
   Block Messages stacked sub-panels (cascading cards over the controls view)
   ══════════════════════════════════════════════════════════════════════════ */

/* The controls panel becomes the positioning context for the overlay stack. */
#nf-block-panel-controls { position: relative; }

/* Overlay layer covering the cards area. */
.nf-bmsg-stack {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

/* A single stacked panel (white rounded card). Positioned by JS via top/z-index. */
.nf-bmsg-panel {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 640px;
    background: #fff;
    border: 1px solid #c9ccdd;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    overflow: hidden;
}
/* Collapsed peek: header only, clickable to bring forward. */
.nf-bmsg-panel.nf-bmsg-collapsed { cursor: pointer; }
.nf-bmsg-panel.nf-bmsg-collapsed .nf-bmsg-body { display: none; }

/* Header bar: back arrow (left) + centered title + close (right). */
.nf-bmsg-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 56px;
    min-height: 30px;
}
.nf-bmsg-title {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    text-align: center;
}
.nf-bmsg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 0;
}
.nf-bmsg-back { left: 14px; }
.nf-bmsg-close { right: 14px; }
.nf-bmsg-nav img { width: 34px; height: 34px; display: block; }

/* Panel body. */
.nf-bmsg-body { padding: 18px 24px 20px 24px; }
.nf-bmsg-text {
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #000;
    margin: 0 0 16px 0;
}

/* In-panel navigation links (Add to Blocked / See your blocked list). */
.nf-bmsg-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    margin: 14px 0;
}
.nf-bmsg-link-text { text-decoration: underline; }
.nf-bmsg-link-add { color: #2f6fed; }
.nf-bmsg-link-list { color: #000; }
.nf-bmsg-add-ico {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2f6fed;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.nf-bmsg-person-ico {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 24px;
}

/* Add row (unblock panel): link on the left, toggle on the right. */
.nf-bmsg-addrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0 14px 0;
}
.nf-bmsg-addrow .nf-bmsg-link { margin: 0; }

/* Search box. */
.nf-bmsg-search {
    position: relative;
    margin: 0 0 12px 0;
}
.nf-bmsg-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0ac;
    font-size: 15px;
}
.nf-bmsg-search input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfd3dd;
    background: #eef0f4;
    border-radius: 20px;
    padding: 9px 14px 9px 38px;
    font-size: 15px;
    color: #333;
    font-family: 'Tahoma', Geneva, sans-serif;
}
.nf-bmsg-search input::placeholder { color: #9aa0ac; }

/* Member list rows. */
.nf-bmsg-member-list {
    max-height: 320px;
    overflow-y: auto;
}
.nf-bmsg-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 2px;
}
.nf-bmsg-avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #c4c8d2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Empty / loading state inside a member list */
.nf-bmsg-empty {
    padding: 18px 4px;
    text-align: center;
    color: #777;
    font-size: 14px;
    font-family: 'Tahoma', Geneva, sans-serif;
}
/* A BLOCK button after it has been actioned */
.nf-bmsg-action-done {
    background: #e6e6e6;
    color: #888;
    border-color: #aaa;
    cursor: default;
}
.nf-bmsg-member-name {
    flex: 1 1 auto;
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 17px;
    color: #000;
}
.nf-bmsg-action-btn {
    flex: 0 0 auto;
    font-family: 'Tahoma', Geneva, sans-serif;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    background: #fff;
    color: #000;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 4px 10px;
    cursor: pointer;
}

/* ── Algorithm popup responsive ── */
@media (max-width: 768px) {
    .nf-algo-popup-body {
        flex-direction: column;
    }
    .nf-algo-popup-body-left {
        flex: none;
    }
    .nf-algo-popup-body-right {
        padding: 14px;
    }
    .nf-algo-filter-grid {
        grid-template-columns: 1fr;
    }
    /* Stack the panel header so the Filter/Algorythm dropdown drops onto its
       own line instead of overflowing the panel on narrow screens. */
    .nf-algo-filter-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .nf-algo-filter-header select {
        width: 100%;
        min-width: 0;
    }
    /* Stack the hint + action buttons so each falls on its own line and the
       buttons get full width instead of being crowded on narrow screens. */
    .nf-algo-predict-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .nf-algo-predict-hint {
        max-width: none;
    }
    .nf-algo-predict-actions > div {
        width: 100%;
        align-items: stretch;
    }
    .nf-algo-predict-btn {
        width: 100%;
    }
    /* Stack the EDIT button under the card text on narrow screens. */
    .nf-block-card {
        flex-direction: column;
        align-items: stretch;
    }
    .nf-block-edit-btn {
        align-self: flex-end;
    }
    /* Block Messages panels take the full width on narrow screens. */
    .nf-bmsg-panel {
        width: 96%;
        max-width: none;
    }
}
@media (max-width: 640px) {
    .nf-algo-threshold-icon {
        width: 42px;
        height: 42px;
    }
    .nf-algo-header-desc {
        max-width: 100%;
    }
}

/* ── Algorithm Control: Member Autocomplete ── */
.nf-algo-member-ac {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.nf-algo-member-ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.nf-algo-member-ac-item:last-child {
    border-bottom: none;
}
.nf-algo-member-ac-item:hover {
    background: #f5f5f5;
}
.nf-algo-member-ac-pic {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.nf-algo-member-ac-uname {
    color: #888;
    font-size: 12px;
    margin-left: auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   Newsfeed per-post algorithm action bar
   (left: validation/vanity/hive badges | right: like/dislike/inc/excl/LIFT)
   ───────────────────────────────────────────────────────────────────────── */
.nf-post-header-row {
    display: flex;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 6px;
}
.nf-post-header-row .full_width_main_content_newsfeed_post_right_the_content_member_name {
    flex: 0 0 auto;
    padding-bottom: 0;
    white-space: nowrap;
}
.nf-post-header-row .full_width_main_content_newsfeed_post_right_the_action_btns_container {
    float: none;
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    align-items: center;
}
.nf-post-action-bar {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: clamp(16px, 3vw, 48px);
    margin: 0 0 0 clamp(12px, 2vw, 28px);
}
.nf-post-action-bar .nf-post-badge,
.nf-post-action-bar .nf-post-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border: none;
    background: transparent;
    text-decoration: none;
}
.nf-post-action-bar .nf-post-badge img,
.nf-post-action-bar .nf-post-action img {
    height: 22px;
    width: auto;
    display: block;
    border: 0;
}
.nf-post-action-bar .nf-post-action {
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.15s, transform 0.15s;
}
.nf-post-action-bar .nf-post-action:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.nf-post-action-bar .nf-post-action-lift img {
    height: 22px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Tom's promo buttons - BOOST / PUSH / LIFT (S432, NEWSFEED.DRAFT.CORRECTIONS.psd)
   The art is Tom's, cut from his 800x148 masters, served at the ONE scale he placed
   all three at in the PSD (0.162, measured: BOOST 61x23, PUSH 100x18, LIFT 64x18).
   The red counter is CSS, not baked into the art, because it is LIVE - the member's
   remaining inventory for that promo - sized to his badge (66x59 in the master, so
   10.7x9.6 on screen). Composer order: Public v · BOOST · PUSH · POST.
   ───────────────────────────────────────────────────────────────────────── */
.nf-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 0;
    text-decoration: none;
    vertical-align: middle;
    position: relative;
}
a.nf-promo-btn img {
    display: block;
    width: auto;
    margin: 0;
    border: 0;
}
.nf-promo-btn-boost img { height: 24px; }
.nf-promo-btn-push img  { height: 17px; }
.nf-promo-btn-lift img  { height: 17px; }
.nf-post-action-bar .nf-post-action-lift.nf-promo-btn img { height: 17px; }
/* The counter. The id selectors are here on purpose: css/style.css styles
   #newsfeed_boosts_sum for the legacy activity feed, and an id outranks a class. */
.nf-promo-btn .nf-promo-count,
.nf-promo-btn #newsfeed_boosts_sum,
.nf-promo-btn #newsfeed_pushes_sum,
.nf-promo-btn #newsfeed_lifts_sum {
    display: inline-block;
    min-width: 11px;
    height: 11px;
    padding: 0 2px;
    margin: 0;
    box-sizing: border-box;
    position: relative;
    top: 0;
    z-index: 1;
    background: #ff0000;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    font: 700 8px/9px Arial, Helvetica, sans-serif;
    text-align: center;
    letter-spacing: 0;
}
.nf-promo-disabled,
.nf-post-action-bar .nf-post-action.nf-promo-disabled {
    opacity: 0.45;
    cursor: default;
}
.nf-post-action-bar .nf-post-action.nf-promo-disabled:hover {
    opacity: 0.45;
    transform: none;
}
/* Composer: sits between the privacy pull-down and POST, inline like its neighbours. */
.nf-promo-publish {
    display: inline-block;
    vertical-align: top;
    margin: 0 8px 0 2px;
    line-height: 0;
    white-space: nowrap;
}
.nf-promo-publish .nf-promo-btn {
    margin-right: 8px;
    cursor: pointer;
}
.nf-promo-publish .nf-promo-btn:last-child {
    margin-right: 0;
}
/* Never show this bar on new-member welcome posts */
.newsfeed_new_member_post .nf-post-action-bar {
    display: none !important;
}

/* Hover tooltips for algorithm-action icons (like/dislike/increase/exclude/lift) */
.nf-post-action-bar .nf-post-action {
    position: relative;
}
.nf-post-action-bar .nf-post-action .nf-tip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #000;
    color: #000;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.35;
    text-align: left;
    padding: 8px 10px;
    width: 180px;
    white-space: normal;
    box-shadow: 1px 1px 0 #999;
    pointer-events: none;
}
.nf-post-action-bar .nf-post-action .nf-tip::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 7px solid #000;
}
.nf-post-action-bar .nf-post-action .nf-tip::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #fff;
}
.nf-post-action-bar .nf-post-action:hover .nf-tip {
    display: block;
}
.nf-post-action-bar .nf-post-action .nf-tip strong {
    font-weight: bold;
}
.nf-post-action-bar .nf-post-action .nf-tip-lift {
    text-align: center;
    width: 200px;
}
.nf-post-action-bar .nf-post-action .nf-tip-lift img.nf-tip-icon {
    display: block;
    margin: 0 auto 4px;
    width: 70px;
    height: 37px;
    max-width: 100%;
}

/* Active state once a signal has been sent for a post */
.nf-post-action-bar .nf-post-action.nf-post-action-active img {
    filter: drop-shadow(0 0 3px rgba(255, 200, 0, 0.9));
}

/* Hover tooltips for the 3 left-side badges (validation / vanity / hive rank).
   Same bubble look as the action-bar tooltips, but with an icon + 2-line head
   block on top and a body paragraph below. */
.nf-post-action-bar .nf-post-badge {
    position: relative;
}
.nf-post-action-bar .nf-post-badge .nf-tip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #000;
    color: #000;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.35;
    text-align: left;
    padding: 8px 10px;
    width: 230px;
    white-space: normal;
    box-shadow: 1px 1px 0 #999;
    pointer-events: none;
}
.nf-post-action-bar .nf-post-badge .nf-tip::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 7px solid #000;
}
.nf-post-action-bar .nf-post-badge .nf-tip::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #fff;
}
.nf-post-action-bar .nf-post-badge:hover .nf-tip {
    display: block;
}
.nf-post-action-bar .nf-post-badge .nf-tip-badge-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}
.nf-post-action-bar .nf-post-badge .nf-tip-badge-head img.nf-tip-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: block;
}
.nf-post-action-bar .nf-post-badge .nf-tip-badge-head .nf-tip-title {
    flex: 1;
    font-weight: bold;
    line-height: 1.25;
    font-size: 13px;
}
.nf-post-action-bar .nf-post-badge .nf-tip-body {
    display: block;
    color: #000;
    font-size: 12px;
    line-height: 1.4;
}
