.library-explorer {
	margin-top: 12px;
}

.library-explorer-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.library-explorer-tab {
	border: 1px solid #555;
	color: #222;
	display: inline-block;
	padding: 7px 10px;
	text-decoration: none;
}

.library-explorer-tab:hover,
.library-explorer-tab.is-active {
	background: #333;
	color: #fff;
	text-decoration: none;
}

.library-explorer-toolbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin: 8px 0 12px;
}

.library-explorer-toolbar select,
.library-back-button {
	border: 1px solid #555;
	padding: 5px 7px;
}

.library-back-button {
	background: #f6f6f6;
	cursor: pointer;
}

.library-explorer-status {
	background: #f5f5f5;
	border: 1px solid #ddd;
	margin-bottom: 10px;
	padding: 8px;
}

.library-explorer-status:empty {
	display: none;
}

.library-explorer-canvas {
	border: 1px solid #999;
	min-height: 320px;
	overflow: auto;
	position: relative;
}

.library-explorer-canvas.is-fit-content {
	max-width: 100%;
	overflow-x: hidden;
	overflow-y: hidden;
	min-height: 0;
	vertical-align: top;
}

.library-explorer-canvas svg {
	display: block;
	max-width: 100%;
}

.library-treemap-title {
	font-size: 17px;
	font-weight: bold;
	padding: 10px 12px 0;
}

.library-explorer-canvas.is-fit-content svg {
	max-width: 100%;
}

.library-explorer-details {
	border: 1px solid #ddd;
	margin-top: 10px;
	min-height: 28px;
	padding: 8px;
}

.library-explorer-details:empty {
	display: none;
}

.library-card-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	padding: 10px;
}

.library-stat-card {
	background: #f8f8f8;
	border: 1px solid #ccc;
	padding: 10px;
}

.library-stat-card strong {
	display: block;
	font-size: 18px;
	margin-bottom: 4px;
}

.library-bar-list {
	padding: 10px;
}

.library-bar-row {
	align-items: center;
	display: grid;
	gap: 8px;
	grid-template-columns: 72px 1fr 60px;
	margin: 5px 0;
}

.library-bar {
	background: #d9e6ef;
	height: 18px;
}

.library-svg-link {
	cursor: pointer;
}

.library-svg-link:hover text {
	text-decoration: underline;
}

.library-heatmap-cell {
	cursor: pointer;
}

.library-heatmap-cell:hover {
	stroke: #000;
	stroke-width: 2;
}

@media (max-width: 680px) {
	.library-explorer-canvas {
		min-height: 300px;
	}

	.library-bar-row {
		grid-template-columns: 58px 1fr 48px;
	}
}
