/* css/components/wealth-breakdown.css */

/* ── Kontoscroll ── */
.account-scroll {
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 var(--s-2);
}
.account-scroll::-webkit-scrollbar { display: none; }

.account-card {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-2) var(--s-3);
  min-width: 108px;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.account-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--account-color, var(--accent));
}

.account-card__logo {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  height: 18px;
}

.account-card__logo svg {
  display: block;
}

.account-card__logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-sm);
  background: var(--account-color, var(--accent));
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.account-card__institution {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.account-card__name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: var(--s-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-card__value {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: var(--text-1);
  white-space: nowrap;
}

/* ── Asset Bar ── */
.asset-bar-wrap { margin: var(--s-2) 0 var(--s-3); }

.asset-bar {
  display: flex;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  gap: 1px;
  background: var(--border);
}

.asset-bar__segment {
  height: 100%;
  transition: opacity 0.15s;
  min-width: 4px;
}

.asset-bar__segment:hover { opacity: 0.8; }

/* ── Asset Legend ── */
.asset-legend {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.asset-legend__item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
}

.asset-legend__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.asset-legend__label {
  flex: 1;
  color: var(--text-2);
}

.asset-legend__value {
  font-weight: 600;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

.asset-legend__pct {
  font-size: 11px;
  color: var(--text-2);
  min-width: 32px;
  text-align: right;
}

.asset-legend__divider {
  height: 1px;
  background: var(--border);
  margin: var(--s-2) 0;
}

.asset-legend__item--loan .asset-legend__label { color: var(--text-2); }
.asset-legend__item--loan .asset-legend__value { color: var(--loss); font-weight: 600; }

.asset-legend__item--total {
  padding-top: var(--s-1);
}
.asset-legend__label--total {
  color: var(--text-1);
  font-weight: 600;
}
.asset-legend__value--total {
  color: var(--text-1);
  font-weight: 700;
  font-size: 14px;
}
