/* API pool cards do not have the legacy numbered column. */
#ecosystemOverview .eco-fund-track .eco-api-card {
  display: block;
  min-width: 0;
}

#ecosystemOverview .eco-api-card .eco-card-content {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(190px, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 14px 24px;
}

#ecosystemOverview .eco-api-card .eco-card-top {
  gap: 10px;
}

#ecosystemOverview .eco-api-card .eco-card-top h4 {
  line-height: 1.4;
  word-break: normal;
}

#ecosystemOverview .eco-api-card .eco-card-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
  align-items: start;
  gap: 16px 20px;
  margin: 0;
}

#ecosystemOverview .eco-api-card .eco-card-label,
#ecosystemOverview .eco-api-card .eco-card-secondary > span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: normal;
}

#ecosystemOverview .eco-api-card .eco-card-values .eco-card-secondary {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

#ecosystemOverview .eco-api-card .eco-card-amount,
#ecosystemOverview .eco-api-card .eco-card-secondary > b {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
  margin-top: 6px;
  line-height: 1.2;
  white-space: nowrap;
}

#ecosystemOverview .eco-api-card .eco-card-amount strong {
  font-size: clamp(21px, 2.1vw, 26px);
}

#ecosystemOverview .eco-api-card .eco-card-secondary > b {
  font-size: 20px;
}

#ecosystemOverview .eco-api-card .eco-card-amount small,
#ecosystemOverview .eco-api-card .eco-card-secondary small {
  flex: 0 0 auto;
  font-size: 10px;
}

#ecosystemOverview .eco-api-card .eco-card-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0;
  padding-top: 0;
}

#ecosystemOverview .eco-api-card .eco-card-foot .text-button {
  flex: 0 0 auto;
}

/* Currency and network are shown once in the order header. */
#mainContent #builderCyclePicker.live-product-picker,
#orderModal #cyclePicker.live-product-picker {
  display: flex;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-padding-inline: 6px;
}

#mainContent #builderCyclePicker.live-product-picker > button,
#orderModal #cyclePicker.live-product-picker > button {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  height: auto;
  min-height: 40px;
  padding: 9px 8px;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}

#mainContent #builderCyclePicker.live-product-picker > button small,
#orderModal #cyclePicker.live-product-picker > button small {
  font-size: 10px;
  line-height: 1.3;
}

@media (max-width: 900px) {
  #ecosystemOverview .eco-api-card .eco-card-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  #mainContent #builderCyclePicker.live-product-picker > button,
  #orderModal #cyclePicker.live-product-picker > button {
    font-size: 12px;
  }
}

/* Keep the progress and its action inside the desktop order row. */
@media (min-width: 641px) {
  #mainContent #ordersTable > tr > td {
    padding-block: 14px;
    vertical-align: middle;
  }

  #mainContent #ordersTable .table-progress {
    width: 160px;
    max-width: 100%;
  }

  html.violet-app #mainContent #ordersTable .order-settlement-trigger {
    min-height: 32px;
    margin-top: 8px;
    padding: 5px 12px;
    font-size: 11px;
    line-height: 20px;
  }
}

/* The asset card now shows the available NOVA balance alone. */
#mainContent .nova-asset-balances {
  grid-template-columns: minmax(0, 1fr);
}

#mainContent .order-center-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#mainContent .order-center-summary > div:nth-child(3) {
  border-top: 0;
  border-left: 1px solid rgba(129, 157, 215, .12);
}

@media (max-width: 640px) {
  #mainContent .order-center-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mainContent .order-center-summary > div:nth-child(3) {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid rgba(129, 157, 215, .12);
  }
}
