/**
 * Visual Sitemap Tool - Public Styles
 */

:root {
	--vst-primary: #667eea;
	--vst-secondary: #764ba2;
	--vst-accent: #f093fb;
	--vst-folder: #2196f3;
	--vst-page: #ffc107;
	--vst-root: #4caf50;
	--vst-text: #333;
	--vst-text-light: #666;
	--vst-border: #ddd;
	--vst-bg: #f5f5f5;
	--vst-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	--vst-transition: all 0.3s ease;
}

/* Main Visualization Container */
.vst-visualization-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 20px;
	background: white;
	border-radius: 12px;
	box-shadow: var(--vst-shadow);
}

/* Toolbar */
.vst-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	padding: 15px;
	background: linear-gradient(135deg, var(--vst-primary) 0%, var(--vst-secondary) 100%);
	border-radius: 8px;
	color: white;
	flex-wrap: wrap;
}

.vst-mode-toggle,
.vst-controls {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* Buttons */
.vst-btn {
	padding: 8px 16px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--vst-transition);
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.vst-btn-primary {
	background: white;
	color: var(--vst-primary);
}

.vst-btn-primary:hover {
	background: #f0f0f0;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vst-btn-primary.active {
	background: var(--vst-accent);
	color: white;
}

.vst-btn-secondary {
	background: rgba(255, 255, 255, 0.2);
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.vst-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.5);
}

.vst-btn-secondary.active {
	background: white;
	color: var(--vst-primary);
}

.vst-btn .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

/* Tree Container */
.vst-tree-container {
	width: 100%;
	min-height: 500px;
	background: white;
	border: 1px solid var(--vst-border);
	border-radius: 8px;
	overflow: auto;
	position: relative;
}

/* SVG Styles */
.vst-svg-visualization {
	background: white;
	border-radius: 8px;
}

.vst-link {
	fill: none;
	stroke: #ccc;
	stroke-width: 2px;
	opacity: 0.6;
	transition: var(--vst-transition);
}

.vst-node {
	cursor: pointer;
	transition: var(--vst-transition);
}

.vst-node:hover .vst-node-shape {
	filter: brightness(1.2);
	stroke-width: 3px;
}

.vst-node:hover .vst-link {
	stroke: var(--vst-primary);
	stroke-width: 3px;
}

.vst-node.active .vst-node-shape {
	filter: drop-shadow(0 0 8px currentColor);
	stroke-width: 3px;
}

/* Node Shapes */
.vst-shape-root {
	fill: var(--vst-root);
	stroke: darken(var(--vst-root), 20%);
	stroke-width: 2px;
}

.vst-shape-folder {
	fill: var(--vst-folder);
	stroke: darken(var(--vst-folder), 20%);
	stroke-width: 2px;
}

.vst-shape-page {
	fill: var(--vst-page);
	stroke: #f57f17;
	stroke-width: 1px;
}

.vst-shape-more {
	fill: #e91e63;
	stroke: #ad1457;
	stroke-width: 1px;
}

/* Node Labels */
.vst-node-label {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	pointer-events: none;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	fill: var(--vst-text);
}

.vst-node-root .vst-node-label {
	fill: white;
	font-size: 14px;
	font-weight: bold;
}

.vst-node-folder .vst-node-label {
	fill: white;
	font-size: 12px;
}

.vst-node-page .vst-node-label {
	fill: var(--vst-text);
	font-size: 11px;
}

.vst-node-more .vst-node-label {
	fill: white;
	font-size: 10px;
}

/* Statistics */
.vst-stats {
	display: flex;
	justify-content: center;
	gap: 40px;
	padding: 20px;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
	border-radius: 8px;
	border-top: 2px solid var(--vst-border);
}

.vst-stat-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}

.vst-stat-item strong {
	color: var(--vst-primary);
	font-weight: 600;
}

.vst-stat-item span:last-child {
	background: white;
	padding: 4px 12px;
	border-radius: 6px;
	font-weight: 600;
	box-shadow: var(--vst-shadow);
	color: var(--vst-secondary);
}

/* Empty State */
.vst-empty-state {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
	padding: 40px 20px;
	text-align: center;
	color: var(--vst-text-light);
	font-size: 16px;
	background: linear-gradient(135deg, var(--vst-bg) 0%, white 100%);
	border-radius: 8px;
	border: 2px dashed var(--vst-border);
}

/* Responsive Design */
@media (max-width: 768px) {
	.vst-visualization-container {
		padding: 15px;
	}

	.vst-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.vst-mode-toggle,
	.vst-controls {
		width: 100%;
	}

	.vst-btn {
		flex: 1;
		justify-content: center;
	}

	.vst-tree-container {
		min-height: 400px;
	}

	.vst-stats {
		flex-direction: column;
		gap: 15px;
	}

	.vst-stat-item {
		justify-content: space-between;
	}
}

@media (max-width: 480px) {
	.vst-visualization-container {
		padding: 10px;
	}

	.vst-toolbar {
		gap: 5px;
	}

	.vst-btn {
		padding: 6px 12px;
		font-size: 12px;
	}

	.vst-tree-container {
		min-height: 300px;
	}

	.vst-stats {
		gap: 10px;
	}

	.vst-stat-item {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Loading Animation */
.loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 15px;
	padding: 40px;
}

.spinner {
	border: 4px solid var(--vst-bg);
	border-top-color: var(--vst-primary);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 0.8s linear infinite;
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	:root {
		--vst-text: #e0e0e0;
		--vst-text-light: #b0b0b0;
		--vst-bg: #2a2a2a;
		--vst-border: #444;
	}

	.vst-visualization-container,
	.vst-tree-container,
	.vst-svg-visualization {
		background: #1e1e1e;
		color: var(--vst-text);
	}

	.vst-stats {
		background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	}
}

/* Print Styles */
@media print {
	.vst-toolbar,
	.vst-btn {
		display: none !important;
	}

	.vst-visualization-container {
		box-shadow: none;
		page-break-inside: avoid;
	}

	.vst-tree-container {
		border: none;
		overflow: visible;
	}
}
