/* vorugreind-rail.css — GS1-626: the review screen's "Kaflar" rail (rail.js, Jay's GS1-622 design).
 * Rail left, the list grouped by menu item right, both inside the scrolling .vg-review-col. The rail
 * is sticky, so it follows the scroll. A narrow review column (phone, or the document shown beside
 * the list) turns the rail into one sticky row of sideways chips above the list, and the sticky
 * section headers move down by its height. The list column is the vg-review container for the rows
 * (the ≤ 520 px row rule in vorugreind.css). */
.vg-rlay {
    --vg-rail-h: 0px;
    display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start;
    width: 100%; max-width: 1280px; margin: 0 auto;
}
.vg-rail {
    position: sticky; top: 0; z-index: 6;
    display: flex; flex-direction: column;
    max-height: calc(100vh - 160px); overflow-y: auto;
}
.vg-rail__title {
    padding: 4px 10px 0; font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--blue-brand);
}
.vg-rail__list { display: flex; flex-direction: column; margin-top: 4px; }
.vg-rail__group {
    margin: 12px 0 4px; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-muted);
}
.vg-rail__item {
    display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; cursor: pointer;
    padding: 6px 8px 6px 10px; border: 0; border-left: 3px solid transparent; border-radius: 0 4px 4px 0;
    background: none; color: var(--blue-brand); font: 500 13px var(--font-body);
}
.vg-rail__item:hover { background: #fff; }
.vg-rail__item.is-current { background: #fff; border-left-color: var(--orange-brand); font-weight: 700; }
.vg-rail__label { flex: 1; min-width: 0; }
.vg-rail__pills { display: inline-flex; gap: 4px; flex: none; }
.vg-rpill {
    height: 18px; padding: 0 6px; border-radius: 999px; box-sizing: border-box; white-space: nowrap;
    display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700;
}
.vg-rpill--left    { background: #E5F0FC; color: var(--blue-brand); }
.vg-rpill--missing { background: #FEE2E2; color: #991B1B; }
.vg-rpill--done    { background: #DCFCE7; color: #166534; }

.vg-rlist { min-width: 0; display: flex; flex-direction: column; gap: 16px; container: vg-review / inline-size; }
.vg-rgroup { display: flex; flex-direction: column; gap: 14px; }
.vg-rgroup__title { margin: 6px 2px -4px; font-size: 16px; color: var(--blue-brand); }
.vg-rgroup:first-child .vg-rgroup__title { margin-top: 0; }

/* Narrow review column: the sideways chips. */
@container vg-review (max-width: 760px) {
    .vg-rlay { --vg-rail-h: 46px; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .vg-rail {
        top: calc(-1 * var(--vg-review-pad-top, 0px)); flex-direction: row; align-items: center;
        height: var(--vg-rail-h); box-sizing: border-box; max-height: none; overflow: visible;
        background: var(--light-grey); border-bottom: 1px solid var(--light-blue-2);
    }
    .vg-rail__title, .vg-rail__group { display: none; }
    .vg-rail__list {
        flex-direction: row; gap: 6px; margin: 0; min-width: 0; overflow-x: auto; scrollbar-width: none;
    }
    .vg-rail__list::-webkit-scrollbar { display: none; }
    .vg-rail__item {
        flex: none; width: auto; white-space: nowrap; padding: 5px 10px;
        border: 1px solid var(--light-blue-2); border-radius: 999px; background: #fff;
    }
    .vg-rail__item.is-current { background: var(--blue-brand); border-color: var(--blue-brand); color: #fff; }
}
/* The sticky section headers stop under the chip strip, not behind it (--vg-rail-h is 0 beside the
 * left rail). Outside the query on purpose: a header's nearest container is .vg-rlist, not the column. */
.vg-rlist .vg-section__header { top: calc(var(--vg-rail-h) - var(--vg-review-pad-top, 0px)); }
