/* pages/desktop.css — desktop + Main Menu launcher interactions (pages/desktop.js).
 *
 * Bespoke DSM shell (live `sds-*` / `launch-icon`, no SVC `v-` class) → package-local, and
 * kept out of shared/components.css, which is already past its split threshold.
 * Every value is live's own: PAS7700_POC 172.21.3.80 webman/desktop/dist/style.css,
 * read 2026-10-02 (live selector in each comment).
 */

/* Tiles are absolutely placed so a reorder can SLIDE them (live .launch-icon.transition-cls:
 * left/top .5s ease after a .3s delay). Positions come from JS at live's grid. */
.desktop-shortcuts.is-abs { display: block; position: relative; padding: 0; }
.desktop-shortcuts.is-abs > .shortcut { position: absolute; box-sizing: border-box; }
.mm-grid.is-abs { position: relative; display: block; }
.mm-grid.is-abs > .mm-app { position: absolute; height: 156px; }
.desktop-shortcuts.desk-anim > .shortcut,
.mm-grid.desk-anim > .mm-app,
.desk-sub-ct.desk-anim > .desk-sub-item { transition: left .5s ease .3s, top .5s ease .3s; }

/* Rubber-band selection — live .sds-desktop-select-range / .launch-icon.sds-desktop-icon-selected */
.desk-band {
  position: absolute; z-index: 3; pointer-events: none;
  background-color: rgba(255, 255, 255, .3); border: 1px solid #fff;
}
.shortcut.is-selected { background-color: rgba(255, 255, 255, .3); border-radius: 10px; }

/* Group tile — live .virtual-group-icon-background (64², #282d32 at .75, r5) holding up to
 * four 24px member icons (.sds-grouping-preview-icon); hovering shows one 48px member
 * (.sds-grouping-big-preview-icon at 8,8). */
.desk-group-image { position: relative; }
.desk-group-bg {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px;
  opacity: .75; background-color: #282d32; border-radius: 5px;
}
.desk-group-mini { position: absolute; width: 24px; height: 24px; background: no-repeat 0 0 / 24px 24px; }
.desk-group-big {
  position: absolute; left: 8px; top: 8px; width: 48px; height: 48px;
  background: no-repeat 0 0 / 48px 48px; display: none;
}
.desk-group-image.is-peek .desk-group-mini { display: none; }
.desk-group-image.is-peek .desk-group-big { display: block; }

/* Group popup — live .sds-sub-container (316×192, r5) on .virtual-group-background
 * (#282d32 at .75 + 0 2px 4px rgba(0,0,0,.5)) with a 22×35 arrow pointing at the group. */
.desk-sub { position: absolute; z-index: 4; width: 316px; height: 192px; border-radius: 5px; }
.desk-sub-bg {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: -1;
  background-color: #282d32; opacity: .75; border-radius: 5px; box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}
.desk-sub-arrow { position: absolute; left: -22px; top: 84px; width: 22px; height: 35px; overflow: hidden; }
.desk-sub-arrow::after {
  content: ""; position: absolute; left: 6px; width: 16px; height: 16px;
  background-color: #282d32; transform-origin: right top; transform: rotate(-45deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}
/* live .virtual-group-arrow.right-arrow (popup flipped to the icon's left) */
.desk-sub-arrow.is-right { left: 316px; }
.desk-sub-arrow.is-right::after { left: auto; right: 6px; transform-origin: left top; transform: rotate(45deg); }
/* Title — live .virtual-group-input-wrapper + .sds-sub-container-desc */
.desk-sub-head {
  position: relative; margin: 0 10px; width: calc(100% - 20px);
  border-bottom: 1px solid rgba(198, 212, 224, .4);
}
.desk-sub-title {
  display: block; box-sizing: border-box; width: 100%; height: 26px; margin: 7px 0;
  padding: 0 0 0 12px; border: 1px solid transparent; border-radius: 4px;
  background-color: transparent; color: #fff; outline: 0;
  font: 700 13px Verdana, Arial, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.desk-sub-title:hover { border-color: rgba(124, 138, 152, .5); background-color: #fff; color: #414b55; }
.desk-sub-title:focus { border-color: #2396fa; background-color: #fff; color: #414b55; }
/* Members — live v-scrollbar 152px; .sds-sub-container-div-ct margin 24/20/0/20; 64×128
 * icon items, 3 columns 106px apart (64 + live's 42px horizontal margin); white labels. */
/* lint-allow: scrollbar — desktop folder pop-up on the wallpaper: live v-scrollbar with a white thumb, not the light-surface .svc-scroll look */
.desk-sub-scroll { position: relative; height: 152px; overflow-x: hidden; overflow-y: auto; }
.desk-sub-scroll::-webkit-scrollbar { width: 8px; }
.desk-sub-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .3); border-radius: 6px; }
.desk-sub-ct { position: relative; margin: 24px 20px 0 20px; }
.desk-sub-item {
  position: absolute; width: 64px; height: 128px;
  text-align: center; color: #fff; cursor: pointer; user-select: none;
}
.desk-sub-item .shortcut-icon-wrap { width: 64px; height: 64px; }
.desk-sub-item .shortcut-label { width: 106px; margin: 4px 0 0 -21px; overflow: hidden; }

/* Drag ghost — live .sds-launch-icon-dragging-proxy / .appview-icon-dragging-proxy on an
 * .x-dd-drag-proxy (opacity .7): the tile with its label hidden, at pointer +20/+20, and the
 * 24px .x-dd-drop-icon from dd_icn.png at (52,52) — (58,52) for a Main Menu tile:
 * ✓ valid (0 0), ✕ invalid (0 -24px), none while reordering (.x-dd-reposition-ok). */
.desk-ghost { position: fixed; left: -9999px; top: -9999px; z-index: 999999; pointer-events: none; opacity: .7; }
.desk-ghost-body > .shortcut,
.desk-ghost-body > .mm-app,
.desk-ghost-body > .desk-sub-item {
  position: static !important; transform: none !important; background: none !important;
}
.desk-ghost .shortcut-label, .desk-ghost .mm-app-label { visibility: hidden; }
/* In the ghost the tile loses its top padding and the icon its auto-centring margin (live
 * `.sds-launch-icon-dragging-proxy .launch-icon { padding-top: 0 }`, `.x-dd-drag-ghost .image
 * { margin: 0 }`; the menu's `.appview-icon-dragging-proxy` does the same), so the icon sits
 * at the ghost's (0,0) and the badge at (52,52) overlaps its BOTTOM-RIGHT corner. */
.desk-ghost-body > .shortcut,
.desk-ghost-body > .desk-sub-item,
.desk-ghost-body > .mm-app { padding: 0 !important; }
.desk-ghost .shortcut-icon-wrap,
.desk-ghost .mm-app-icon { margin: 0 !important; }
.desk-ghost-drop {
  position: absolute; z-index: 1; left: 52px; top: 52px; width: 24px; height: 24px;
  background: url("../assets/img/desk-dd-icon.png") no-repeat 0 0 / 24px 72px;
}
.desk-ghost.is-menu .desk-ghost-drop { left: 58px; }
.desk-ghost.is-invalid .desk-ghost-drop { background-position: 0 -24px; }
.desk-ghost.is-ok .desk-ghost-drop { background-image: none; }
/* several selected icons — live .sds-desktop-dd-ct (144×240), 64px icons stacked */
.desk-ghost-stack { width: 144px; height: 240px; }
.desk-ghost-stack > .shortcut-icon-wrap { width: 64px; height: 64px; }

/* "+1" after an icon is dropped on a Main Menu side zone — live .add-icon (80×64) entering
 * with `.bounce-enter-active { animation: bounce .4s ease-out }`, removed after 1s. The
 * keyframes are live's own (identical in sds.css, desktop, taskbar and AdminCenter
 * styles): it drops in, lands at 40%, BOUNCES back up 30% at 60%, lands at 80%, gives a
 * last 10% hop at 90% and settles — the 60%/90% hops are what make it "jump". */
.desk-add-icon {
  position: fixed; z-index: 999998; width: 80px; height: 64px; pointer-events: none;
  background: url("../assets/img/desk-add-icon.png") no-repeat 0 0 / 80px 64px;
  animation: desk-bounce .4s ease-out;
}
@keyframes desk-bounce {
  0%, 5% { transform: translateY(-100%); opacity: 0; }
  15% { transform: translateY(-100%); }
  30% { transform: translateY(-80%); }
  40%, 80%, 100% { transform: translateY(0%); }
  60% { transform: translateY(-30%); }
  90% { transform: translateY(-10%); }
  100% { opacity: 1; }
}
