.km-grid {
	display: grid;
	grid-template-columns: repeat(var(--km-cols, 1), minmax(0, 1fr));
	gap: var(--km-grid-gap, 16px);
	width: 100%;
}

@media (max-width: 767px) {
	.km-grid {
		grid-template-columns: repeat(var(--km-cols-m, 1), minmax(0, 1fr));
	}
}

.km-tile {
	display: flex;
	flex-direction: var(--km-dir, row);
	justify-content: var(--km-jc, flex-start);
	align-items: var(--km-ai, center);
	gap: var(--km-gap, 16px);
	box-sizing: border-box;
	width: var(--km-w, 100%);
	max-width: 100%;
	height: var(--km-ht, auto);
	justify-self: var(--km-self, start);
	padding: var(--km-pad, 12px);
	background: var(--km-bg, #fff);
	border: var(--km-bw, 1px) solid var(--km-bc, #ddd);
	border-radius: var(--km-r, 6px);
	color: var(--km-tc, #333);
	font-family: var(--km-ff, inherit);
	text-decoration: none !important;
	overflow: hidden;
	box-shadow: var(--km-sh, none);
	transition: background-color .25s ease, box-shadow .25s ease;
}

.km-tile.km-link:hover {
	background: var(--km-bgh, var(--km-bg, #fff));
	box-shadow: var(--km-shh, var(--km-sh, none));
}

.km-tile .km-image {
	display: block;
	flex: 0 0 auto;
	width: var(--km-iw, 80px);
	max-width: 100%;
}

.km-tile .km-img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border: 0;
	box-shadow: none;
}

.km-tile .km-text {
	display: block;
	flex: 0 1 auto;
	min-width: 0;
	text-align: var(--km-ta, left);
}

.km-tile .km-title {
	display: block;
	font-family: inherit;
	font-size: var(--km-ts, inherit);
	font-weight: var(--km-tw, 600);
	font-style: var(--km-tst, normal);
	line-height: 1.3;
	color: var(--km-tc, #333);
	text-decoration: var(--km-td, none) !important;
}

.km-tile .km-desc {
	display: block;
	margin-top: 4px;
	font-family: inherit;
	font-size: var(--km-ds, inherit);
	font-weight: var(--km-dw, inherit);
	color: var(--km-dc, #555);
	text-decoration: none !important;
}

.km-empty {
	padding: 10px 14px;
	border: 1px dashed #c0392b;
	color: #c0392b;
	font-size: 14px;
}

.km-tile .km-icon {
	width: var(--km-icsz, 40px);
	color: var(--km-ic, #333);
}

.km-tile .km-icon svg {
	display: block;
	width: 100%;
	height: auto;
}

/* Lightbox */
html.km-lb-lock { overflow: hidden; }

.km-lb {
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	z-index: 2147483000 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, .78);
	box-sizing: border-box;
}

.km-lb[hidden] { display: none !important; }

.km-lb-box {
	display: flex;
	flex-direction: column;
	max-width: 100%;
	max-height: 100%;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.km-lb-box.km-lb-pdf {
	width: min(1000px, 100%);
	height: 100%;
}

.km-lb-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 8px 12px;
	background: #f3f3f3;
	border-bottom: 1px solid #ddd;
	font: 14px/1.3 Arial, Helvetica, sans-serif;
	color: #222;
}

.km-lb-title {
	flex: 1;
	min-width: 0;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.km-lb-open {
	color: #1a5fb4 !important;
	text-decoration: underline !important;
	white-space: nowrap;
	font-size: 13px;
}

.km-lb-close {
	appearance: none;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #222 !important;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0 6px !important;
	margin: 0 !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	border-radius: 0 !important;
}

.km-lb-close:hover { color: #b00 !important; background: transparent !important; }

.km-lb-body {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}

.km-lb-body iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.km-lb-body img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 120px);
	width: auto;
	height: auto;
}

@media (max-width: 600px) {
	.km-lb { padding: 0; }
	.km-lb-box { border-radius: 0; }
	.km-lb-box.km-lb-pdf { width: 100%; }
}
