/**
 * UX guidance styles
 */

/* ── Page guide accordion ── */
.ux-page-guide,
.ux-how-it-works,
.ux-status-legend {
	margin-bottom: 1rem;
}

.ux-guide-details {
	border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 35%, transparent);
	border-radius: var(--md-sys-shape-corner-medium, 12px);
	background: color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent);
	overflow: hidden;
}

.ux-guide-summary {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	cursor: pointer;
	list-style: none;
	user-select: none;
	transition: background 0.15s;
}

.ux-guide-summary::-webkit-details-marker {
	display: none;
}

.ux-guide-summary:hover {
	background: color-mix(in srgb, var(--md-sys-color-primary) 6%, transparent);
}

.ux-guide-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent);
	color: var(--md-sys-color-primary);
	flex-shrink: 0;
	font-size: 0.9rem;
	font-weight: 700;
}

.ux-guide-summary-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.ux-guide-summary-text strong {
	font-size: 0.92rem;
	font-weight: 700;
}

.ux-guide-summary-text small {
	color: var(--text-muted);
	font-size: 0.78rem;
	line-height: 1.35;
}

.ux-guide-chevron {
	width: 0.5rem;
	height: 0.5rem;
	border-inline-end: 2px solid var(--text-muted);
	border-block-end: 2px solid var(--text-muted);
	transform: rotate(45deg);
	transition: transform 0.2s;
	flex-shrink: 0;
	margin-inline-start: 0.25rem;
}

.ux-guide-details[open] .ux-guide-chevron {
	transform: rotate(-135deg);
}

.ux-guide-body {
	padding: 0 1rem 1rem;
	border-top: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 20%, transparent);
}

.ux-guide-intro {
	margin: 0.85rem 0 0.75rem;
	color: var(--text-muted);
	font-size: 0.88rem;
	line-height: 1.55;
}

.ux-guide-steps {
	margin: 0 0 0.75rem;
	padding: 0;
	list-style: none;
	counter-reset: ux-step;
}

.ux-guide-steps li {
	counter-increment: ux-step;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 15%, transparent);
}

.ux-guide-steps li:last-child {
	border-bottom: none;
}

.ux-guide-steps li strong {
	font-size: 0.86rem;
}

.ux-guide-steps li strong::before {
	content: counter(ux-step) ". ";
	color: var(--md-sys-color-primary);
}

.ux-guide-steps li p {
	margin: 0;
	font-size: 0.82rem;
	color: var(--text-muted);
	line-height: 1.45;
}

.ux-guide-tips {
	margin: 0.5rem 0 0;
	padding: 0.65rem 0.85rem;
	list-style: none;
	background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
	border-radius: 8px;
	border-inline-start: 3px solid var(--md-sys-color-primary);
}

.ux-guide-tips li {
	font-size: 0.82rem;
	color: var(--text-muted);
	padding: 0.2rem 0;
	line-height: 1.45;
}

.ux-guide-tips li::before {
	content: "💡 ";
}

/* ── Flow diagram ── */
.ux-flow-diagram {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.ux-flow-step {
	flex: 1 1 10rem;
	display: flex;
	gap: 0.6rem;
	padding: 0.75rem;
	border-radius: 10px;
	background: var(--md-sys-color-surface-container-low, rgba(255,255,255,0.04));
	border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 25%, transparent);
}

.ux-flow-num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
	font-size: 0.82rem;
	font-weight: 800;
	flex-shrink: 0;
}

.ux-flow-step strong {
	display: block;
	font-size: 0.84rem;
	margin-bottom: 0.15rem;
}

.ux-flow-step p {
	margin: 0;
	font-size: 0.78rem;
	color: var(--text-muted);
	line-height: 1.4;
}

.ux-flow-arrow {
	align-self: center;
	color: var(--text-muted);
	font-size: 1.1rem;
	opacity: 0.5;
}

/* ── FAQ ── */
.ux-faq h3 {
	font-size: 0.9rem;
	margin: 0 0 0.65rem;
}

.ux-faq-item {
	border-bottom: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 20%, transparent);
}

.ux-faq-item summary {
	padding: 0.65rem 0;
	cursor: pointer;
	font-size: 0.86rem;
	font-weight: 600;
	list-style: none;
}

.ux-faq-item summary::-webkit-details-marker {
	display: none;
}

.ux-faq-item p {
	margin: 0 0 0.65rem;
	font-size: 0.82rem;
	color: var(--text-muted);
	line-height: 1.5;
}

/* ── Welcome banner ── */
.ux-welcome-banner {
	margin-bottom: 1rem;
	border-radius: var(--md-sys-shape-corner-medium, 12px);
	background: linear-gradient(
		135deg,
		color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent),
		color-mix(in srgb, var(--md-sys-color-tertiary, var(--md-sys-color-primary)) 10%, transparent)
	);
	border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
}

.ux-welcome-inner {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1.1rem 1.25rem;
}

.ux-welcome-content {
	flex: 1;
	min-width: 0;
}

.ux-welcome-content h2 {
	margin: 0 0 0.4rem;
	font-size: 1.05rem;
	font-weight: 800;
}

.ux-welcome-content p {
	margin: 0 0 0.85rem;
	font-size: 0.88rem;
	color: var(--text-muted);
	line-height: 1.55;
	max-width: 42rem;
}

.ux-welcome-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ux-welcome-dismiss {
	flex-shrink: 0;
	opacity: 0.7;
}

.ux-welcome-dismiss:hover {
	opacity: 1;
}

/* ── Status legend ── */
.ux-legend-list {
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.ux-legend-list li {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.5rem 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 15%, transparent);
}

.ux-legend-list li:last-child {
	border-bottom: none;
}

.ux-legend-list p {
	margin: 0;
	flex: 1 1 12rem;
	font-size: 0.82rem;
	color: var(--text-muted);
	line-height: 1.45;
}

/* ── Market hero (guests) ── */
.ux-market-hero {
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	border-radius: var(--md-sys-shape-corner-large, 16px);
	background: linear-gradient(
		160deg,
		color-mix(in srgb, var(--md-sys-color-primary) 12%, var(--md-sys-color-surface)),
		var(--md-sys-color-surface-container)
	);
	border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 30%, transparent);
}

.ux-market-hero-inner {
	max-width: 52rem;
}

.ux-market-hero-text h2 {
	margin: 0 0 0.5rem;
	font-size: 1.35rem;
	font-weight: 800;
}

.ux-market-hero-text p {
	margin: 0 0 1rem;
	color: var(--text-muted);
	font-size: 0.92rem;
	line-height: 1.55;
}

.ux-market-hero-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin-bottom: 1rem;
}

.ux-market-step {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent);
	font-size: 0.84rem;
	font-weight: 600;
}

.ux-market-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
	font-size: 0.72rem;
	font-weight: 800;
}

.ux-market-step-arrow {
	color: var(--text-muted);
	opacity: 0.5;
}

.ux-market-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.ux-market-hero-note {
	margin: 0;
	font-size: 0.8rem;
	color: var(--text-muted);
	line-height: 1.5;
}

/* ── Help panel ── */
.ux-help-panel {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.ux-help-panel[hidden] {
	display: none;
}

.ux-help-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(2px);
}

.ux-help-drawer {
	position: absolute;
	top: 0;
	bottom: 0;
	inset-inline-end: 0;
	inset-inline-start: auto;
	width: min(22rem, 92vw);
	background: var(--md-sys-color-surface);
	border-inline-start: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 35%, transparent);
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	animation: ux-slide-in-end 0.25s ease;
}

/* LTR: drawer on the right — slide in from the right */
@keyframes ux-slide-in-end {
	from { transform: translateX(100%); }
	to { transform: translateX(0); }
}

/* RTL: drawer on the left (opposite sidebar) — slide in from the left */
html[dir="rtl"] .ux-help-drawer {
	animation-name: ux-slide-in-end-rtl;
}

@keyframes ux-slide-in-end-rtl {
	from { transform: translateX(-100%); }
	to { transform: translateX(0); }
}

.ux-help-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.1rem;
	border-bottom: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 25%, transparent);
}

.ux-help-header h2 {
	margin: 0;
	font-size: 1.05rem;
}

.ux-help-body {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 1.1rem 2rem;
}

.ux-help-lead {
	margin: 0 0 1rem;
	font-size: 0.88rem;
	color: var(--text-muted);
	line-height: 1.55;
}

.ux-help-links,
.ux-help-glossary {
	margin-top: 1.25rem;
}

.ux-help-links h3,
.ux-help-glossary h3 {
	font-size: 0.88rem;
	margin: 0 0 0.5rem;
}

.ux-help-links ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ux-help-links li {
	border-bottom: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 15%, transparent);
}

.ux-help-links a {
	display: block;
	padding: 0.55rem 0;
	font-size: 0.86rem;
	text-decoration: none;
	color: var(--md-sys-color-primary);
}

.ux-help-glossary dl {
	margin: 0;
}

.ux-help-glossary dt {
	font-size: 0.84rem;
	font-weight: 700;
	margin-top: 0.5rem;
}

.ux-help-glossary dd {
	margin: 0.15rem 0 0;
	font-size: 0.8rem;
	color: var(--text-muted);
	line-height: 1.45;
}

.ux-help-body .ux-how-it-works {
	margin-bottom: 0;
}

.ux-help-body .ux-how-details {
	border: none;
	background: transparent;
}

.ux-help-body .ux-how-details .ux-guide-body {
	padding-inline: 0;
}

/* ── Floating help button ── */
.ux-help-fab {
	position: fixed;
	bottom: 1.25rem;
	inset-inline-end: 1.25rem;
	z-index: 80;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 3rem;
	padding: 0.65rem 1rem 0.65rem 0.85rem;
	border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
	border-radius: 999px;
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 10px 28px color-mix(in srgb, var(--md-sys-color-primary) 38%, transparent);
	cursor: pointer;
	transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.ux-help-fab:hover {
	filter: brightness(1.06);
	transform: translateY(-2px);
	box-shadow: 0 14px 32px color-mix(in srgb, var(--md-sys-color-primary) 45%, transparent);
}

.ux-help-fab:active {
	transform: translateY(0);
}

.ux-help-fab-icon {
	display: inline-grid;
	place-items: center;
	width: 1.45rem;
	height: 1.45rem;
	border-radius: 50%;
	background: color-mix(in srgb, #fff 22%, transparent);
	font-size: 0.95rem;
	font-weight: 800;
}

.ux-help-fab-label {
	font-size: 0.86rem;
}

@media (max-width: 640px) {
	.ux-help-fab {
		bottom: 1rem;
		inset-inline-end: 1rem;
		min-height: 3.1rem;
		min-width: 3.1rem;
		padding: 0;
		border-radius: 50%;
	}

	body.has-seller-mobile-nav .ux-help-fab {
		bottom: calc(5.55rem + env(safe-area-inset-bottom, 0px));
	}

	.ux-help-fab-label {
		display: none;
	}

	.ux-help-fab-icon {
		width: 100%;
		height: 100%;
		background: transparent;
		font-size: 1.15rem;
	}

	.ux-flow-diagram {
		flex-direction: column;
	}

	.ux-flow-arrow {
		transform: rotate(90deg);
		align-self: center;
	}

	.ux-welcome-inner {
		flex-direction: column;
	}

	.ux-market-hero {
		padding: 1.1rem;
	}
}

/* ── Tooltips ── */
.ux-tip-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.15rem;
	height: 1.15rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent);
	color: var(--md-sys-color-primary);
	font-size: 0.68rem;
	font-weight: 800;
	cursor: help;
	vertical-align: middle;
	margin-inline-start: 0.25rem;
	line-height: 1;
}

.ux-tip-trigger:hover,
.ux-tip-trigger:focus-visible {
	background: var(--md-sys-color-primary);
	color: var(--md-sys-color-on-primary);
	outline: none;
}

.ux-tip-popover {
	position: fixed;
	z-index: 10000;
	max-width: 16rem;
	padding: 0.55rem 0.75rem;
	border-radius: 8px;
	background: var(--md-sys-color-inverse-surface, #2d2d2d);
	color: var(--md-sys-color-inverse-on-surface, #fff);
	font-size: 0.78rem;
	line-height: 1.45;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	pointer-events: none;
	animation: ux-tip-in 0.15s ease;
}

@keyframes ux-tip-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ── Nav descriptions ── */
.dash-nav-item-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.dash-nav-item .dash-nav-item-label {
	flex: unset;
}

.dash-nav-item-hint {
	display: block;
	font-size: 0.68rem;
	color: var(--text-muted);
	line-height: 1.3;
	margin-top: 0.05rem;
	font-weight: 400;
	opacity: 0.85;
}

.dash-nav-item.is-active .dash-nav-item-hint {
	opacity: 1;
}

/* ── Register account type expanded ── */
.account-type-explainer {
	margin: 0.75rem 0 1rem;
	padding: 0.85rem 1rem;
	border-radius: 10px;
	background: color-mix(in srgb, var(--md-sys-color-primary) 7%, transparent);
	border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent);
	font-size: 0.84rem;
	line-height: 1.55;
	color: var(--text-muted);
}

.account-type-explainer strong {
	color: inherit;
	font-weight: 700;
}

.account-type-explainer ol {
	margin: 0.5rem 0 0;
	padding-inline-start: 1.25rem;
}

.account-type-explainer li {
	margin: 0.25rem 0;
}

/* ── Path strip progress indicator ── */
.ux-path-strip {
	position: relative;
}

.ux-path-step.is-current {
	border-color: var(--md-sys-color-primary);
	background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.ux-path-step.is-done {
	opacity: 0.75;
}

.ux-path-step.is-done .ux-path-num {
	background: color-mix(in srgb, var(--md-sys-color-primary) 60%, transparent);
}

.ux-path-label {
	display: block;
	font-size: 0.68rem;
	color: var(--md-sys-color-primary);
	font-weight: 600;
	margin-bottom: 0.1rem;
}

/* ── Stat card tooltips area ── */
.stat-card .stat-label {
	display: inline-flex;
	align-items: center;
}
