/*
 * DOC-1: downloads list.
 * A ruled list of files: a page mark, the name with a line on what it is, the
 * file type and size, and the link that downloads it. Stacked on a phone; on
 * one line from a tablet up.
 */

/* One file under another at every width. */
.wprk-section.wprk-doc-1 .wprk-doc-1__list {
	border-block-start: 1px solid var(--wprk-border);
	gap: 0;
	grid-template-columns: minmax(0, 1fr);
}

.wprk-doc-1 .wprk-doc-1__doc {
	border-block-end: 1px solid var(--wprk-border);
	column-gap: var(--wp--preset--spacing--30);
	display: grid;
	grid-template-columns: 2rem minmax(0, 1fr);
	padding-block: var(--wp--preset--spacing--30);
	row-gap: var(--wp--preset--spacing--10);
}

/* The page mark: a sheet with a folded corner, in the colour of a label. */
.wprk-doc-1 .wprk-doc-1__doc::before {
	background-color: var(--wprk-accent-text);
	content: "";
	grid-column: 1;
	grid-row: 1 / span 3;
	height: 2rem;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cpath d='M9 12h6M9 16h6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cpath d='M9 12h6M9 16h6'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 2rem;
}

.wprk-doc-1 .wprk-doc-1__doc > *,
.wprk-doc-1 .wprk-doc-1__text > * {
	margin: 0;
	min-width: 0;
}

.wprk-doc-1 .wprk-doc-1__doc > * {
	grid-column: 2;
}

.wprk-doc-1 .wprk-doc-1__text > * + * {
	margin-block-start: 0.2rem;
}

.wprk-doc-1 .wprk-doc-1__doc :where(h3) {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
	overflow-wrap: break-word;
}

.wprk-doc-1 .wprk-doc-1__doc .wprk-muted {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.wprk-doc-1 .wprk-doc-1__meta {
	color: var(--wprk-muted);
	font-size: var(--wp--preset--font-size--small);
	font-variant-numeric: lining-nums tabular-nums;
	line-height: 1.4;
}

/* From a tablet up: mark, name, file type and size, link, on one line. */
@media (min-width: 782px) {
	.wprk-doc-1 .wprk-doc-1__doc {
		align-items: center;
		column-gap: var(--wp--preset--spacing--40);
		grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 8rem) auto;
	}

	.wprk-doc-1 .wprk-doc-1__doc::before {
		grid-row: 1;
	}

	.wprk-doc-1 .wprk-doc-1__doc > .wprk-doc-1__text {
		grid-column: 2;
	}

	.wprk-doc-1 .wprk-doc-1__doc > .wprk-doc-1__meta {
		grid-column: 3;
	}

	.wprk-doc-1 .wprk-doc-1__doc > .wp-block-buttons {
		grid-column: 4;
		justify-self: end;
	}
}
