/* Biome Groups Editor — terraform ladder presets */

.bge-ladder-wrap,
.bge-timeline-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bge-ladder-canvas,
.bge-timeline-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bge-ladder-canvas.is-interactive {
  cursor: pointer;
}

.bge-ladder-canvas.is-interactive.is-hovering {
  cursor: pointer;
}

.bge-app {
  grid-template-columns: 260px 1fr 360px;
}

.bge-header {
  align-items: center;
}

.bge-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bge-order-panel {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #2a3140;
  background: #10131a;
}

.bge-order-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #2a3140;
}

.bge-order-toolbar .de-input {
  flex: 1;
  min-width: 0;
}

.bge-order-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bge-order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

.bge-order-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.bge-order-item.is-selected {
  border-color: rgba(94, 207, 122, 0.55);
  background: rgba(94, 207, 122, 0.1);
}

.bge-order-item.is-dragging {
  opacity: 0.45;
}

.bge-order-item__grip {
  color: #5a6478;
  font-size: 14px;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.bge-order-item__swatch {
  width: 12px;
  height: 28px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.bge-order-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bge-order-item__label {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bge-order-item__meta {
  font-size: 10px;
  color: #8899aa;
  font-family: ui-monospace, monospace;
}

.bge-order-item__actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.bge-order-item__actions button {
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1;
}

.bge-main {
  grid-row: 2;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0c0e14;
}

.bge-timeline-hint {
  padding: 8px 14px;
  font-size: 11px;
  color: #8899aa;
  border-top: 1px solid #2a3140;
  flex-shrink: 0;
}

.bge-sidebar {
  grid-row: 2;
  grid-column: 3;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}

.bge-land-order {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.bge-land-order-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
}

.bge-land-order-item__swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.bge-land-order-item__id {
  flex: 1;
  font-family: ui-monospace, monospace;
}

.bge-land-order-item__open {
  border: none;
  background: transparent;
  color: #c8d4e0;
  text-align: left;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.bge-land-order-item__open:hover {
  color: #5ecf7a;
  text-decoration: underline;
}

.bge-veg-collection {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.bge-veg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 4px;
}

.bge-veg-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bge-veg-row__kind {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a8a9a;
  width: 36px;
  flex-shrink: 0;
}

.bge-veg-row__id {
  flex: 1;
  font-family: ui-monospace, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bge-stats {
  font-size: 11px;
  color: #8899aa;
  line-height: 1.5;
  margin-top: 8px;
}

.bge-veg-per-land,
.bme-ladder-steps-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.bme-ladder-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bme-group-detail-header {
  margin-bottom: 10px;
}

.bme-group-detail-header__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 650;
  color: #e8eaed;
}

.bme-group-detail-header__ladder {
  margin: 0;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  color: #8899aa;
  line-height: 1.45;
}

.bme-ladder-step-block__band {
  margin-bottom: 8px;
}

.bme-ladder-step-block__terrain {
  margin-bottom: 8px;
}

.bme-ladder-step-block__terrain .bce-splat-grid {
  max-height: 180px;
  overflow-y: auto;
}

.bge-veg-land-block {
  border: 1px solid #2a3140;
  border-radius: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.bge-veg-land-block__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.bge-veg-land-block__swatch {
  width: 14px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.bge-veg-land-block__id {
  font-size: 12px;
  font-weight: 650;
  font-family: ui-monospace, monospace;
  color: #e2e8f0;
}

.bge-veg-land-block__count {
  font-size: 10px;
  color: #8899aa;
}

.bge-veg-land-block__empty {
  margin: 0;
}

.bge-veg-per-land .bce-veg-slots {
  max-height: none;
}

.bge-manual-veg-toggle {
  margin-top: 12px;
}

.bge-seafloor-group {
  margin-top: 10px;
}

.bge-seafloor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.bge-seafloor-row__label {
  flex: 0 0 92px;
  font-size: 11px;
  color: #a8b4c4;
}

.bge-seafloor-row .de-input {
  flex: 1;
  min-width: 0;
}

.bge-dirty-badge {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(232, 196, 120, 0.45);
  background: rgba(56, 44, 24, 0.55);
  color: #ffe9b8;
  font-size: 11px;
  font-weight: 600;
}

.bge-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bge-modal[hidden] {
  display: none;
}

.bge-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(2px);
}

.bge-modal__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid #3a4558;
  background: #141820;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.bge-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #2a3140;
  flex-shrink: 0;
}

.bge-modal__title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  font-family: ui-monospace, monospace;
  color: #e8eaed;
}

.bge-modal__close {
  border: none;
  background: transparent;
  color: #9aa8b8;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.bge-modal__close:hover {
  color: #e8eaed;
  background: rgba(255, 255, 255, 0.06);
}

.bge-modal__body {
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
}

.bge-modal__body .bce-splat-grid {
  max-height: 220px;
}
