/* 20-floorplan.css — the zoom-spine top: containment browser tiles
 * (DC / Floor / Room) and the room floorplan's rack footprints. Each tile
 * carries a live % ring from the progress engine.
 */

/* ---- browser tiles (DC → Floor → Room) ------------------------------- */
.tile {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  transition: border-color .12s, transform .08s, background .12s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-name {
  font-weight: 700; font-size: 15px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-sub { font-size: 12.5px; }
.tile-badge {
  margin-top: 4px; align-self: flex-start;
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
}

/* ---- expand-in-place containment tree (DC → Floor → Room → Rack) ----- */
.tree { display: flex; flex-direction: column; gap: 10px; }
.tw-node { display: flex; flex-direction: column; }

.tw-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  transition: border-color .12s, background .12s;
}
.tw-row:hover { border-color: var(--accent); }
.tw-row.leaf { border-left: 3px solid var(--accent); }

.tw-chev {
  flex: none; width: 14px; text-align: center; color: var(--ink-dim);
  transition: transform .12s; font-size: 12px;
}
.tw-chev.open { transform: rotate(90deg); color: var(--accent); }
.tw-chev.hidden { visibility: hidden; }

.tw-main { display: flex; flex-direction: column; gap: 1px; min-width: 120px; }
.tw-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.tw-sub { font-size: 12px; }
.tw-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }

/* the child progress snapshot strip (DMs under a floor, racks under a DM) */
.tw-snap {
  margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px 14px;
  align-items: center; justify-content: flex-end; max-width: 60%;
}
.tw-snap + .tw-actions { margin-left: 14px; }
.tw-snap-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tw-snap-label {
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
  max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* nested children: indent + a guide rail down each level */
.tw-children {
  margin: 8px 0 2px 22px; padding-left: 14px;
  border-left: 2px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.tw-add { padding: 2px 0; }

/* level accents on the ring border so depth is legible at a glance */
.lvl-dc   > .tw-row { border-top: 3px solid var(--accent); }
.lvl-floor > .tw-row { border-top: 2px solid var(--accent-2); }
.lvl-room  > .tw-row { border-top: 2px solid var(--g-patched); }

/* ---- room floorplan: rack footprints --------------------------------- */
.rack-floor {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.rack-foot {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 14px; border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow);
  transition: border-color .12s, transform .08s;
}
.rack-foot:hover { border-color: var(--accent); transform: translateY(-2px); }
.rack-foot .tile-name { font-size: 14px; }
.rack-foot .tile-sub { font-size: 12px; }

/* PM-only first-run affordance under the empty browser root */
.sample-cta {
  margin-top: 24px; padding: 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border: 1px dashed var(--line); border-radius: var(--r);
  background: var(--surface);
}
.sample-cta .muted { font-size: 13px; max-width: 460px; }
