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

/* ---------- Одиночний документ [pdf_document] ---------- */

.pdf-docs-single {
	display: inline-block;
}

.pdf-docs-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	background: #f0f6fc;
	border: 1px solid #c3dafe;
	border-radius: 6px;
	color: #1e40af;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pdf-docs-link:hover {
	background: #dbeafe;
	border-color: #93c5fd;
	color: #1d3b8a;
	text-decoration: none;
}

.pdf-docs-icon {
	display: flex;
	align-items: center;
	color: #c0392b;
	flex-shrink: 0;
}

/* ---------- Список документів [pdf_documents] ---------- */

.pdf-docs-list {
	display: grid;
	gap: 12px;
	margin: 1.25em 0;
}

/* Колонки */
.pdf-docs-cols-1 { grid-template-columns: 1fr; }
.pdf-docs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pdf-docs-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
	.pdf-docs-cols-2,
	.pdf-docs-cols-3 {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 641px) and (max-width: 900px) {
	.pdf-docs-cols-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Картка документа */
.pdf-docs-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
	transition: box-shadow 0.15s, border-color 0.15s;
}

.pdf-docs-item:hover {
	border-color: #93c5fd;
	box-shadow: 0 4px 12px rgba(37, 99, 235, .1);
}

.pdf-docs-item--no-file {
	opacity: 0.6;
}

/* Іконка */
.pdf-docs-item__icon {
	position: relative;
	flex-shrink: 0;
	color: #c0392b;
	line-height: 0;
}

.pdf-docs-item__badge {
	position: absolute;
	bottom: -3px;
	right: -4px;
	font-size: 8px;
	font-weight: 700;
	letter-spacing: .3px;
	color: #fff;
	background: #c0392b;
	border-radius: 3px;
	padding: 1px 3px;
	line-height: 1.3;
}

/* Тіло картки */
.pdf-docs-item__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.pdf-docs-item__title {
	font-size: .95rem;
	font-weight: 600;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pdf-docs-item__date,
.pdf-docs-item__size {
	font-size: .78rem;
	color: #6b7280;
}

/* Кнопка завантаження */
.pdf-docs-item__action {
	flex-shrink: 0;
}

.pdf-docs-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	background: #2563eb;
	color: #fff;
	font-size: .82rem;
	font-weight: 500;
	border-radius: 5px;
	text-decoration: none;
	transition: background 0.15s;
	white-space: nowrap;
}

.pdf-docs-btn:hover {
	background: #1d4ed8;
	color: #fff;
	text-decoration: none;
}

.pdf-docs-btn--disabled {
	background: #d1d5db;
	color: #6b7280;
	cursor: default;
	pointer-events: none;
}

/* Повідомлення для адміністратора */
.pdf-docs-notice {
	padding: 8px 12px;
	background: #fef9c3;
	border-left: 4px solid #facc15;
	color: #713f12;
	font-size: .88rem;
	border-radius: 0 4px 4px 0;
}
