diff --git a/packages/website/src/components/TankopediaLoadout/index.module.css b/packages/website/src/components/TankopediaLoadout/index.module.css index 1292b400c..06db23316 100644 --- a/packages/website/src/components/TankopediaLoadout/index.module.css +++ b/packages/website/src/components/TankopediaLoadout/index.module.css @@ -145,7 +145,9 @@ --line-thickness: var(--space-1); --line-border: var(--space-1) solid var(--gray-6); - margin-bottom: calc(var(--space-2) + var(--font-size-minor)); + &[data-has-bottom-cost="true"] { + margin-bottom: calc(var(--space-2) + var(--font-size-minor)); + } display: grid; gap: var(--depth-gap) var(--sibling-gap); diff --git a/packages/website/src/components/TankopediaLoadout/index.tsx b/packages/website/src/components/TankopediaLoadout/index.tsx index 49227db27..a50b42c3a 100644 --- a/packages/website/src/components/TankopediaLoadout/index.tsx +++ b/packages/website/src/components/TankopediaLoadout/index.tsx @@ -218,9 +218,19 @@ function ModuleTree() { [tank, resolve], ); + // Prices hang below the modules, so room is only reserved if the bottom row has one + const bottomRow = Math.max(...cells.map((cell) => cell.position[0])); + const hasBottomCost = cells.some( + (cell) => + cell.position[0] === bottomRow && + cell.unlock !== undefined && + cell.unlock.cost!.value > 0, + ); + return (