/* Starting Assets composes shared grouping panels, text fields, currency
   fields, and buttons. This file owns only its account-grid content layout. */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.asset-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.asset-group-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.asset-total {
  margin-top: 1px;
}

.account-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
}

/* A balance's validation message spans the row beneath its controls. */
.account-row .control-error {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .add-account-btn,
  .copy-assets-btn,
  .account-row .remove-account-btn {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 767px) {
  .asset-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .account-row {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 6px 8px;
    padding: 8px 0 10px;
    border-top: 1px solid var(--color-page);
  }

  .account-row .account-label-input { grid-column: 1 / -1; }
  .account-row .number-input-wrap { grid-column: 1; }
  .account-row .remove-account-btn {
    grid-column: 2;
    align-self: center;
    justify-self: end;
    height: 44px;
  }
  .account-row:first-child {
    border-top: 0;
    padding-top: 0;
  }
}

/* The copy-all button sits beside the title it acts on. On the page
   background it keeps the secondary white fill and action colour, without
   the outline; the transparent border keeps its size. */
.assets-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.copy-all-assets-btn.btn-secondary {
  border-color: transparent;
}
