/* ── Daily Recommended Nutrient Values — Reference Table ──────────────────── */

.mipb-dvt-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Intro ───────────────────────────────────────────────────────────────── */

.mipb-dvt-intro {
    font-size: 15px;
    line-height: 1.65;
    color: #444;
    margin-bottom: 20px;
    text-align: center;
}

/* ── Controls ────────────────────────────────────────────────────────────── */

.mipb-dvt-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mipb-dvt-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mipb-dvt-select {
    font-size: 14px;
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    min-width: 220px;
    cursor: pointer;
}

.mipb-dvt-select:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46,125,50,.15);
}

/* ── Table wrapper ───────────────────────────────────────────────────────── */

.mipb-dvt-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* ── Table ────────────────────────────────────────────────────────────────── */

.mipb-dvt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 auto;
}

.mipb-dvt-table thead {
    background: #f5f5f5;
}

.mipb-dvt-table th {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #555;
    text-align: center;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.mipb-dvt-th-nutrient {
    text-align: left !important;
    min-width: 160px;
}

.mipb-dvt-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
    vertical-align: middle;
}

.mipb-dvt-cell-nutrient {
    text-align: left !important;
    font-weight: 500;
    color: #333;
}

.mipb-dvt-cell-unit {
    color: #777;
    font-size: 13px;
}

.mipb-dvt-cell-fda strong {
    color: #1565c0;
    font-size: 15px;
}

.mipb-dvt-cell-dri strong {
    color: #2e7d32;
    font-size: 15px;
}

/* ── Alternating row colours ─────────────────────────────────────────────── */

.mipb-dvt-row:nth-child(even) {
    background: #fafbfc;
}

.mipb-dvt-row:hover {
    background: #f0f7f0;
}

/* ── Group header rows ───────────────────────────────────────────────────── */

.mipb-dvt-group-row {
    background: #e8f5e9 !important;
}

.mipb-dvt-group-cell {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #2e7d32;
    padding: 10px 12px !important;
    text-align: left !important;
    border-bottom: 2px solid #c8e6c9;
}

/* ── Badges (RDA / AI) ───────────────────────────────────────────────────── */

.mipb-dvt-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: .03em;
}

.mipb-dvt-badge-rda {
    background: #e8f5e9;
    color: #2e7d32;
}

.mipb-dvt-badge-ai {
    background: #fff3e0;
    color: #e65100;
}

/* ── Not applicable / not determined ─────────────────────────────────────── */

.mipb-dvt-na {
    color: #bbb;
}

.mipb-dvt-nd {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* ── Legend ───────────────────────────────────────────────────────────────── */

.mipb-dvt-legend {
    text-align: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.mipb-dvt-legend p {
    font-size: 13px;
    color: #555;
    margin: 0;
    line-height: 1.7;
}

/* ── Sources ─────────────────────────────────────────────────────────────── */

.mipb-dvt-sources {
    margin-top: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.mipb-dvt-sources h3 {
    font-size: 14px;
    margin: 0 0 8px;
    color: #333;
}

.mipb-dvt-sources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mipb-dvt-sources li {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.5;
}

.mipb-dvt-sources a {
    color: #1565c0;
    text-decoration: none;
}

.mipb-dvt-sources a:hover {
    text-decoration: underline;
}

/* ── Share bar centering ─────────────────────────────────────────────────── */

.mipb-dvt-wrap .mipb-tshare {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .mipb-dvt-table {
        font-size: 13px;
    }
    .mipb-dvt-table th,
    .mipb-dvt-table td {
        padding: 6px 8px;
    }
    .mipb-dvt-controls {
        flex-direction: column;
        gap: 6px;
    }
    .mipb-dvt-select {
        width: 100%;
    }
}
