/* PDF List Manager — Frontend Styles
   ========================================================= */

.plm-list {
	margin: 2em 0;
	font-family: inherit;
}

.plm-list-title {
	font-size: 1.4em;
	margin: 0 0 1em;
	color: inherit;
}

/* ---- Grid ---- */
.plm-grid {
	display: grid;
	grid-template-columns: repeat( var(--plm-columns, 4), 1fr );
	gap: 1.5rem;
}

@media (max-width: 900px) {
	.plm-grid {
		grid-template-columns: repeat( min(var(--plm-columns, 4), 3), 1fr );
	}
}

@media (max-width: 640px) {
	.plm-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media (max-width: 380px) {
	.plm-grid {
		grid-template-columns: 1fr;
	}
}

/* ---- Item ---- */
.plm-item {
	position: relative;
}

.plm-item-link {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .10);
	background: #fff;
}

.plm-item-link:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .16);
	transform: translateY(-2px);
	text-decoration: none;
	color: inherit;
}

/* ---- Cover ---- */
.plm-cover {
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.plm-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.plm-item-link:hover .plm-cover img {
	transform: scale(1.03);
}

/* Placeholder */
.plm-cover-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
}

.plm-cover-placeholder svg {
	width: 55%;
	max-width: 100px;
	height: auto;
}

/* ---- Meta / Title bar ---- */
.plm-item-meta {
	padding: .65rem .8rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	background: #fff;
	border-top: 1px solid #eee;
}

.plm-item-title {
	font-size: .875em;
	font-weight: 600;
	line-height: 1.35;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.plm-download-icon {
	flex-shrink: 0;
	color: #888;
	display: flex;
	align-items: center;
	transition: color 0.2s;
}

.plm-item-link:hover .plm-download-icon {
	color: #cc3333;
}

/* ---- Empty / error states ---- */
.plm-error,
.plm-empty {
	padding: .75em 1em;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #664d03;
	font-size: .9em;
}

.plm-error {
	background: #f8d7da;
	border-color: #dc3545;
	color: #842029;
}
