/* Wallet page ([woochain_wallet]): hero, actions and route tabs around the market app.
   Colors and font follow the active Woochain design skin (--ys-* tokens), with fallbacks for any theme. */

.wcw-wallet {
	--wcw-text: var(--ys-text, #111827);
	--wcw-muted: var(--ys-muted, #6b7280);
	--wcw-faint: #9ca3af;
	--wcw-border: var(--ys-border, #e5e7eb);
	--wcw-surface: var(--ys-surface, #ffffff);
	--wcw-soft: var(--ys-surface-alt, #f3f4f6);
	--wcw-accent: var(--ys-accent, #00c853);
	--wcw-accent-strong: var(--ys-accent, #00b34a);
	font-family: var(--ys-font-body, inherit);
	color: var(--wcw-text);
	max-width: 72rem;
	margin: 0 auto;
	padding: 16px;
	box-sizing: border-box;
}
.wcw-wallet *,
.wcw-wallet *::before,
.wcw-wallet *::after { box-sizing: border-box; }

.wcw-card {
	background: var(--wcw-surface);
	border: 1px solid #f3f4f6;
	border-radius: 32px;
	padding: 24px;
	min-height: 600px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.wcw-hero {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 32px;
}
.wcw-total-label { color: var(--wcw-muted); font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.wcw-total {
	font-size: clamp(2.4rem, 5vw, 3.75rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.1;
	margin-bottom: 8px;
	color: var(--wcw-text);
	font-variant-numeric: tabular-nums;
}
.wcw-subtitle { color: var(--wcw-faint); font-weight: 500; }

/* Remembered total while the fresh one loads (or on tabs that do not load balances) */
.wcw-total-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.wcw-total-row .wcw-total { margin-bottom: 0; transition: opacity .2s; }
.wcw-total.is-stale { opacity: .45; }
.wcw-total-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--wcw-soft);
	color: var(--wcw-muted);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.wcw-total-status[hidden] { display: none; }

.wcw-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.wcw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 0;
	border-radius: 999px;
	padding: 12px 24px;
	font: inherit;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, filter .15s, color .15s;
}
.wcw-btn:focus-visible,
.wcw-tab:focus-visible { outline: 2px solid var(--wcw-accent); outline-offset: 2px; }
.wcw-btn-primary { background: var(--wcw-accent); color: #fff; box-shadow: 0 4px 6px -1px rgba(34, 197, 94, .2), 0 2px 4px -2px rgba(34, 197, 94, .2); }
.wcw-btn-primary:hover,
.wcw-btn-primary:focus { filter: brightness(.94); color: #fff; }
.wcw-btn-secondary { background: var(--wcw-soft); color: var(--wcw-text); }
.wcw-btn-secondary:hover,
.wcw-btn-secondary:focus { background: #e5e7eb; color: var(--wcw-text); }
.wcw-btn-round { width: 44px; height: 44px; padding: 0; background: #f9fafb; color: var(--wcw-faint); border: 1px solid #f3f4f6; }
.wcw-btn-round:hover { background: var(--wcw-soft); color: var(--wcw-muted); }
.wcw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wcw-btn-round .wcw-sr { position: absolute; }

/* Route tabs: one line, scroll sideways on small screens */
.wcw-tabs {
	display: flex;
	align-items: center;
	gap: 24px;
	border-bottom: 1px solid #f3f4f6;
	margin-bottom: 24px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.wcw-tabs::-webkit-scrollbar { display: none; }
.wcw-tab {
	position: relative;
	flex: 0 0 auto;
	white-space: nowrap;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	padding: 0 0 16px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--wcw-faint);
	cursor: pointer;
	transition: color .15s;
}
.wcw-tab:hover { color: var(--wcw-muted); background: none; }
.wcw-tab.is-active { color: var(--wcw-text); }
.wcw-tab.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	border-radius: 999px;
	background: var(--wcw-accent);
}

.wcw-app { flex: 1; min-width: 0; }

/* The market app sits inside the card: no second panel, no second set of tabs, no second total card */
.wcw-wallet .wcw-app .yoh-balances { background: transparent; padding: 0; border-radius: 0; box-shadow: none; }
/* only the app's page tabs (#nav-tab); a page's own tabs, like Open Orders / Trade History on Orders, stay */
.wcw-wallet .wcw-app #balances #nav-tab.nav-tabs,
.wcw-wallet .wcw-app #balances nav:has(> #nav-tab) { display: none !important; }
.wcw-wallet .wcw-app #balances .balances-component > div > .container > .row.mb-3:first-child { display: none !important; }
.wcw-wallet .wcw-app #balances .tab-content > .tab-pane > .row:first-child h3 { margin-top: 0; }

@media (min-width: 768px) {
	.wcw-wallet { padding: 32px; }
	.wcw-card { padding: 32px; }
	.wcw-hero { flex-direction: row; gap: 0; margin-bottom: 40px; }
}
