/* Seeded-world generator form, inline under 总览 (src/UI/seeded-world-dialog.js; panel frame in styles.css). */

/* Every row in four equal quarters, label | input | label | input (human 2026-11-03: "all input window width 1/4 here"), so
   the inputs line up in two columns (长, 城市数, 人口下限, 路程下限 left; 宽, 国家数, 人口上限, 路程上限 right); the 地图种子 and 城市种子 rows their
   label in the first quarter and its input over the other three. A pair's two labels pass their name and input to the row's
   grid (display: contents). */
.seeded-world-pair,
.seeded-world-panel > .seeded-world-field {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  font-size: var(--font-medium);
}

.seeded-world-pair > .seeded-world-field {
  display: contents;
}

.seeded-world-panel > .seeded-world-field > :is(input, select) {
  grid-column: 2 / -1;
}

/* 恢复码 (v4.6): label | the code over two quarters | 复制 */
.seeded-world-panel > .seeded-world-code > input {
  grid-column: 2 / 4;
  font-family: ui-monospace, Consolas, "Cascadia Mono", monospace;
}

.seeded-world-field > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.seeded-world-field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 1px solid #9eaaa4;
  background: #fff;
  font-size: var(--font-medium);
}

/* 路程下限 / 路程上限 (human 2026-11-03: "add route length lower upper bound for the world when generating, under pop bound";
   "路程下限, 日 should show with grey in side input window"): the unit in grey inside the box at its right end, not part of
   the value */
.seeded-world-unit {
  position: relative;
  display: block;
  min-width: 0;
}

.seeded-world-unit > input {
  padding-right: 1.8em;
}

.seeded-world-unit > i {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: var(--font-medium);
  font-style: normal;
  font-weight: 400;
  pointer-events: none;
}

/* 水陆比例 in the last row (human 2026-11-03: "right to 随机种子, add 水陆比例. 0.3 means 30% land. default from 1/3 to 2/3"):
   a quarter as high as the row's buttons, its name kept visible as a grey 陆 inside the box (like the 日 unit); empty shows
   the default range as the placeholder, written ⅓—⅔ so it fits the quarter (1/3—2/3 is cut off at 1920 px) */
.seeded-world-land > input {
  width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  padding: 0 1.6em 0 6px;
  border: 1px solid #9eaaa4;
  background: #fff;
  font-size: var(--font-medium);
}

/* the status line only while it says something (human 2026-11-03: "delete such wide space in between": empty, its reserved
   line and margin left a gap above the overview tables) */
#seeded-world-status {
  margin: 0;
  font-size: var(--font-small);
}

#seeded-world-status:empty {
  display: none;
}

/* narrow: label | input, a field a line */
@media (max-width: 520px) {
  .seeded-world-pair,
  .seeded-world-panel > .seeded-world-field {
    grid-template-columns: 4em minmax(0, 1fr);
  }

  .seeded-world-panel > .seeded-world-code > :is(input, button) {
    grid-column: 2 / -1;
  }
}

/* A seeded map pans as one composited layer: moving the view does not repaint its terrain and territory bands. */
.map-stage.seeded-map .map-transform {
  will-change: transform;
}
