.sdr-repository {
	max-width: 100%;
}

.sdr-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: 1.2em;
}

.sdr-view-toggle {
	display: flex;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
}

.sdr-view-button {
	padding: 0.6em 1em;
	border: none;
	background: #fff;
	color: #333;
	cursor: pointer;
	font-size: 0.9em;
}

.sdr-view-button + .sdr-view-button {
	border-left: 1px solid #ccc;
}

.sdr-view-button.is-active {
	background: #2271b1;
	color: #fff;
}

.sdr-list {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

.sdr-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	padding: 1em 1.2em;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	background: #fff;
}

.sdr-row-thumb {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	overflow: hidden;
	border-radius: 4px;
}

.sdr-row-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Grid view */
.sdr-list.sdr-list--grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: 1em;
}

.sdr-list.sdr-list--grid .sdr-row {
	flex-direction: column;
	align-items: stretch;
	text-align: left;
}

.sdr-list.sdr-list--grid .sdr-row-thumb {
	width: 100%;
	height: 140px;
	margin-bottom: 0.6em;
}

.sdr-list.sdr-list--grid .sdr-row-side {
	align-items: flex-start;
	margin-top: 0.8em;
}

.sdr-row-title {
	margin: 0 0 0.25em;
	font-size: 1.05em;
}

.sdr-row-desc {
	margin: 0 0 0.4em;
	color: #555;
	font-size: 0.95em;
}

.sdr-row-categories {
	margin: 0;
}

.sdr-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	margin-right: 0.3em;
	background: #eef2f7;
	border-radius: 999px;
	font-size: 0.8em;
	color: #334;
}

.sdr-row-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.4em;
	flex-shrink: 0;
}

.sdr-file-meta {
	font-size: 0.8em;
	color: #888;
}

.sdr-view,
.sdr-download {
	display: inline-block;
	padding: 0.5em 1.1em;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.9em;
	white-space: nowrap;
}

.sdr-view {
	background: #fff;
	color: #2271b1;
	border: 1px solid #2271b1;
}

.sdr-view:hover {
	background: #2271b1;
	color: #fff;
}

.sdr-download {
	background: #2271b1;
	color: #fff;
	border: 1px solid #2271b1;
}

.sdr-download:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.sdr-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin-top: 1.2em;
}

.sdr-page-button {
	padding: 0.4em 0.8em;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #333;
	cursor: pointer;
	font-size: 0.95em;
}

.sdr-page-button:hover {
	background: #f0f0f0;
}

.sdr-page-button.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

@media ( max-width: 600px ) {
	.sdr-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.sdr-row-side {
		align-items: flex-start;
		flex-direction: row;
	}
}
