/* vantage-topology-viewer.css - a topology to read (vantage-topology-viewer.js): the proposal
   builder's Topologies cards and the customer's proposal. The tree, its lines and the card's frame
   are the canon's org tree (.v-orgtree, vantage-ui.css); the pan and zoom are the canon's
   (.v-panzoom); the legend is the canon Legend's box (.fp-legend-box). What is here: the stage,
   a card's content, and where the legend sits. Tokens only. */

/* The stage: a floor plan card's height, its own background; the full screen fills it */
body.v-ui .tpv-stage { position: relative; height: 520px; border-radius: var(--vf-r); background: var(--vf-canvas); }
body.v-ui .v-fullscreen .tpv-stage { height: 100%; border-radius: 0; }
body.v-ui .tpv-stage .v-orgtree { overflow: visible; --v-orgtree-bg: var(--vf-canvas); }

/* A device: its name, its product's picture and name, then what it is and where */
body.v-ui .tpv-card { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; width: 220px; }
body.v-ui .tpv-name { font-size: var(--v-fs-body); color: var(--vf-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v-ui .tpv-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.v-ui .tpv-photo {
  width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: var(--vf-r-sm); background: var(--vf-panel); color: var(--vf-text-muted); overflow: hidden;
}
body.v-ui .tpv-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
body.v-ui .tpv-what {
  min-width: 0; font-size: var(--v-fs-label); line-height: 1.35; color: var(--vf-text); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.v-ui .tpv-meta { font-size: var(--v-fs-micro); line-height: 1.45; color: var(--vf-text-muted); }

/* Icons (the customer's, DesignTopologyModel.CUSTOMER_LOOK): a device as its picture, as stored,
   with nothing behind it, its name under it, as the designer's View: Icons draws one
   (admin-designs-topology.css .tp-icon). Down a stack, its name beside it, the spine's tick at the
   picture's middle. Nothing opens: what it is and where are in its hover card. */
.tpv-icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 124px; padding: 4px; box-sizing: border-box; border-radius: var(--vf-r-sm); text-align: center;
}
/* The picture's box is the picture's height, so the name sits right under it (.tp-icon-photo) */
.tpv-icon-photo { width: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--vf-text-muted); }
.tpv-icon-photo img { max-width: 100%; max-height: 56px; object-fit: contain; }
.tpv-icon-name {
  max-width: 100%; font-size: var(--v-fs-micro); line-height: 1.35; color: var(--vf-text);
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Its name, and under it an alarm device's zone or a shade's fabric, lighter */
.tpv-icon-text { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.tpv-icon-sub { font-size: var(--v-fs-micro); line-height: 1.35; color: var(--vf-text-muted); }
.v-orgtree-leaf > .tpv-icon { flex-direction: row; width: auto; max-width: 220px; gap: 10px; text-align: left; }
.v-orgtree-leaf > .tpv-icon .tpv-icon-photo { width: 44px; height: 44px; }
.v-orgtree-leaf > .tpv-icon .tpv-icon-photo img { max-height: 100%; }
.v-orgtree-leaf > .tpv-icon .tpv-icon-text { align-items: flex-start; }
body.v-ui .tpv-sheet.is-icons .v-orgtree-leaf { --v-orgtree-hook: 26px; }
body.v-ui .tpv-sheet.is-icons .v-orgtree-leaf.has-edge { --v-orgtree-hook: 48px; }

/* An amp's zone and its outputs, a partition, a window: small cards */
body.v-ui .tpv-group { width: 150px; padding: 8px 12px; gap: 2px; flex-direction: column; align-items: center; text-align: center; }
body.v-ui .tpv-group.is-zone { background: var(--vf-panel); }
body.v-ui .tpv-group.is-open { opacity: 0.6; border-style: dashed; }

/* The cable legend: the canon's folding Legend box over the stage's bottom left, as a plan's is
   (VantageUI.legendFloat; .fp-legend-float in vantage-ui.css), a sample of each line, then its note */
.tpv-legend-mark line { stroke: var(--v-orgtree-line, rgba(var(--gold-rgb), 0.25)); stroke-width: 2; }
.tpv-legend-mark.is-dashed line { stroke-dasharray: 4 3; }
body.v-ui .tpv-legend-note { max-width: 240px; margin-top: 6px; font-size: var(--v-fs-micro); line-height: 1.4; color: var(--vf-text-muted); }

/* Zoom Out, Fit, Zoom In and Full Screen in a card's header */
.tpv-tools { display: flex; gap: 4px; flex-shrink: 0; }
