/* pages/packagecenter/packagecenter.css — Package Center (bespoke app CSS).
 *
 * Every number below was measured on the LIVE PAS7700_POC (172.21.3.80),
 * 2026-09-16, window class `package-center-main-window` at 1440×900.
 * Live class → replica class map:
 *   .package-center-top-toolbar   → .pc-toolbar   (reuses the shared C.toolbar row)
 *   .v-module-list                → .module-list  (shared C.moduleList, scoped tweaks)
 *   .pkg-list                     → .pc-body
 *   .list-tbar / .title-text      → .pc-tbar / .pc-tbar-title
 *   .list-item-wrapper.is-card    → .pc-grid
 *   .package-center-list-card     → .pc-card  (+ -iconarea/-icon/-infoarea/-info/…)
 *   .pkg-action-btn               → .pc-btn   (shared .tb-btn visual, pill radius)
 *   .legal-link-wrapper           → .pc-legal
 *   .v-empty-view                 → .pc-empty
 * None of these carry a `v-…` class that isn't already in shared/, so the whole
 * block is package-local per AGENTS.md's SVC test.
 */

/* Live `.v-window-body` is solid white — rail, toolbar and list all sit on it
 * (no --bg-content grey). The rail DOES carry a divider: live's
 * `.layout-module-list-panel` (240px) has `border-right: 1px solid
 * rgba(198,212,224,.5)` down the full height of the list area (pas80 2026-10-02) —
 * the shared .module-list rule already draws exactly that, so it is no longer
 * zeroed here. (The 2026-09-16 note said "no right divider"; that was wrong.) */
.appwin-packagecenter .appwin-content {
  background: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.appwin-packagecenter .module-list {
  /* live rail: first item flush with the top of `.page-list-app-main` (the
   * 56px toolbar above already provides the breathing room) → padding-top 0. */
  padding: 0 12px 6px;
}

:root { --pc-card-line: #EBEEF0; }   /* live rgb(235,238,240), the card grid rule */

/* ——— Top toolbar (full width, above BOTH the rail and the list) ———
 * live `.package-center-top-toolbar`: 1440×56 = padding 16px 12px 0 + a 40px row.
 * Manual Install / Settings are right-aligned with an 8px gap; the last button
 * ends flush with the 12px right padding. */
.appwin-packagecenter .pc-toolbar {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 16px 12px 0;
  height: 40px;
  box-sizing: content-box;
  align-items: flex-start;
}

/* ——— Back / Forward / Refresh / Search —————————————————————————————————
 * Live (pas80 2026-09-16), all on the 28px-tall row: back x12 w30, forward x42
 * w30 (the two are ONE pill split by a divider), refresh x80 w30 with an 8px
 * margin, then the search field filling to Manual Install at x1219. */
.pc-navpair { display: flex; flex: 0 0 auto; }
.pc-navbtn {
  width: 30px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 3px;
  background: var(--btn-grey-bg);
  color: var(--font-grey-tier1);
  cursor: pointer;
}
.pc-navbtn svg { display: block; width: 24px; height: 24px; }
/* The pair reads as one pill: shared outer radius + a single inner divider. */
.pc-navpair .pc-navbtn-back { border-radius: 3px 0 0 3px; border-right-color: rgba(198, 212, 224, .9); }
.pc-navpair .pc-navbtn-fwd { border-radius: 0 3px 3px 0; }
.pc-refresh { flex: 0 0 auto; }
.pc-navbtn:hover:not(:disabled) { border-color: var(--btn-grey-border-hover); }
.pc-navbtn:active:not(:disabled) { background: var(--btn-grey-bg-active); border-color: var(--btn-grey-border-active); }
/* Disabled = live's v-btn-disabled: the fill stays, only the glyph fades. */
.pc-navbtn:disabled { cursor: default; }
.pc-navbtn:disabled svg { opacity: .4; }
/* live `.input-container.search-filter`: 28px tall, 1px rgba(198,212,224,.7),
 * radius 4, white fill, padding 0 11px 0 5px, then a 24px icon and a
 * 13px/20px Verdana input. */
.pc-search {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center;
  height: 28px; box-sizing: border-box;
  padding: 0 11px 0 5px;
  border: 1px solid rgba(198, 212, 224, .7);
  border-radius: 4px;
  background: var(--white);
}
.pc-search:focus-within { border-color: var(--main-tier1); }
/* live `.search-icon` is an `is-bkg` sprite cell, 24x24 with margin 0 4px 0 0.
 * The source sheet is 48x96 (a 2x sheet of two stacked cells, magnifier on top);
 * the asset here is that top cell cropped at 2x and drawn down to 24px, so it
 * stays crisp on a retina screen. */
.pc-search-icon {
  flex: 0 0 24px; width: 24px; height: 24px; margin-right: 4px;
  background: url("../../assets/img/pkg-search-icon.png") no-repeat 0 0 / 24px 24px;
}
.pc-search-input {
  flex: 1 1 auto; min-width: 0;
  padding: 3px 0;
  border: 0; outline: 0; background: transparent;
  font: 13px/20px Verdana, Arial, sans-serif;
  color: var(--font-grey-tier1);
}
.pc-search-input::placeholder { color: var(--font-grey-tier3); }
/* Manual Install / Settings keep live's right-hand order and never shrink. */
.pc-tb-btn { flex: 0 0 auto; }

/* ——— Rail + list row ——— live `.page-list-app-main`. */
.pc-main { flex: 1 1 auto; min-height: 0; display: flex; }

/* live `.pkg-list`: padding 0 12px 12px 16px + a `.v-scrollbar.with-padding`
 * that ALWAYS reserves a 16px right gutter — so the grid measures 1156px at a
 * 1440 window whether or not it is scrolling. `scrollbar-gutter: stable` gives
 * the same always-on reservation here (12px for our 8+2+2 bar), and the extra
 * 4px of right padding lands the grid on live's 1156. */
.pc-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  padding: 0 16px 12px 16px;
  display: flex;
  flex-direction: column;
}

/* When the list overflows (All Packages always does), app.js swaps the native bar for
 * the shared overlay one (`cp-scroll-native`), which reserves NO gutter — the grid
 * then grew to 1167px against live's 1155. Live reserves the same 28px on the right
 * either way (12 padding + the v-scrollbar's 16), so restore it here. */
.pc-body.cp-scroll-native { padding-right: 28px; }

/* ——— Section header ——— live `.list-tbar` (28px + 6px bottom pad) holding
 * `.title-text` 15px/28px rgba(65,75,85,.6). On Installed it reads "Installed";
 * on All Packages it is the publisher ("Synology" / "Open Source"). */
/* border-box: 34px total = live's 28px content row + a 6px bottom gap. */
.pc-tbar { display: flex; align-items: center; height: 34px; padding-bottom: 6px; }
.pc-tbar-title {
  flex: 1 1 0;
  font: 15px/28px Verdana, Arial, sans-serif;
  color: var(--font-grey-tier2);
}

/* ——— Card grid ——— live `.list-item-wrapper.is-card`: a grid whose tracks
 * measured 4 × 288.75px at 1156px, cards `flex: 1 0 250px` / min-width 250.
 * auto-fill + minmax(250px,1fr) reproduces both the 4-up desktop layout and
 * live's reflow when the window narrows. The 1px gutters come from the card's
 * own `margin: 1px 0 0 1px` (live), not from `gap`. */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin: 0 1px 16px 0;
}

/* ——— Card ——— live `.package-center-list-card` 287.75×124, cursor pointer. */
.pc-card {
  position: relative;
  display: flex;
  height: 124px;
  min-width: 250px;
  /* Live draws the grid lines with an OUTLINE, not a border: an outline takes no
   * layout space, so neighbouring cards' outlines land on the same pixel and read
   * as ONE shared 1px rule — which is why the cards look like table cells. The
   * 1px top/left margin is what keeps the first row/column's outline from being
   * clipped by the grid edge. Measured on pas80 2026-09-16:
   * `outline: 1px solid rgb(235,238,240); outline-offset: 0; margin: 1px 0 0 1px`. */
  outline: 1px solid var(--pc-card-line);
  outline-offset: 0;
  margin: 1px 0 0 1px;
  cursor: pointer;
  color: var(--font-grey-tier1);
}
.pc-card-iconarea { flex: 0 0 104px; }
/* live `.package-center-list-icon` 64×64, margin 14px 20px 8px. */
.pc-card-icon { display: block; width: 64px; height: 64px; margin: 14px 20px 8px; }
.pc-card-infoarea { position: relative; flex: 1 1 0; min-width: 0; }
/* live `.package-center-list-info`: 64px content + 14/8 padding = 86px tall,
 * column-centered, and 12px narrower than the button row below it. */
.pc-card-info {
  height: 86px;            /* border-box: 14 + 64 content + 8 */
  padding: 14px 0 8px;
  margin-right: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
/* live `.package-center-list-title`: 13px/20px 700, 20px right inset, ellipsis
 * (live wraps to a 2nd line for long names — 40px — so no nowrap here). */
.pc-card-title {
  padding-right: 20px;
  font: 700 13px/20px Verdana, Arial, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* live `.package-center-list-subtitle`: 12px/16px rgba(65,75,85,.6), 4px above,
 * single line with ellipsis (install date, or the comma-joined category list). */
.pc-card-sub {
  padding-top: 4px;
  font: 12px/16px Verdana, Arial, sans-serif;
  color: var(--font-grey-tier2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* live `.package-center-list-btn`: a 26px row directly under the info block
 * (86 + 26 = 112 of the card's 124 — the remaining 12px is the bottom gap). */
.pc-card-btnrow { height: 26px; }

/* ——— Card action button ——— live `.pkg-action-btn` is the shared grey v-btn in
 * its `v-btn-small v-btn-footbar` size, re-measured on pas80 2026-10-02: a 26px pill
 * (radius 100px, line-height 26px, vertical-align top) whose label layer
 * `.v-btn-text` is an inline-flex 24px row, padding 0 11px, 12px/24px Verdana —
 * glyph box at y=5, 15px tall. Widths follow: Open 55.67 / Install 61.42 /
 * Installed 76.05. `Open` (live `.can-open`) paints its label --main-tier1 blue,
 * at rest AND on hover; Install and the disabled Installed stay grey. Fill,
 * border, hover/active and the disabled .4 label come from the shared .tb-btn block.
 * ⚠ The 2026-09-16 note here read those same widths as "13px text with ~9px
 * insets". Live's text is 12px with 11px insets; the 13px guess is what made the
 * label read too big and sit too low. */
.pc-btn { height: 26px; border-radius: 100px; line-height: 26px; vertical-align: top; }
.pc-btn .tb-btn-text {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; padding: 0 11px; vertical-align: top;
  font-size: 12px; line-height: 24px; white-space: nowrap;
}
.pc-btn .tb-btn-content { display: block; line-height: 24px; }
.pc-btn-open .tb-btn-text { color: var(--main-tier1); }

/* ——— All Packages filter bar ——— live `.pkg-all-list-tbar` (pas80 2026-10-02):
 * 48px tall and the FIRST thing in the scrolling list (it scrolls away with the
 * cards), holding a v-form with two 250px v-select2 selects 6px apart, top-aligned.
 * Only All Packages has it (live: none on Installed or Beta). The selects are the
 * shared C.dropdown dropdown-form; border / hover / open colours come from the
 * shared --dropdown-form-* tokens, which already equal live's
 * rgba(198,212,224,.7) / rgba(124,138,152,.5) / #057FEB. Only geometry is set here.
 * `.pc-select.dropdown-form` (3 classes) outranks the shared 2-class form rules. */
.pc-filterbar { flex: 0 0 48px; height: 48px; display: flex; align-items: flex-start; gap: 6px; }
.pc-select { width: 250px; }
/* Trigger: 250×28, radius 4, 13px/20px Verdana. Text starts 12px in (1 border +
 * 11 padding); with a prefix icon the padding drops to 5px and the 18×18 icon keeps
 * 4px to its right, so the text starts at 28px — both of live's cases. */
.pc-select.dropdown-form .dropdown-trigger {
  display: flex; align-items: center;
  height: 28px; padding: 0 29px 0 11px;
  border-radius: 4px;
  font: 13px/20px Verdana, Arial, sans-serif;
}
.pc-select-cat.dropdown-form .dropdown-trigger { padding-left: 5px; }
.pc-select .dropdown-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-select .dropdown-prefix { flex: 0 0 18px; width: 18px; height: 18px; margin-right: 4px; }
/* Menu = live `.v-select2-dropdown`: 1px under the trigger (top 29), trigger-wide,
 * 1px border + 7px padding (rows inset 8px), radius 4, one soft
 * 0 1px 4px rgba(0,0,0,.16) shadow. */
.pc-select.dropdown-form .dropdown-menu {
  top: 29px; padding: 7px; border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}
/* Rows: 28px, radius 3, padding 0 12px 0 6px, 13px/28px. The highlight is the
 * shared class-driven .is-activated bar (live moves an `activated` class). */
.pc-select.dropdown-form .dropdown-option {
  display: flex; align-items: center;
  height: 28px; padding: 0 12px 0 6px;
  font: 13px/28px Verdana, Arial, sans-serif;
}
.pc-select .dropdown-option-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Category icons: live's own PkgManApp sprite (a 2x sheet, drawn 36px wide in 18px
 * cells), 6px before the text in a row (text at x=38). */
.pc-select .dropdown-icon {
  width: 18px; height: 18px;
  background-image: url("../../assets/img/pkg-category-icons.png");
  background-size: 36px auto;
}
.pc-select .dropdown-option .dropdown-icon { margin-right: 6px; }
.pc-cat-all          { background-position: 0 0; }
.pc-cat-backup       { background-position: 0 -18px; }
.pc-cat-business     { background-position: 0 -36px; }
.pc-cat-devtools     { background-position: 0 -54px; }
.pc-cat-productivity { background-position: 0 -90px; }
.pc-cat-security     { background-position: 0 -108px; }
.pc-cat-management   { background-position: 0 -126px; }
.pc-cat-utilities    { background-position: 0 -144px; }
/* The 8-row category list is capped at live's 184px list height (200 with padding
 * and border) and scrolls under an overlay bar drawn by wireMenuScroll(). */
.pc-select-cat .dropdown-menu { max-height: 200px; overflow-y: auto; }
.pc-menu-bar { z-index: 31; display: none; }
.pc-select-cat.is-open .pc-menu-bar { display: block; }
.pc-select-cat.is-open .pc-menu-bar.is-fit { display: none; }
/* Sort rows: a 24×24 check column — live's `selected` sprite cell, blank when off —
 * 6px before the text (text at x=44). The base dropdown's CSS tick is switched off. */
.pc-select-sort.dropdown-form .dropdown-check {
  display: block; flex: 0 0 24px; width: 24px; height: 24px; margin-right: 6px;
}
/* The base dropdown's CSS tick (.dropdown-option.is-selected .dropdown-check::before,
 * 0,3,1) would paint a SECOND check over the sprite — out-rank it. */
.pc-select-sort.dropdown-form .dropdown-option .dropdown-check::before { content: none; }
.pc-select-sort .dropdown-option.is-selected .dropdown-check,
.pc-select-sort .dropdown-option.is-checked .dropdown-check {
  background: url("../../assets/img/pkg-select-check.png") no-repeat 0 0 / 24px auto;
}
/* Arrow = live's v-select2 `.v-select2-dropdown-icon`, not the site's 8×4 CSS
 * triangle: a 24×24 cell of the SVC sprite (assets/img/select2-dropdown-arrow.png, a
 * 2x sheet drawn 24px wide: grey at 0, blue at -24px), 2px in from the outer right edge and
 * vertically centred. Grey at rest AND on hover; blue while the menu is open and while
 * the select keeps focus after a pick or Esc (live `.focused`), back to grey on blur.
 * The focused state also keeps the border blue, as live does. */
.pc-select.dropdown-form .dropdown-arrow,
.pc-select.dropdown-form .dropdown-trigger:hover .dropdown-arrow {
  top: 1px; right: 1px; width: 24px; height: 24px;   /* inside the 1px border = live x224 y2 */
  border: 0;
  background: url("../../assets/img/select2-dropdown-arrow.png") no-repeat 0 0 / 24px auto;
}
.pc-select.dropdown-form.is-open .dropdown-trigger .dropdown-arrow,
.pc-select.dropdown-form .dropdown-trigger:focus .dropdown-arrow { background-position: 0 -24px; }
/* The shared arrow is the Vue SVC svg; PkgManApp's own v-select2 build paints this PNG
 * instead (live `.is-bkg`), so the inline svg is hidden here. */
.pc-select .dropdown-arrow svg { display: none; }
.pc-select.dropdown-form .dropdown-trigger:focus { border-color: var(--dropdown-form-border-active); outline: 0; }

/* "No match found." when the filters (or the search) leave nothing: fill the pane
 * so the shared empty box centres like Beta's. */
.pc-filter-empty { flex: 1 1 auto; display: flex; }

/* ——— Legal footer ——— live `.legal-link-wrapper` (All Packages only; the
 * Installed and Beta panes have none): centered row, margin 16px 0 15px,
 * 13px underlined --main-tier1 links spaced 4px apart. A `.pkg-center-space-
 * occupier` above it (flex:1) pins the row to the bottom of the scroll content. */
.pc-spacer { flex: 1 1 auto; min-height: 62px; }
.pc-legal { display: flex; justify-content: center; margin: 16px 0 15px; }
.pc-legal a {
  margin: 0 4px;
  font: 13px/20px Verdana, Arial, sans-serif;
  color: var(--main-tier1);
  text-decoration: underline;
  cursor: pointer;
}
.pc-legal a:hover { color: var(--main-tier1-dark); }
.pc-legal a:active { color: #005CAD; }

/* ——— Beta Packages empty state ——— live `.v-empty-view`: a 120×160 box centered
 * in the pane — a 120×120 background icon + 20px gap + a 13px/20px
 * rgba(65,75,85,.6) line reading "No match found.". Icon = the real live asset
 * (PkgManApp dist 1472048368f737d882ab.png, 240×240 → drawn at 120). */
.pc-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-empty-box { width: 120px; text-align: center; }
.pc-empty-icon { display: block; width: 120px; height: 120px; }
.pc-empty-text {
  margin: 20px 0 0;
  font: 13px/20px Verdana, Arial, sans-serif;
  color: var(--font-grey-tier2);
}
