/**
 * MIPB Tools — Shared centering / layout overrides
 * Loaded on every tool page (ranking + comparison).
 *
 * Goals:
 *   0. Center the Breakdance section container on the viewport
 *   1. Center the Breakdance H1 heading
 *   2. Center controls bar (search + filters)
 *   3. Center sort tabs / metric tabs
 *   4. Center header grids (top-10 + insight panel)
 *   5. Center comparison search rows / picker areas
 *   6. Keep table text + list items left-aligned
 */

/* ── 0. Breakdance section — center content on viewport ───────── */
/* Template 23 section-container uses align-items:flex-start by
   default, which left-aligns the ~729 px content column inside
   the 1120 px centred wrapper.  Switching to center fixes it.
   Breakdance selector: .breakdance .bde-section .section-container
   (3-class specificity) — we match it with the template ID.        */
.breakdance .bde-section-23-101.bde-section .section-container {
    align-items: center;
}

/* ── 1. Page title (Breakdance heading — template 23) ─────────── */
.bde-heading-23-102.bde-heading {
    width: 100%;
    text-align: center;
}

/* ── 2. Ranking controls — center the flex row ────────────────── */
.morac-controls,
.mfrap-controls,
.mat-controls,
.mft-controls,
.mpa-controls,
.mchol-controls,
.mphy-controls,
.miso-controls,
.mfdc-controls,
/* PhenolExplorer tools */
.mchlo-controls,
.mell-controls,
.mstil-controls,
.mlig-controls,
/* Newer nutrient tools */
.mbet-controls,
.mpral-controls,
.mox-controls,
.maa-controls,
.miod-controls,
.mgi-controls,
.mppa-controls,
/* FDC individual nutrient tables */
.miron-controls,
.mcal-controls,
.mfib-controls,
.mfol-controls,
.msel-controls,
.mpot-controls,
.mzinc-controls,
.mvc-controls,
.mve-controls,
.mvk-controls,
.mmag-controls,
.mprot-controls,
.ndt-controls,
.mipb-calc {
    justify-content: center;
}

/* ── 3. Sort tabs / sort toggles — center ─────────────────────── */
.morac-sort-tabs,
.mat-sort-toggle,
.mft-sort-toggle,
.ndt-toggle-group {
    justify-content: center;
}

/* ── 4. Header grids (top-10 + insight panel) — center ────────── */
.morac-header-grid,
.mfrap-header-grid,
.mat-header-grid,
.mft-header-grid,
.mpa-header-grid,
.mchol-header-grid,
.mphy-header-grid,
.miso-header-grid,
.mfdc-header-grid,
/* PhenolExplorer tools */
.mchlo-header-grid,
.mell-header-grid,
.mstil-header-grid,
.mlig-header-grid,
/* Newer nutrient tools */
.mbet-header-grid,
.mpral-header-grid,
.mox-header-grid,
.maa-header-grid,
.miod-header-grid,
.mgi-header-grid,
.mppa-header-grid,
/* FDC individual nutrient tables */
.miron-header-grid,
.mcal-header-grid,
.mfib-header-grid,
.mfol-header-grid,
.msel-header-grid,
.mpot-header-grid,
.mzinc-header-grid,
.mvc-header-grid,
.mve-header-grid,
.mvk-header-grid,
.mmag-header-grid,
.mprot-header-grid {
    margin-left: auto;
    margin-right: auto;
}

/* ── 5. Comparison picker / search rows — center ──────────────── */
.moracc-picker-area,
.mfrapc-picker-area,
.matc-picker-area,
.mfc-picker-area,
.mpac-picker-area,
.mcholc-picker-area,
.mphyc-picker-area,
.misoc-picker-area,
.mfdcc-picker-area,
/* PhenolExplorer comparison tools */
.mchloc-picker-area,
.mellc-picker-area,
.mstilc-picker-area,
.mligc-picker-area,
/* Newer nutrient comparison tools */
.mbetc-picker-area,
.mpralc-picker-area,
.moxc-picker-area,
.maac-picker-area,
.miodc-picker-area,
.mgic-picker-area,
.mppac-picker-area,
/* FDC individual nutrient comparison tools */
.mironc-picker-area,
.mcalc-picker-area,
.mfibc-picker-area,
.mfolc-picker-area,
.mselc-picker-area,
.mpotc-picker-area,
.mzincc-picker-area,
.mvcc-picker-area,
.mvec-picker-area,
.mvkc-picker-area,
.mmagc-picker-area,
.mprotc-picker-area {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Search rows AND search wraps (some tools use -search-row,
   others use -search-wrap) */
.moracc-search-row,
.mfrapc-search-row,
.mpc-search-row,
.mfc-search-row,
.mpac-search-row,
.mcholc-search-row,
.mphyc-search-row,
.misoc-search-row,
.mfdcc-search-row,
.mcholc-search-wrap,
.mpac-search-wrap,
.mphyc-search-wrap,
.misoc-search-wrap,
.mfdcc-search-wrap,
/* PhenolExplorer comparison search rows */
.mchloc-search-row,
.mellc-search-row,
.mstilc-search-row,
.mligc-search-row,
/* Newer nutrient comparison search rows */
.mbetc-search-row,
.mpralc-search-row,
.moxc-search-row,
.maac-search-row,
.miodc-search-row,
.mgic-search-row,
.mppac-search-row,
/* FDC individual nutrient comparison search rows */
.mironc-search-row,
.mcalc-search-row,
.mfibc-search-row,
.mfolc-search-row,
.mselc-search-row,
.mpotc-search-row,
.mzincc-search-row,
.mvcc-search-row,
.mvec-search-row,
.mvkc-search-row,
.mmagc-search-row,
.mprotc-search-row {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ── 6. Comparison metric / compare-by tabs — center ──────────── */
/* Some tools use -metric-tabs, others use just -tabs */
.moracc-metric-tabs,
.mfrapc-metric-tabs,
.matc-metric-tabs,
.mfc-metric-tabs,
.mpac-metric-tabs,
.mcholc-metric-tabs,
.mphyc-metric-tabs,
.misoc-metric-tabs,
.mfdcc-metric-tabs,
/* PhenolExplorer comparison metric tabs */
.mchloc-metric-tabs,
.mellc-metric-tabs,
.mstilc-metric-tabs,
.mligc-metric-tabs,
/* Newer nutrient comparison metric tabs */
.mbetc-metric-tabs,
.mpralc-metric-tabs,
.moxc-metric-tabs,
.maac-metric-tabs,
.miodc-metric-tabs,
.mgic-metric-tabs,
.mppac-metric-tabs,
/* FDC individual nutrient comparison metric tabs */
.mironc-metric-tabs,
.mcalc-metric-tabs,
.mfibc-metric-tabs,
.mfolc-metric-tabs,
.mselc-metric-tabs,
.mpotc-metric-tabs,
.mzincc-metric-tabs,
.mvcc-metric-tabs,
.mvec-metric-tabs,
.mvkc-metric-tabs,
.mmagc-metric-tabs,
.mprotc-metric-tabs,
.mpac-tabs,
.mcholc-tabs,
.mphyc-tabs,
.misoc-tabs,
.mfdcc-tabs,
/* PhenolExplorer comparison tabs */
.mchloc-tabs,
.mellc-tabs,
.mstilc-tabs,
.mligc-tabs,
/* Newer nutrient comparison tabs */
.mbetc-tabs,
.mpralc-tabs,
.moxc-tabs,
.maac-tabs,
.miodc-tabs,
.mgic-tabs,
.mppac-tabs,
/* FDC individual nutrient comparison tabs */
.mironc-tabs,
.mcalc-tabs,
.mfibc-tabs,
.mfolc-tabs,
.mselc-tabs,
.mpotc-tabs,
.mzincc-tabs,
.mvcc-tabs,
.mvec-tabs,
.mvkc-tabs,
.mmagc-tabs,
.mprotc-tabs,
.mfc-filters {
    justify-content: center;
    flex-wrap: wrap;
}

/* ── 7. Comparison wrap — center text for label / citation ────── */
.moracc-wrap,
.mfrapc-wrap,
.matc-wrap,
.mfc-wrap,
.mpac-wrap,
.mcholc-wrap,
.mphyc-wrap,
.misoc-wrap,
.mfdcc-wrap,
/* PhenolExplorer comparison wraps */
.mchloc-wrap,
.mellc-wrap,
.mstilc-wrap,
.mligc-wrap,
/* Newer nutrient comparison wraps */
.mbetc-wrap,
.mpralc-wrap,
.moxc-wrap,
.maac-wrap,
.miodc-wrap,
.mgic-wrap,
.mppac-wrap,
/* FDC individual nutrient comparison wraps */
.mironc-wrap,
.mcalc-wrap,
.mfibc-wrap,
.mfolc-wrap,
.mselc-wrap,
.mpotc-wrap,
.mzincc-wrap,
.mvcc-wrap,
.mvec-wrap,
.mvkc-wrap,
.mmagc-wrap,
.mprotc-wrap,
.mpc-wrap {
    text-align: center;
}

/* Keep inner table cells and list items left-aligned */
.moracc-wrap td,
.moracc-wrap th,
.mfrapc-wrap td,
.mfrapc-wrap th,
.matc-wrap td,
.matc-wrap th,
.mfc-wrap td,
.mfc-wrap th,
.mpac-wrap td,
.mpac-wrap th,
.mcholc-wrap td,
.mcholc-wrap th,
.mphyc-wrap td,
.mphyc-wrap th,
.misoc-wrap td,
.misoc-wrap th,
.mfdcc-wrap td,
.mfdcc-wrap th,
/* PhenolExplorer comparison wraps */
.mchloc-wrap td,
.mchloc-wrap th,
.mellc-wrap td,
.mellc-wrap th,
.mstilc-wrap td,
.mstilc-wrap th,
.mligc-wrap td,
.mligc-wrap th,
/* Newer nutrient comparison wraps */
.mbetc-wrap td,
.mbetc-wrap th,
.mpralc-wrap td,
.mpralc-wrap th,
.moxc-wrap td,
.moxc-wrap th,
.maac-wrap td,
.maac-wrap th,
.miodc-wrap td,
.miodc-wrap th,
.mgic-wrap td,
.mgic-wrap th,
.mppac-wrap td,
.mppac-wrap th,
/* FDC individual nutrient comparison wraps */
.mironc-wrap td,
.mironc-wrap th,
.mcalc-wrap td,
.mcalc-wrap th,
.mfibc-wrap td,
.mfibc-wrap th,
.mfolc-wrap td,
.mfolc-wrap th,
.mselc-wrap td,
.mselc-wrap th,
.mpotc-wrap td,
.mpotc-wrap th,
.mzincc-wrap td,
.mzincc-wrap th,
.mvcc-wrap td,
.mvcc-wrap th,
.mvec-wrap td,
.mvec-wrap th,
.mvkc-wrap td,
.mvkc-wrap th,
.mmagc-wrap td,
.mmagc-wrap th,
.mprotc-wrap td,
.mprotc-wrap th,
.mpc-wrap td,
.mpc-wrap th {
    text-align: left;
}

/* ── 8. Related tools section — center heading ────────────────── */
.morac-related-section,
.mfrap-related-section,
.mpoly-related-section,
.mflav-related-section,
.mpa-related-section,
.mchol-related-section,
.mphy-related-section,
.miso-related-section,
.mfdc-related-section,
/* PhenolExplorer tools */
.mchlo-related-section,
.mell-related-section,
.mstil-related-section,
.mlig-related-section,
/* Newer nutrient tools */
.mbet-related-section,
.mpral-related-section,
.mox-related-section,
.maa-related-section,
.miod-related-section,
.mgi-related-section,
.mppa-related-section,
/* FDC individual nutrient tables */
.miron-related-section,
.mcal-related-section,
.mfib-related-section,
.mfol-related-section,
.msel-related-section,
.mpot-related-section,
.mzinc-related-section,
.mvc-related-section,
.mve-related-section,
.mvk-related-section,
.mmag-related-section,
.mprot-related-section,
.mrt-related {
    text-align: center;
}

/* Keep related-card body text left-aligned */
.morac-related-body,
.mfrap-related-body,
.mpoly-related-body,
.mflav-related-body,
.mpa-related-body,
.mchol-related-body,
.mphy-related-body,
.miso-related-body,
.mfdc-related-body,
/* PhenolExplorer tools */
.mchlo-related-body,
.mell-related-body,
.mstil-related-body,
.mlig-related-body,
/* Newer nutrient tools */
.mbet-related-body,
.mpral-related-body,
.mox-related-body,
.maa-related-body,
.miod-related-body,
.mgi-related-body,
.mppa-related-body,
/* FDC individual nutrient tables */
.miron-related-body,
.mcal-related-body,
.mfib-related-body,
.mfol-related-body,
.msel-related-body,
.mpot-related-body,
.mzinc-related-body,
.mvc-related-body,
.mve-related-body,
.mvk-related-body,
.mmag-related-body,
.mprot-related-body,
.mrt-related-body {
    text-align: left;
}

/* Related tools grid — center it */
.morac-related-grid,
.mfrap-related-grid,
.mpoly-related-grid,
.mflav-related-grid,
.mpa-related-grid,
.mchol-related-grid,
.mphy-related-grid,
.miso-related-grid,
.mfdc-related-grid,
/* PhenolExplorer tools */
.mchlo-related-grid,
.mell-related-grid,
.mstil-related-grid,
.mlig-related-grid,
/* Newer nutrient tools */
.mbet-related-grid,
.mpral-related-grid,
.mox-related-grid,
.maa-related-grid,
.miod-related-grid,
.mgi-related-grid,
.mppa-related-grid,
/* FDC individual nutrient tables */
.miron-related-grid,
.mcal-related-grid,
.mfib-related-grid,
.mfol-related-grid,
.msel-related-grid,
.mpot-related-grid,
.mzinc-related-grid,
.mvc-related-grid,
.mve-related-grid,
.mvk-related-grid,
.mmag-related-grid,
.mprot-related-grid,
.mrt-related-grid {
    margin-left: auto;
    margin-right: auto;
}

/* ── 9. FAQ section — center heading, left-align body text ────── */
.morac-faq,
.mfrap-faq,
.mpoly-faq,
.mflav-faq,
.mpa-faq,
.mchol-faq,
.mphy-faq,
.miso-faq,
.mfdc-faq,
/* PhenolExplorer tools */
.mchlo-faq,
.mell-faq,
.mstil-faq,
.mlig-faq,
/* Newer nutrient tools */
.mbet-faq,
.mpral-faq,
.mox-faq,
.maa-faq,
.miod-faq,
.mgi-faq,
.mppa-faq,
/* FDC individual nutrient tables */
.miron-faq,
.mcal-faq,
.mfib-faq,
.mfol-faq,
.msel-faq,
.mpot-faq,
.mzinc-faq,
.mvc-faq,
.mve-faq,
.mvk-faq,
.mmag-faq,
.mprot-faq {
    text-align: center;
}

.morac-faq details,
.mfrap-faq details,
.mpoly-faq details,
.mflav-faq details,
.mpa-faq details,
.mchol-faq details,
.mphy-faq details,
.miso-faq details,
.mfdc-faq details,
/* PhenolExplorer tools */
.mchlo-faq details,
.mell-faq details,
.mstil-faq details,
.mlig-faq details,
/* Newer nutrient tools */
.mbet-faq details,
.mpral-faq details,
.mox-faq details,
.maa-faq details,
.miod-faq details,
.mgi-faq details,
.mppa-faq details,
/* FDC individual nutrient tables */
.miron-faq details,
.mcal-faq details,
.mfib-faq details,
.mfol-faq details,
.msel-faq details,
.mpot-faq details,
.mzinc-faq details,
.mvc-faq details,
.mve-faq details,
.mvk-faq details,
.mmag-faq details,
.mprot-faq details {
    text-align: left;
}

/* ── 9b. FAQ overflow fix — prevent expanded dropdowns from breaking layout */
.morac-faq, .mfrap-faq, .mpoly-faq, .mflav-faq,
.mpa-faq, .mchol-faq, .mphy-faq, .miso-faq,
.mfdc-faq, .mpt-faq,
.mchlo-faq, .mell-faq, .mstil-faq, .mlig-faq,
.mbet-faq, .mpral-faq, .mox-faq, .maa-faq,
.miod-faq, .mgi-faq, .mppa-faq,
.miron-faq, .mcal-faq, .mfib-faq, .mfol-faq,
.msel-faq, .mpot-faq, .mzinc-faq, .mvc-faq,
.mve-faq, .mvk-faq, .mmag-faq, .mprot-faq {
    max-width: 100%;
    overflow: hidden;
}
.morac-faq details, .mfrap-faq details, .mpoly-faq details, .mflav-faq details,
.mpa-faq details, .mchol-faq details, .mphy-faq details, .miso-faq details,
.mfdc-faq details, .mpt-faq details,
.mchlo-faq details, .mell-faq details, .mstil-faq details, .mlig-faq details,
.mbet-faq details, .mpral-faq details, .mox-faq details, .maa-faq details,
.miod-faq details, .mgi-faq details, .mppa-faq details,
.miron-faq details, .mcal-faq details, .mfib-faq details, .mfol-faq details,
.msel-faq details, .mpot-faq details, .mzinc-faq details, .mvc-faq details,
.mve-faq details, .mvk-faq details, .mmag-faq details, .mprot-faq details {
    max-width: 100%;
    overflow: hidden;
}
.morac-faq details p, .mfrap-faq details p, .mpoly-faq details p, .mflav-faq details p,
.mpa-faq details p, .mchol-faq details p, .mphy-faq details p, .miso-faq details p,
.mfdc-faq details p, .mpt-faq details p,
.mchlo-faq details p, .mell-faq details p, .mstil-faq details p, .mlig-faq details p,
.mbet-faq details p, .mpral-faq details p, .mox-faq details p, .maa-faq details p,
.miod-faq details p, .mgi-faq details p, .mppa-faq details p,
.miron-faq details p, .mcal-faq details p, .mfib-faq details p, .mfol-faq details p,
.msel-faq details p, .mpot-faq details p, .mzinc-faq details p, .mvc-faq details p,
.mve-faq details p, .mvk-faq details p, .mmag-faq details p, .mprot-faq details p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
}

/* ── 10. Font normalisation — prevent serif fallback ─────────── */
/* Breakdance / WordPress can leave tool elements without an explicit
   font-family, which causes the browser default (Times) to show on
   data-source citations, legends, and other minor text.  This rule
   sets a single modern stack for every tool wrapper.                 */
.morac-wrap,  .moracc-wrap,
.mfrap-wrap,  .mfrapc-wrap,
.mat-wrap,    .matc-wrap,
.mft-wrap,    .mfc-wrap,
.mpa-wrap,    .mpac-wrap,
.mchol-wrap,  .mcholc-wrap,
.mphy-wrap,   .mphyc-wrap,
.miso-wrap,   .misoc-wrap,
.mfdc-wrap,   .mfdcc-wrap,
/* PhenolExplorer tools */
.mchlo-wrap,  .mchloc-wrap,
.mell-wrap,   .mellc-wrap,
.mstil-wrap,  .mstilc-wrap,
.mlig-wrap,   .mligc-wrap,
/* Newer nutrient tools */
.mbet-wrap,   .mbetc-wrap,
.mpral-wrap,  .mpralc-wrap,
.mox-wrap,    .moxc-wrap,
.maa-wrap,    .maac-wrap,
.miod-wrap,   .miodc-wrap,
.mgi-wrap,    .mgic-wrap,
.mppa-wrap,   .mppac-wrap,
/* FDC individual nutrient tables */
.miron-wrap,  .mironc-wrap,
.mcal-wrap,   .mcalc-wrap,
.mfib-wrap,   .mfibc-wrap,
.mfol-wrap,   .mfolc-wrap,
.msel-wrap,   .mselc-wrap,
.mpot-wrap,   .mpotc-wrap,
.mzinc-wrap,  .mzincc-wrap,
.mvc-wrap,    .mvcc-wrap,
.mve-wrap,    .mvec-wrap,
.mvk-wrap,    .mvkc-wrap,
.mmag-wrap,   .mmagc-wrap,
.mprot-wrap,  .mprotc-wrap,
.mpc-app,     .mpc-wrap,
.mpoly-wrap,  .mflav-wrap,
.ndt-app,     .ndc-app,
.mipb-calc {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Data-source / citation lines */
.mipb-data-source,
.mipb-source-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── 11. Tool share bar (top circular buttons) ──────────────── */
/* Shared styling for the inline share bar that appears above the
   table on every ranking / comparison tool.  Hidden by default;
   JS adds .visible after data renders.                            */
.mipb-tshare {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.mipb-tshare.visible { display: flex; }
.mipb-tshare-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c6b8a;
    white-space: nowrap;
}
.mipb-tshare-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.mipb-tsocial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #c5cae9;
    background: #fff;
    cursor: pointer;
    -webkit-transition: all 0.18s;
    transition: all 0.18s;
    text-decoration: none;
    flex-shrink: 0;
}
.mipb-tsocial svg { width: 18px; height: 18px; display: block; }
.mipb-tsocial:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
}
.mipb-tsocial.pinterest { border-color: #E60023; }
.mipb-tsocial.pinterest:hover { background: #E60023; }
.mipb-tsocial.pinterest:hover svg path { fill: #fff; }
.mipb-tsocial.facebook  { border-color: #1877F2; }
.mipb-tsocial.facebook:hover  { background: #1877F2; }
.mipb-tsocial.facebook:hover svg path { fill: #fff; }
.mipb-tsocial.whatsapp  { border-color: #25D366; }
.mipb-tsocial.whatsapp:hover  { background: #25D366; }
.mipb-tsocial.whatsapp:hover svg path { fill: #fff; }
.mipb-tsocial.twitter   { border-color: #000; }
.mipb-tsocial.twitter:hover   { background: #000; }
.mipb-tsocial.twitter:hover svg path { fill: #fff; }
.mipb-tcopy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid #c5cae9;
    cursor: pointer;
    background: #f0f0fa;
    color: #5c6b8a;
    -webkit-transition: all 0.15s;
    transition: all 0.15s;
    white-space: nowrap;
}
.mipb-tcopy:hover {
    background: #e8eaf6;
    color: #1a1a2e;
    border-color: #283593;
}
.mipb-tcopy.copied {
    background: #283593;
    color: #fff;
    border-color: #283593;
}

/* ── 12. Mobile — cap "Related tools" section overflow ──────── */
/* These sections use width:100vw to break out of the column, but
   100vw includes the scrollbar on desktop and causes ~15 px
   horizontal overflow on mobile.  Cap to 100% at narrow widths.  */
@media (max-width: 768px) {
    .morac-related, .mfrap-related, .mat-related, .mft-related,
    .mpa-related, .mchol-related, .mphy-related, .miso-related,
    .mfdc-related, .mrt-related,
    /* PhenolExplorer tools */
    .mchlo-related, .mell-related, .mstil-related, .mlig-related,
    /* Newer nutrient tools */
    .mbet-related, .mpral-related, .mox-related, .maa-related,
    .miod-related, .mgi-related, .mppa-related,
    /* FDC individual nutrient tables */
    .miron-related, .mcal-related, .mfib-related, .mfol-related,
    .msel-related, .mpot-related, .mzinc-related, .mvc-related,
    .mve-related, .mvk-related, .mmag-related, .mprot-related {
        width: 100% !important;
        margin-left: 0 !important;
        transform: none !important;
    }
}

/* ── 13. Sticky table headers — ALL tool tables ────────────────
   Keeps the header row visible when scrolling long data tables.
   Each thead gets position:sticky so it pins to the viewport top.
   z-index keeps it above table cell content.                      */
.mpt-table thead,
.morac-table thead,
.moracc-table thead,
.mfrap-table thead,
.mfrapc-table thead,
.mat-table thead,
.mft-table thead,
.mfc-table thead,
.mpa-table thead,
.mpac-table thead,
.mchol-table thead,
.mcholc-table thead,
.mphy-table thead,
.mphyc-table thead,
.miso-table thead,
.misoc-table thead,
.mfdc-table thead,
.mfdcc-table thead,
.mpc-table thead,
.ndt-table thead,
.ndc-table thead,
/* PhenolExplorer tools */
.mchlo-table thead,
.mchloc-table thead,
.mell-table thead,
.mellc-table thead,
.mstil-table thead,
.mstilc-table thead,
.mlig-table thead,
.mligc-table thead,
/* Newer nutrient tools */
.mbet-table thead,
.mbetc-table thead,
.mpral-table thead,
.mpralc-table thead,
.mox-table thead,
.moxc-table thead,
.maa-table thead,
.maac-table thead,
.miod-table thead,
.miodc-table thead,
.mgi-table thead,
.mgic-table thead,
.mppa-table thead,
.mppac-table thead,
/* FDC individual nutrient tables */
.miron-table thead,
.mironc-table thead,
.mcal-table thead,
.mcalc-table thead,
.mfib-table thead,
.mfibc-table thead,
.mfol-table thead,
.mfolc-table thead,
.msel-table thead,
.mselc-table thead,
.mpot-table thead,
.mpotc-table thead,
.mzinc-table thead,
.mzincc-table thead,
.mvc-table thead,
.mvcc-table thead,
.mve-table thead,
.mvec-table thead,
.mvk-table thead,
.mvkc-table thead,
.mmag-table thead,
.mmagc-table thead,
.mprot-table thead,
.mprotc-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* For tables whose thead has no explicit background but th does,
   the th background already provides opacity for the sticky row.
   For tables using thead-level background (ndt, ndc, mat via .mat-app),
   the thead background also carries through.  No extra rule needed. */


/* ── Database-presence icon badges in autocomplete dropdowns ─────────── */
/* Used by ALL tool search/autocomplete dropdowns to show which MIPB      */
/* databases have data for the food item being displayed.                 */

.mipb-db-badges {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}

.mipb-db-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    opacity: 0.75;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.mipb-db-badge:hover {
    opacity: 1;
}

.mipb-db-badge svg {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
    display: block;
}
