/**
 * Component: bullion table view - the Ledger borrowing
 *
 * Weight, purity, price and price-per-ounce align down columns so a buyer can
 * compare vertically without moving their eye. Everything numeric is tabular.
 *
 * Same tokens and same type as the rest of the theme - this is a density
 * variant, not a second design language.
 */

.tcs-ledger {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--tcs-text-sm);
	min-width: 52rem;
}

.tcs-ledger caption {
	text-align: start;
}

.tcs-ledger thead th {
	font-family: var(--tcs-font-sans);
	font-size: var(--tcs-text-3xs);
	font-weight: var(--tcs-weight-semibold);
	letter-spacing: var(--tcs-tracking-label);
	text-transform: uppercase;
	color: var(--tcs-ink-faint);
	text-align: start;
	padding: var(--tcs-space-xs) var(--tcs-space-sm);
	border-block-end: 1px solid var(--tcs-rule-strong);
	white-space: nowrap;
	background: var(--tcs-paper);
	position: sticky;
	top: 0;
	z-index: var(--tcs-z-base);
}

.tcs-ledger__num {
	text-align: end;
}

.tcs-ledger tbody td,
.tcs-ledger tbody th {
	padding: var(--tcs-space-sm);
	border-block-end: var(--tcs-border-faint);
	vertical-align: middle;
	font-weight: var(--tcs-weight-regular);
	color: var(--tcs-ink-muted);
}

.tcs-ledger__row:hover td,
.tcs-ledger__row:hover th {
	background: var(--tcs-surface);
}

.tcs-ledger__product {
	text-align: start;
	min-width: 16rem;
}

.tcs-ledger__product a {
	color: var(--tcs-ink);
	font-weight: var(--tcs-weight-medium);
	text-decoration: none;
}

.tcs-ledger__product a:hover {
	color: var(--tcs-accent);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.tcs-ledger td.tcs-ledger__num {
	color: var(--tcs-ink);
	font-weight: var(--tcs-weight-semibold);
	white-space: nowrap;
}

/*
 * Price per ounce is secondary to price: it is a comparison aid, not the
 * figure being charged, and must not compete with it.
 */
.tcs-ledger__unit {
	font-weight: var(--tcs-weight-regular) !important;
	color: var(--tcs-ink-muted) !important;
	font-size: var(--tcs-text-xs);
}

/* An em dash where metal content cannot be established reliably. */
.tcs-ledger__blank {
	color: var(--tcs-ink-faint);
}

.tcs-ledger__action {
	text-align: end;
	white-space: nowrap;
}

.tcs-ledger__action .tcs-button {
	display: inline-flex;
	width: auto;
}

/* Unavailable rows recede but stay readable. */
.tcs-ledger__row--soldout th a,
.tcs-ledger__row--comingsoon th a {
	color: var(--tcs-ink-muted);
}

/* Woo's loop add-to-cart emits a "view cart" link that breaks the row. */
.tcs-ledger__action .added_to_cart {
	display: none;
}
