/*
 * Dokumenttikirjasto (avalon/document-library): the documents of the media library by product group. A search field and
 * filter chips (brand, language, type) above; each group has its heading, each product its name and a list of files: a
 * file type tile, the name, the language, the brand and the size. Sharp corners, hairlines, no shadows, as everywhere on
 * the site. The chips are those of the keyword filter (posts.css).
 */

.ab-docs [hidden] {
	display: none !important;
}

.ab-docs__filters {
	display: grid;
	gap: 14px;
	margin: 0 0 48px;
	padding: 24px;
	background: var(--ab-tint, #eaf8f9);
}

.ab-docs__search {
	display: block;
}

.ab-docs__q {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 18px 0 52px;
	border: 1px solid var(--ab-line, #cfd9e2);
	border-radius: 0;
	background: #fff url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23012b55' stroke-width='1.8'/%3E%3Cpath d='M20 20L16.65 16.65' stroke='%23012b55' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 18px center;
	color: var(--ab-heading, #012b55);
	font-family: inherit;
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}

.ab-docs__q::placeholder {
	color: #66717d;
	opacity: 1;
}

.ab-docs__q:focus {
	outline: 0;
	border-color: var(--ab-navy, #002b56);
	box-shadow: inset 0 -3px 0 var(--ab-accent, #30cbd3);
}

.ab-docs__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.ab-docs__chips-label {
	min-width: 72px;
	color: var(--ab-muted, #4a5563);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ab-docs__chip {
	margin: 0;
	padding: 8px 16px;
	border: 1px solid var(--ab-line, #cfd9e2);
	border-radius: 0;
	background: #fff;
	color: var(--ab-heading, #012b55);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ab-docs__chip:hover {
	border-color: var(--ab-navy, #002b56);
}

.ab-docs__chip.is-active {
	border-color: var(--ab-navy, #002b56);
	background: var(--ab-navy, #002b56);
	color: #fff;
}

.ab-docs__chip:focus-visible,
.ab-docs__clear:focus-visible {
	outline: 3px solid var(--ab-navy, #002b56);
	outline-offset: 2px;
}

.ab-docs__status {
	margin: 0;
	color: var(--ab-muted, #4a5563);
	font-size: 14px;
}

.ab-docs__clear {
	justify-self: start;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ab-accent-ink, #0e7c83);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* the groups */
.ab-docs__group {
	margin: 0 0 56px;
	scroll-margin-top: 160px;
}

.ab-docs__group-title {
	margin: 0 0 24px;
	padding: 0 0 12px;
	border-bottom: 2px solid var(--ab-navy, #002b56);
	font-size: 28px;
	line-height: 1.2;
}

.ab-docs__product {
	margin: 0 0 28px;
}

.ab-docs__product-title {
	margin: 0 0 6px;
	font-size: 19px;
	line-height: 1.3;
}

.ab-docs__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ab-doc {
	margin: 0;
	border-bottom: 1px solid var(--ab-line, #d6e0e8);
}

.ab-doc__link {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 12px 8px;
	color: var(--ab-heading, #012b55);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.ab-doc__link:hover {
	background: var(--ab-tint, #eaf8f9);
}

.ab-doc__link:focus-visible {
	outline: 3px solid var(--ab-navy, #002b56);
	outline-offset: -3px;
}

.ab-doc__ext {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 32px;
	background: var(--ab-navy, #002b56);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.ab-doc__ext--dwg,
.ab-doc__ext--dxf {
	background: #0e7c83;
}

.ab-doc__ext--xlsx,
.ab-doc__ext--xls,
.ab-doc__ext--zip,
.ab-doc__ext--doc,
.ab-doc__ext--docx {
	background: #66717d;
}

.ab-doc__name {
	font-size: 17px;
	font-weight: 500;
	line-height: 1.35;
}

.ab-doc__link:hover .ab-doc__name {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ab-doc__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	color: var(--ab-muted, #4a5563);
	font-size: 13px;
	white-space: nowrap;
}

.ab-doc__tag {
	padding: 2px 8px;
	border: 1px solid var(--ab-line, #cfd9e2);
	color: var(--ab-heading, #012b55);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.ab-doc__tag--brand {
	border-color: transparent;
	background: var(--ab-tint, #eaf8f9);
}

@media (max-width: 768px) {
	.ab-docs__filters {
		padding: 16px;
	}

	.ab-docs__chips-label {
		flex: 0 0 100%;
	}

	.ab-docs__group-title {
		font-size: 23px;
	}

	.ab-doc__link {
		grid-template-columns: 44px minmax(0, 1fr);
		gap: 6px 12px;
	}

	.ab-doc__ext {
		width: 44px;
		grid-row: 1 / span 2;
	}

	.ab-doc__meta {
		grid-column: 2;
		justify-content: flex-start;
	}

	.ab-doc__name {
		font-size: 16px;
	}
}

/* the product page's Dokumentit tab */
.ab-docs--tab .ab-docs__product {
	margin: 0 0 24px;
}

.ab-docs--tab .ab-docs__product:last-child {
	margin-bottom: 0;
}

.ab-docs--tab .ab-docs__product-title {
	font-size: 17px;
}

/* a site without the section block plugin (the dedicated document site): a simple container; the block plugin's own styles win */
:where(.ab-docs) > :where(.ab-container) {
	box-sizing: border-box;
	max-width: 1200px;
	margin-inline: auto;
	padding: 40px 24px;
}
