/* vorugreind-menu.css — GS1-623: the approved product's menu page (menu.js, Jay's GS1-622 design).
 * One menu item at a time: menu left, page right, inside the scrolling .vg-review-col. The document
 * bar and the footer go (their actions sit in the header); the green "done" chrome of review mode is
 * noise on an approved product, so the sections are plain cards. Narrow (phone, or the document
 * shown beside the list) the menu folds into one "☰ <item> ▾" button. */
body.vg-menu-mode .vg-viewer-bar,
body.vg-menu-mode .vg-footer { display: none; }

.vg-mhead__title { flex: 1; min-width: 0; }
.vg-mhead__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.vg-mhead__btn {
    height: 36px; padding: 0 14px; border-radius: 4px; cursor: pointer; white-space: nowrap;
    background: #fff; color: var(--blue-brand); border: 1.5px solid var(--blue-brand);
    font: 600 13px var(--font-body);
}
.vg-mhead__btn:hover { background: var(--light-grey); }
.vg-mhead__btn--primary { background: var(--blue-brand); color: #fff; border-color: var(--blue-brand); }
.vg-mhead__btn--primary:hover { background: var(--blue-4); }
.vg-header .vg-footer__export { margin-left: 0; }
.vg-header .vg-footer__kronan { height: 36px; padding: 0 14px; font-size: 13px; }
.vg-header .vg-footer__menu { bottom: auto; top: calc(100% + 6px); }   /* opens downwards from the header */
.vg-mstatus {
    flex: none; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.vg-mstatus.is-live     { background: #DCFCE7; color: #166534; }
.vg-mstatus.is-upcoming { background: #FEF3C7; color: #92400E; }
.vg-mstatus.is-off      { background: #F1F5F9; color: #334155; border: 1px solid #94A3B8; }

.vg-mlay {
    display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start;
    width: 100%; max-width: 1280px; margin: 0 auto;
}
.vg-mnav { position: sticky; top: 0; z-index: 6; max-height: calc(100vh - 140px); overflow-y: auto; }
.vg-mnav__toggle { display: none; }
.vg-mnav__search input {
    width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--light-blue-2); border-radius: 4px;
    font: 13px var(--font-body); background: #fff; box-sizing: border-box;
}
.vg-mnav__noresult { font-size: 12px; color: var(--text-muted); padding: 6px 2px 0; }
.vg-mnav__list { display: flex; flex-direction: column; margin-top: 8px; }
.vg-mnav__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-mnav__item {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer;
    padding: 7px 10px; border: 0; border-left: 3px solid transparent; border-radius: 0 4px 4px 0;
    background: none; color: var(--blue-brand); font: 500 14px var(--font-body);
}
.vg-mnav__item:hover { background: #fff; }
.vg-mnav__item.is-current { background: #fff; border-left-color: var(--orange-brand); font-weight: 700; }
.vg-mnav__item.is-dim { opacity: 0.4; }
.vg-mnav__item.is-hit .vg-mnav__label { text-decoration: underline; text-decoration-color: var(--orange-brand); }
.vg-mnav__label { flex: 1; min-width: 0; }
.vg-mnav__pills { display: inline-flex; gap: 4px; }
.vg-mnav__saga { margin-top: 12px; border-top: 1px solid var(--light-blue-2); border-radius: 0; padding-top: 10px; }
.vg-mpill {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}
.vg-mpill--missing { background: #FEE2E2; color: #991B1B; }
.vg-mpill--advised { background: #FEF3C7; color: #92400E; }

.vg-mpages { min-width: 0; container: vg-review / inline-size; }
.vg-mpage { display: flex; flex-direction: column; gap: 14px; }
.vg-mpage[hidden] { display: none; }
.vg-mpage__head { padding: 2px 2px 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
.vg-mpage__headtext { flex: 1 1 240px; min-width: 0; }
.vg-mpage__title { font-size: 22px; }
.vg-mpage__intro { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }
.vg-mpager { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.vg-mpager__btn {
    background: #fff; border: 1px solid var(--light-blue-2); border-radius: 4px; cursor: pointer;
    padding: 8px 14px; color: var(--blue-brand); font: 600 13px var(--font-body);
}
.vg-mpager__btn:hover { background: var(--light-grey); }
.vg-mpager__btn--next { margin-left: auto; }
.vg-mpager--top { flex: 1 1 100%; min-width: 0; gap: 6px; }
.vg-mpager--top .vg-mpager__btn {
    padding: 5px 10px; font-size: 12px; white-space: nowrap; min-width: 0; max-width: 220px;
    overflow: hidden; text-overflow: ellipsis;
}

/* Plain cards on an approved product: no green "done" chrome, no fold chevron. */
.vg-menu-mode .vg-section.is-done,
.vg-menu-mode .vg-section.is-advised { border-color: var(--light-blue-2); }
.vg-menu-mode .vg-section.is-done .vg-section__header,
.vg-menu-mode .vg-section.is-advised .vg-section__header { background: #F4F8FC; border-bottom-color: var(--light-blue-2); }
.vg-menu-mode .vg-section__done-pill,
.vg-menu-mode .vg-section__chevron { display: none; }
.vg-menu-mode .vg-section__header { cursor: default; grid-template-columns: minmax(0, 1fr) auto; }
.vg-menu-mode .is-search-hit { box-shadow: inset 3px 0 0 var(--orange-brand); background: #FFF8F3; }

/* Yfirlit */
.vg-movw { display: flex; flex-direction: column; gap: 14px; }
.vg-movw__card { background: #fff; border: 1px solid var(--light-blue-2); border-radius: 6px; padding: 16px; }
.vg-movw__card[hidden] { display: none; }
.vg-movw__card:first-child { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.vg-movw__card:first-child:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.vg-movw__img { width: 180px; max-height: 220px; object-fit: contain; border-radius: 4px; background: var(--light-grey); }
.vg-movw__facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.vg-movw__facts dt { color: var(--text-muted); }
.vg-movw__facts dd { margin: 0; overflow-wrap: anywhere; }
.vg-movw__h { font-size: 16px; margin: 0 0 8px; }
.vg-movw__note { margin: 0; color: var(--text-muted); font-size: 13px; }
.vg-movw__gaps { display: flex; flex-direction: column; }
.vg-mgap {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
    padding: 9px 4px; border: 0; border-top: 1px solid #F0F1F3; background: none;
    font: 14px var(--font-body); color: var(--text-color);
}
.vg-mgap:first-child { border-top: 0; }
.vg-mgap:hover { background: #F7FAFD; }
.vg-mgap__icon {
    flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px;
}
.vg-mgap.is-missing .vg-mgap__icon { background: #FEE2E2; color: #991B1B; }
.vg-mgap.is-advised .vg-mgap__icon { background: #FEF3C7; color: #92400E; }
.vg-mgap__text { flex: 1; min-width: 0; }
.vg-mgap__text small { display: block; color: var(--text-muted); font-size: 12px; }
.vg-movw__units-text { margin: 0 0 8px; }
.vg-movw__unitlist { display: flex; flex-direction: column; margin: 0 0 10px; border: 1px solid #F0F1F3; border-radius: 4px; }
.vg-movw__unit {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 8px 10px; border: 0; border-top: 1px solid #F0F1F3; background: none;
    font: 14px var(--font-body); color: var(--text-color);
}
.vg-movw__unit:first-child { border-top: 0; }
button.vg-movw__unit { cursor: pointer; }
button.vg-movw__unit:hover { background: #F7FAFD; }
.vg-movw__unit-what { flex: 1; min-width: 0; }
.vg-movw__units-btn {
    background: #fff; color: var(--blue-brand); border: 1.5px solid var(--blue-brand); border-radius: 4px;
    height: 34px; padding: 0 12px; cursor: pointer; font: 600 13px var(--font-body);
}
.vg-movw__units-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.vg-movw__units-link {
    background: none; border: 0; padding: 0; cursor: pointer; color: var(--blue-brand);
    font: 600 13px var(--font-body);
}
.vg-movw__units-link:hover { text-decoration: underline; }

/* Pakkningar og kassar (GS1-625): the grunneining, packs indented under the unit they hold. */
.vg-mpk {
    background: #fff; border: 1px solid var(--light-blue-2); border-radius: 6px; padding: 14px 16px;
}
.vg-mpk__tree { display: flex; flex-direction: column; margin: 0 0 12px; }
.vg-mpk__row {
    padding: 10px 0 10px calc(var(--depth, 0) * 24px);
    border-top: 1px solid #F0F1F3;
}
.vg-mpk__row:first-child { border-top: 0; padding-top: 0; }
.vg-mpk__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vg-mpk__branch { color: var(--text-muted); }
.vg-mpk__kind { font-weight: 700; font-size: 14px; }
.vg-mpk__sub { color: var(--text-muted); font-size: 13px; }
.vg-mpk__act { margin-left: auto; }
.vg-mpk__btn {
    background: none; border: 0; padding: 0; cursor: pointer; color: var(--blue-brand);
    font: 600 13px var(--font-body);
}
.vg-mpk__btn:hover { text-decoration: underline; }
.vg-mpk__facts {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px;
    margin: 6px 0 0;
}
.vg-mpk__fact dt { font-size: 12px; color: var(--text-muted); }
.vg-mpk__fact dd { margin: 0; font-size: 14px; }
.vg-mpk__none { color: var(--text-muted); }
.vg-mpk__empty { margin: 0 0 12px; }
@container vg-review (max-width: 820px) {
    .vg-mpk__row { padding-left: calc(var(--depth, 0) * 14px); }
}

/* Narrow: the review column under ~820 px (phone, or the document shown beside it). The outer
 * .vg-review-col is the vg-review container (vorugreind.css). */
@container vg-review (max-width: 820px) {
    .vg-mlay { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .vg-mnav { max-height: none; overflow: visible; background: var(--light-grey); padding-bottom: 6px; }
    .vg-mnav__toggle {
        display: flex; align-items: center; gap: 8px; width: 100%; height: 42px; padding: 0 12px; cursor: pointer;
        background: #fff; border: 1px solid var(--light-blue-2); border-radius: 6px;
        color: var(--blue-brand); font: 600 14px var(--font-body);
    }
    .vg-mnav__toggle-label { flex: 1; text-align: left; }
    .vg-mnav__panel { display: none; background: #fff; border: 1px solid var(--light-blue-2); border-radius: 6px; padding: 8px; margin-top: 6px; }
    .vg-mnav.is-open .vg-mnav__panel { display: block; }
}
@container vg-review (max-width: 560px) {
    .vg-movw__card:first-child { grid-template-columns: minmax(0, 1fr); }
    .vg-movw__img { width: 100%; max-height: 260px; }
    .vg-movw__facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .vg-movw__facts dd { margin-bottom: 8px; }
}
@media (max-width: 760px) {
    body.vg-menu-mode .vg-header { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
    .vg-mhead__actions { justify-content: flex-start; }
}

/* ── GS1-624: "Á umbúðunum" (labelCrop.js) ──
 * Wide: a 310 px rail right of the page with the selected row's crop. Narrower (the review column
 * under 1180 px): no rail, the crop sits under the selected row. The inline crop lives inside
 * .vg-mpages, its own container, so it can't query the outer width: the outer query sets
 * --vg-lcrop-inline on .vg-mlay and the inline crop inherits it. */
.vg-mlay.has-rail { grid-template-columns: 250px minmax(0, 1fr) 310px; }
.vg-mrail {
    position: sticky; top: 0; max-height: calc(100vh - 140px); overflow-y: auto;
    background: #fff; border: 1px solid var(--light-blue-2); border-radius: 6px; padding: 14px;
}
.vg-mrail__h {
    margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--text-muted);
}
.vg-mrail__label { font-size: 14px; font-weight: 700; color: var(--blue-brand); margin-bottom: 10px; overflow-wrap: anywhere; }
.vg-mrail__div { border-top: 1px solid var(--light-blue-2); margin: 16px 0 10px; }

.vg-lcrop__frame {
    position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; cursor: zoom-in;
    background: var(--light-grey); border: 1px solid var(--light-blue-2); border-radius: 6px;
}
.vg-lcrop__frame.is-empty { cursor: default; font-size: 13px; color: var(--text-muted); }
.vg-lcrop__box { position: relative; }
.vg-lcrop__canvas { position: absolute; display: block; }
.vg-lcrop__img { position: absolute; max-width: none; display: block; user-select: none; transform-origin: 50% 50%; }
/* ↺ ↻ − + on the crop and the overlay photo, lower right: the old viewer's toolbar. */
.vg-lcrop__tools { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.vg-lcrop__tools button, .vg-lov__tools button {
    min-width: 28px; height: 28px; padding: 0 6px; border-radius: 4px; cursor: pointer;
    background: rgba(255, 255, 255, 0.92); color: var(--blue-brand); border: 1px solid var(--light-blue-2);
    font: 600 14px var(--font-body); line-height: 1;
}
.vg-lcrop__tools button:hover, .vg-lov__tools button:hover { background: #fff; border-color: var(--blue-brand); }
.vg-lcrop__hl {
    position: absolute; box-sizing: border-box; border: 2.5px solid var(--orange-brand); border-radius: 3px;
    background: rgba(242, 99, 52, 0.13); pointer-events: none;
}
.vg-lcrop__cap { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.vg-lcrop__all { background: none; border: 0; padding: 0; cursor: pointer; color: #008DBD; font: 600 12px var(--font-body); }
.vg-lcrop__all:hover { text-decoration: underline; }
.vg-lcrop__note { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); }
.vg-lcrop__empty {
    font-size: 13px; line-height: 1.45; color: var(--text-muted);
    background: #F8FAFC; border: 1px dashed #D1D5DB; border-radius: 6px; padding: 12px;
}
.vg-lcrop-inline { display: var(--vg-lcrop-inline, none); margin: 4px 16px 14px; max-width: 380px; }

.vg-lthumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.vg-lthumb {
    width: 64px; height: 82px; padding: 3px; cursor: pointer; background: #fff;
    border: 1px solid var(--light-blue-2); border-radius: 4px;
}
.vg-lthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vg-lthumb:hover { border-color: var(--blue-brand); }
.vg-lthumb.is-on { border-color: var(--orange-brand); box-shadow: 0 0 0 1px var(--orange-brand); }
.vg-lthumbs--big .vg-lthumb { width: 110px; height: 140px; }
.vg-lphotos .vg-movw__note { margin-top: 10px; }

.vg-movw__imgbtn { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }

@container vg-review (max-width: 1180px) {
    .vg-mlay.has-rail { grid-template-columns: 230px minmax(0, 1fr); --vg-lcrop-inline: block; }
    .vg-mrail { display: none; }
}
@container vg-review (max-width: 820px) {
    .vg-mlay.has-rail { grid-template-columns: minmax(0, 1fr); }
}

/* "Sýna umbúðir": the whole photo, the item's rows thin blue, the selected one orange. */
.vg-lov {
    position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box;
}
.vg-lov__dlg {
    background: #fff; border-radius: 8px; width: min(1100px, 100%); height: 100%;
    display: flex; flex-direction: column; overflow: hidden;
}
.vg-lov__tools { position: absolute; right: 22px; bottom: 22px; display: flex; gap: 4px; }
.vg-lov__tools button { min-width: 34px; height: 34px; font-size: 16px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2); }
.vg-lov__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--light-blue-2); }
.vg-lov__title { flex: 1; min-width: 0; color: var(--blue-brand); font-size: 15px; }
.vg-lov__close {
    height: 32px; padding: 0 12px; border-radius: 4px; cursor: pointer; background: #fff;
    color: var(--blue-brand); border: 1.5px solid var(--blue-brand); font: 600 13px var(--font-body);
}
.vg-lov__body { flex: 1; display: flex; gap: 12px; padding: 12px 14px; overflow: hidden; min-height: 0; }
.vg-lov__thumbs { flex-direction: column; flex-wrap: nowrap; margin: 0; overflow-y: auto; overflow-x: hidden; flex: none; padding-right: 4px; }
.vg-lov__thumbs[hidden] { display: none; }
/* The view holds the scrolling stage and the tools pinned over its lower-right corner. */
.vg-lov__view { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; }
/* The stage scrolls when zoomed; the photo is sized in px by labelCrop.js layoutPic. */
.vg-lov__stage { flex: 1; min-width: 0; min-height: 0; overflow: auto; display: grid; place-items: safe center; background: var(--light-grey); border-radius: 4px; }
.vg-lov__stage.is-zoomed { cursor: grab; }
.vg-lov__stage.is-dragging { cursor: grabbing; }
.vg-lov__pic { position: relative; line-height: 0; }
.vg-lov__rot { position: absolute; transform-origin: 50% 50%; }
.vg-lov__img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.vg-lov__box {
    position: absolute; box-sizing: border-box; padding: 0; cursor: pointer; border-radius: 3px;
    border: 1.5px solid #008DBD; background: rgba(0, 141, 189, 0.08);
}
.vg-lov__box:hover { background: rgba(0, 141, 189, 0.2); }
.vg-lov__box.is-active { border: 2.5px solid var(--orange-brand); background: rgba(242, 99, 52, 0.15); cursor: default; }
.vg-lov__legend { margin: 0; padding: 0 14px 10px; font-size: 12px; color: var(--text-muted); }
.vg-lov__key { display: inline-block; width: 12px; height: 9px; vertical-align: middle; border: 1.5px solid #008DBD; border-radius: 2px; }
.vg-lov__key.is-active { border: 2px solid var(--orange-brand); }
@media (max-width: 760px) {
    .vg-lov { padding: 0; }
    .vg-lov__dlg { border-radius: 0; width: 100%; height: 100%; }
    .vg-lov__body { flex-direction: column-reverse; }
    .vg-lov__head { flex-wrap: wrap; }
    .vg-lov__title { flex-basis: 100%; }
    .vg-lov__thumbs { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
}
