/* ===============================
	📜 Unvaulted Relics (UI)
	Aligned with base.css variables
============================== */

#uv-list {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: stretch;
	margin-bottom: 2rem;
}

/* ── Card ── */
.uv-relic-card {
	background: var(--card-bg);
	backdrop-filter: blur(6px);
	border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
	box-shadow: 0 0 8px color-mix(in srgb, var(--bg-main) 50%, black);
	border-radius: 6px;
	padding: .6rem;
	width: 100%;
	max-width: 260px;
	flex: 1 1 260px;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	position: relative;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.uv-relic-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 25%, transparent);
	border-color: color-mix(in srgb, var(--accent) 40%, transparent);
	z-index: 200;
}

/* ── Header ── */
.uv-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: .3rem;
}

.uv-name {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.uv-tag {
	font-size: .9rem;
	color: var(--accent);
	white-space: nowrap;
}

/* ── Parts grid (Reward | Chance | Price) ── */
.uv-part-grid {
	display: grid;
	grid-template-columns: 1fr auto auto;
	row-gap: .25rem;
	column-gap: .5rem;
	margin: .25rem .25rem 0;
	font-size: .85rem;
}

.uv-row {
	display: contents;
}

.uv-head span {
	color: var(--text-muted);
	font-weight: 600;
	padding-bottom: .1rem;
	border-bottom: 1px dashed color-mix(in srgb, var(--text) 20%, transparent);
}

.uv-item {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: .4rem;
}

.uv-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: var(--text-muted);
	white-space: nowrap;
}

/* ── Rarity dot ── */
.rarity-dot {
	width: .5rem;
	height: .5rem;
	border-radius: 999px;
	flex: 0 0 .5rem;
	display: inline-block;
	border: 1px solid color-mix(in srgb, var(--bg-main) 40%, var(--text) 60%);
}

.r-common {
	background: color-mix(in srgb, var(--text) 25%, transparent);
}

.r-uncommon {
	background: color-mix(in srgb, var(--accent-alt) 65%, transparent);
}

.r-rare {
	background: color-mix(in srgb, var(--accent) 85%, transparent);
}

/* ── Expected Platinum row ── */
.uv-ev {
	margin-top: .55rem;
	padding-top: .4rem;
	border-top: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: .4rem .6rem;
}

.uv-plat-label {
	color: var(--text-muted);
}

.uv-plat-val {
	font-weight: 700;
	color: var(--accent);
}

.uv-evbar {
	grid-column: 1 / -1;
	height: 6px;
	background: color-mix(in srgb, var(--bg-light) 70%, var(--card-bg) 30%);
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}

.uv-evbar i {
	display: block;
	height: 100%;
	background: var(--accent);
	border-radius: 999px;
	filter: saturate(120%);
}

/* ── Toolbar (Search / Era / Counter / Stats) ── */
.uv-controls {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	align-items: center;
}

.uv-inline {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
}

.uv-label {
	font-size: .85rem;
	color: var(--text-muted);
}

#uv-q,
#uv-era {
	background: var(--bg-light);
	border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
	color: var(--text);
	padding: .5rem .65rem;
	border-radius: 8px;
	outline: none;
	transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

#uv-q:hover,
#uv-era:hover {
	border-color: var(--accent-alt);
	background: color-mix(in srgb, var(--bg-light) 80%, var(--card-bg) 20%);
}

#uv-q:focus,
#uv-era:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
}

#uv-q {
	min-width: 260px;
}

.uv-badge {
	display: inline-block;
	padding: .2rem .5rem;
	border-radius: 999px;
	background: var(--bg-light);
	border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
	color: var(--text-muted);
	font-size: .8rem;
}

.uv-stats {
	margin: 6px 0 16px;
	color: var(--text-muted);
	font-size: .95rem;
}

/* ── Relic icons ── */
.relic-svg-icon {
	width: 36px;
	height: 36px;
	margin-right: 6px;
	filter: brightness(1.1);
}

.relic-lith {
	filter: invert(27%) sepia(29%) saturate(1067%) hue-rotate(335deg) brightness(97%) contrast(92%);
}

.relic-meso {
	filter: invert(28%) sepia(7%) saturate(3853%) hue-rotate(353deg) brightness(106%) contrast(65%);
}

.relic-neo {
	filter: invert(78%) sepia(33%) saturate(0%) hue-rotate(220deg) brightness(95%) contrast(91%);
}

.relic-axi {
	filter: invert(95%) sepia(94%) saturate(1282%) hue-rotate(318deg) brightness(86%) contrast(85%);
}

.relic-requiem {
	filter: invert(8%) sepia(53%) saturate(4724%) hue-rotate(351deg) brightness(98%) contrast(94%);
}

/* ── Data Disclaimer ── */
#data-disclaimer {
	font-size: .85rem;
	color: var(--text-muted);
	margin: -.5rem auto .5rem;
	text-align: center;
	max-width: 500px;
	line-height: 1.4;
}

/* ── “No parts mapped” muted text ── */
.uv-muted {
	color: var(--text-muted);
	font-style: italic;
	padding: .25rem .25rem 0;
}

/* ── Responsive ── */
@media (max-width:640px) {
	.uv-relic-card {
		max-width: 100%;
	}
}