/* v382: readable total assets and cash-aware stock sell-all rails. */
body[data-stock-cash-release="382"] #stock-sellall-source {
  align-items: center;
}

body[data-stock-cash-release="382"] #stock-sellall-source > .stock-sellall-copy {
  min-width: 0;
  gap: 0;
}

body[data-stock-cash-release="382"] .stock-source-cash,
body[data-stock-cash-release="382"] .sticky-sellall-cash {
  min-width: 0;
  color: #6b7684;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 650;
  line-height: 16px;
  white-space: nowrap;
}

body[data-stock-cash-release="382"] .stock-source-cash {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 1px;
}

body[data-stock-cash-release="382"] :is(#stock-source-cash, #sticky-sellall-cash) {
  min-width: 0;
  overflow: hidden;
  color: #333d4b;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-overflow: clip;
  white-space: nowrap;
}

body[data-stock-cash-release="382"] #stock-source-sellall {
  grid-area: auto !important;
  min-width: clamp(112px, 29.7vw, 116px);
  min-height: 48px;
  padding-inline: 14px;
}

body[data-stock-cash-release="382"] #feature-panel-shell > .sticky-sellall-bar {
  display: grid;
  min-height: 62px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

body[data-stock-cash-release="382"] #sticky-sellall-bar .sticky-sellall-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

body[data-stock-cash-release="382"] .sticky-sellall-portfolio {
  display: grid;
  min-width: 0;
  gap: 1px;
}

body[data-stock-cash-release="382"] #sticky-sellall-bar .sticky-sellall-portfolio > span {
  min-width: 0;
  overflow: hidden;
}

body[data-stock-cash-release="382"] #sticky-sellall-label {
  white-space: nowrap;
}

body[data-stock-cash-release="382"] #sticky-sellall-bar .sticky-sellall-portfolio > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

body[data-stock-cash-release="382"] .sticky-sellall-cash {
  display: grid;
  justify-items: end;
  align-content: center;
  text-align: right;
}

body[data-stock-cash-release="382"] #feature-panel-shell > .sticky-sellall-bar #sticky-sellall-btn {
  min-width: clamp(108px, 28.7vw, 112px);
  min-height: 46px;
  padding-inline: 14px;
}

/* The guided sell rail owns a long instruction in the value slot. Keep its
   existing readable width; cash remains visible in the non-guided stock UI. */
body[data-stock-cash-release="382"][data-tutorial-action-lock] .sticky-sellall-cash {
  display: none;
}
