/* ============ VESC Tool Archiv — built on the main site theme ============ */

.vta-wrap {
	max-width: 860px;
	margin: 0 auto;
	padding: 96px 20px 70px;
}

.back-link {
	position: fixed;
	top: 24px;
	left: 24px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--text-dim);
	text-decoration: none;
	transition: color 0.25s ease, transform 0.25s ease;
	z-index: 50;
}

.back-link:hover {
	color: var(--accent);
	transform: translateX(-3px);
}

/* ---- Kopf ---- */
.vta-head {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: 30px;
}

.vta-icon {
	width: 62px; height: 62px;
	flex-shrink: 0;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.12));
	border: 1px solid var(--border);
	color: var(--accent);
	box-shadow: 0 0 60px -20px var(--glow);
}

.vta-icon svg { width: 28px; height: 28px; }

.vta-title {
	font-size: clamp(26px, 4vw, 34px);
	font-weight: 800;
	letter-spacing: -1px;
	line-height: 1.1;
}

.vta-sub {
	margin-top: 6px;
	font-size: 12.5px;
	color: var(--text-dim);
}

/* ---- Filter ---- */
.vta-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin-bottom: 16px;
}

.vta-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 5px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--border);
	border-radius: 12px;
}

.vta-chip {
	padding: 8px 14px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-dim);
	background: transparent;
	border: none;
	border-radius: 8px;
	transition: all 0.25s ease;
}

.vta-chip:hover { color: var(--text); }

.vta-chip.active {
	color: var(--text);
	background: var(--surface-hover);
	box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}

.vta-os { font-size: 12px; }

.vta-note {
	margin-bottom: 26px;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--text-dim);
}

.vta-note em { color: var(--text); font-style: normal; font-weight: 600; }

/* ---- Lade-/Fehlerzustand ---- */
.vta-state {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 22px;
	border-radius: 14px;
	background: var(--surface);
	border: 1px dashed var(--border);
	color: var(--text-dim);
	font-size: 14px;
	line-height: 1.6;
}

.vta-state[hidden] { display: none; }
.vta-state.is-error { border-color: rgba(239, 68, 68, 0.45); color: #fca5a5; }
.vta-state.is-error .vta-spinner,
.vta-state.is-empty .vta-spinner { display: none; }

.vta-spinner {
	width: 16px; height: 16px;
	flex-shrink: 0;
	border-radius: 50%;
	border: 2px solid rgba(139, 92, 246, 0.25);
	border-top-color: var(--accent);
	animation: vta-spin 0.8s linear infinite;
}

@keyframes vta-spin { to { transform: rotate(360deg); } }

/* ---- Versionsliste ---- */
.vta-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.vta-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 24px;
	border-radius: 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	text-decoration: none;
	transition: all 0.3s ease;
	animation: vta-in 0.45s ease both;
}

.vta-item:hover {
	border-color: rgba(139, 92, 246, 0.5);
	background: var(--surface-hover);
	transform: translateX(6px);
	box-shadow: -8px 0 24px -14px var(--glow);
}

@keyframes vta-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

.vta-item-main {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 10px;
	min-width: 0;
}

.vta-item-title { font-size: 16px; font-weight: 700; }

.vta-badge {
	padding: 2px 9px;
	font-size: 10.5px;
	color: var(--accent);
	background: rgba(139, 92, 246, 0.12);
	border: 1px solid rgba(139, 92, 246, 0.35);
	border-radius: 99px;
}

.vta-item-meta { font-size: 12px; color: var(--text-dim); }

.vta-item-side {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.vta-plats { display: flex; gap: 6px; }

.vta-plat {
	width: 30px; height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9px;
	color: var(--text-dim);
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid var(--border);
}

.vta-plat svg { width: 15px; height: 15px; }

.vta-plat.is-yours {
	color: var(--accent);
	border-color: rgba(139, 92, 246, 0.5);
	background: rgba(139, 92, 246, 0.12);
}

.vta-more {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--accent);
	white-space: nowrap;
}

/* ---- Beta (einklappbar) ---- */
.vta-beta {
	margin-top: 26px;
	border-radius: 14px;
	background: var(--surface);
	border: 1px dashed rgba(245, 158, 11, 0.4);
	animation: vta-in 0.45s ease both;
}

.vta-beta[hidden] { display: none; }

.vta-beta-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 24px;
	list-style: none;
	user-select: none;
	transition: color 0.25s ease;
}

.vta-beta-head::-webkit-details-marker { display: none; }
.vta-beta-head:hover { color: #fbbf24; }

.vta-beta-head:focus-visible {
	outline: 2px solid rgba(245, 158, 11, 0.6);
	outline-offset: 2px;
	border-radius: 14px;
}

.vta-beta-title { font-size: 16px; font-weight: 700; }

.vta-beta-chevron {
	width: 9px; height: 9px;
	flex-shrink: 0;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.25s ease;
	opacity: 0.7;
}

.vta-beta[open] .vta-beta-chevron { transform: translateY(2px) rotate(-135deg); }

.vta-beta-body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 0 14px 14px;
}

.vta-beta-note {
	padding: 0 10px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--text-dim);
}

.vta-badge--beta {
	color: #fbbf24;
	background: rgba(245, 158, 11, 0.12);
	border-color: rgba(245, 158, 11, 0.4);
}

.vta-license {
	margin-top: 34px;
	font-size: 11.5px;
	line-height: 1.7;
	text-align: center;
}

.vta-license a { color: var(--accent); text-decoration: none; }
.vta-license a:hover { text-decoration: underline; }

/* ---- Popup-Inhalte ---- */
.vta-files { display: flex; flex-direction: column; gap: 10px; }

.vta-file {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--surface);
	border: 1px solid var(--border);
}

.vta-file.is-yours {
	border-color: rgba(139, 92, 246, 0.5);
	background: rgba(139, 92, 246, 0.08);
}

.vta-file-icon {
	width: 36px; height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	color: var(--accent);
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--border);
}

.vta-file-icon svg { width: 17px; height: 17px; }

.vta-file-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vta-file-plat { font-size: 14px; font-weight: 600; color: var(--text); }
.vta-file-name { font-size: 11.5px; color: var(--text-dim); word-break: break-all; }

.vta-file-btn {
	width: 40px; height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 11px;
	color: #fff;
	background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(6, 182, 212, 0.85));
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vta-file-btn svg { width: 18px; height: 18px; }

.vta-file-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -10px var(--glow);
}

.vta-changelog {
	margin: 0;
	max-height: 260px;
	overflow: auto;
	padding: 14px 16px;
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 12.5px;
	line-height: 1.65;
	color: #c5c5d6;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	white-space: pre-wrap;
	word-break: break-word;
}

.app-hash-value code { display: block; font: inherit; }
.vta-hash-file { display: block; margin-top: 3px; font-size: 10.5px; color: var(--text-dim); word-break: break-all; }

.vta-source { font-size: 14px; line-height: 1.6; color: #c5c5d6; }
.vta-source a { color: var(--accent); text-decoration: none; word-break: break-all; }
.vta-source a:hover { text-decoration: underline; }

@media (max-width: 600px) {
	.vta-wrap { padding: 84px 16px 60px; }
	.vta-head { gap: 14px; }
	.vta-icon { width: 52px; height: 52px; }
	.vta-item { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 18px; }
	.vta-item-side { width: 100%; justify-content: space-between; }
	.vta-beta-head { padding: 16px 18px; }
	.vta-beta-body { padding: 0 8px 8px; }
	.vta-bar { flex-direction: column; align-items: flex-start; }
	.vta-filter { gap: 2px; padding: 4px; }
	.vta-chip { padding: 8px 10px; font-size: 12.5px; }
}
