/* Документы темы 16. Дополнение к resolution / documentsMore,
   подключаемое только собственными документными VIEW этой темы. */
.theme16-documents,
.theme16-document {
	margin-bottom: 60px;
	color: var(--header-ink, #152238);
	font-family: var(--theme16-font-body, Arial, sans-serif);
	line-height: 1.5;
}

.theme16-documents-page .breadcrumbs,
.theme16-document-page .breadcrumbs-more {
	flex-wrap: wrap;
	row-gap: 8px;
}

.theme16-documents-page .breadcrumbs li,
.theme16-document-page .breadcrumbs-more li {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.theme16-documents-scroll {
	overflow: auto;
	border: 1px solid var(--header-line, #dce4ee);
	border-radius: 12px;
}

.theme16-documents-table {
	width: 100%;
	min-width: 1000px;
	border-collapse: collapse;
	text-align: left;
	font-size: 14px;
}

.theme16-documents-table th,
.theme16-documents-table td {
	padding: 14px 12px;
	border: 0;
	border-bottom: 1px solid var(--header-line, #dce4ee);
	vertical-align: top;
}

.theme16-documents-table th {
	background: #11316e;
	color: #fff;
	font-weight: 600;
}

.theme16-documents-table tr:last-child td {
	border-bottom: 0;
}

.theme16-documents-table tbody tr:nth-child(even) {
	background: var(--header-soft, #f5f8fc);
}

.theme16-documents-table [data-field="title"] {
	width: 30%;
	min-width: 250px;
}

.theme16-documents-table a,
.theme16-document-file-link {
	color: #11316e;
	font: inherit;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.theme16-documents-table a:hover,
.theme16-document-file-link:hover {
	text-decoration: underline;
}

.theme16-documents-empty {
	padding: 24px;
	border: 1px solid var(--header-line, #dce4ee);
	border-radius: 12px;
	background: var(--header-soft, #f5f8fc);
}

.theme16-documents-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
}

.theme16-documents-pagination a,
.theme16-documents-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 6px 10px;
	border: 1px solid var(--header-line, #dce4ee);
	border-radius: 6px;
	font: inherit;
	color: #11316e;
}

.theme16-documents-pagination .theme16-documents-current {
	border-color: #11316e;
	background: #11316e;
	color: #fff;
}

.theme16-document .document-more__title {
	font-family: var(--theme16-font-heading, Arial, sans-serif);
	font-size: clamp(24px, 3vw, 32px);
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.theme16-document-meta {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px 24px;
	margin: 30px 0;
	padding: 24px;
	border: 1px solid var(--header-line, #dce4ee);
	border-radius: 12px;
	background: var(--header-soft, #f5f8fc);
	text-align: left;
}

.theme16-document-meta dt {
	margin-bottom: 5px;
	color: var(--header-muted, #56667c);
	font-size: 13px;
}

.theme16-document-meta dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.theme16-document-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-bottom: 30px;
}

.theme16-document-download,
.theme16-document-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border: 1px solid #11316e;
	border-radius: 6px;
	background: #fff;
	color: #11316e;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.theme16-document-download {
	background: #11316e;
	color: #fff;
}

.theme16-document-copy:hover,
.theme16-document-download:hover {
	background: #e9eff7;
	color: #11316e;
}

.theme16-document-actions :focus-visible,
.theme16-documents a:focus-visible {
	outline: 3px solid #e3b45f;
	outline-offset: 3px;
}

.theme16-document-preview-frame {
	display: block;
	margin: 0 auto;
	border: 1px solid var(--header-line, #dce4ee);
	border-radius: 12px;
}

.theme16-document-preview-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.theme16-document-docx,
.theme16-document-file-card {
	padding: 28px;
	border: 1px solid var(--header-line, #dce4ee);
	border-radius: 12px;
	background: #fff;
	text-align: left;
	overflow-wrap: anywhere;
}

.theme16-document-file-format {
	display: block;
	margin-bottom: 12px;
	color: var(--header-muted, #56667c);
}

.theme16-document-docx-content {
	line-height: 1.7;
}

.theme16-document-docx-content[hidden] {
	display: none;
}

.theme16-document-docx-content p + p {
	margin-top: 12px;
}

.theme16-document-docx-content img {
	max-width: 100%;
	height: auto;
}

.theme16-document-docx-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.theme16-document-docx-content td,
.theme16-document-docx-content th {
	padding: 8px;
	border: 1px solid var(--header-line, #dce4ee);
}

.theme16-document-docx-error {
	color: #a32020;
}

@media (max-width: 920px) {
	.theme16-documents-scroll {
		max-height: none;
		overflow: visible;
		border: 0;
	}

	.theme16-documents-table,
	.theme16-documents-table tbody {
		display: block;
		min-width: 0;
	}

	.theme16-documents-table thead {
		display: none;
	}

	.theme16-documents-row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-bottom: 18px;
		padding: 12px;
		border: 1px solid var(--header-line, #dce4ee);
		border-radius: 12px;
	}

	.theme16-documents-table td {
		min-width: 0;
		padding: 8px;
		border: 0;
		overflow-wrap: anywhere;
	}

	.theme16-documents-table td::before {
		display: block;
		margin-bottom: 4px;
		color: var(--header-muted, #56667c);
		font-size: 12px;
		content: attr(data-label);
	}

	.theme16-documents-table [data-field="title"] {
		grid-column: 1 / -1;
		order: -1;
		width: auto;
		min-width: 0;
		font-size: 17px;
	}

	.theme16-documents-table [data-field="title"]::before {
		display: none;
	}

	.theme16-document-meta {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.theme16-document-meta,
	.theme16-document-docx,
	.theme16-document-file-card {
		padding: 18px;
	}

	.theme16-document-preview-frame {
		height: 65vh;
		min-height: 360px;
	}

	.theme16-document-actions > * {
		width: 100%;
	}
}
