.igdgl-container {
	--igdgl-accent: #1a73e8;
	--igdgl-fg: #1f2328;
	--igdgl-muted: #6b7280;
	--igdgl-border: #e5e7eb;
	--igdgl-item-height: 150px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var( --igdgl-fg );
}

.igdgl-container * {
	box-sizing: border-box;
}

.igdgl-empty {
	padding: 20px;
	text-align: center;
	color: var( --igdgl-muted );
	border: 1px dashed var( --igdgl-border );
	border-radius: 8px;
}

/* Bestandstype-iconen (eigen, offline set) */
.igdgl-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	flex-shrink: 0;
}
.igdgl-icon-ext {
	position: absolute;
	left: 50%;
	bottom: 6%;
	transform: translateX( -50% );
	max-width: 92%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.26em;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.02em;
	color: #fff;
	background: rgba( 0, 0, 0, 0.6 );
	padding: 0 0.4em;
	border-radius: 3px;
}
.igdgl-icon::before {
	content: "";
	width: 100%;
	height: 100%;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.igdgl-icon-folder { color: #f2b950; }
.igdgl-icon-image { color: #34a853; }
.igdgl-icon-video { color: #ea4335; }
.igdgl-icon-audio { color: #a142f4; }
.igdgl-icon-pdf { color: #d93025; }
.igdgl-icon-doc { color: #1a73e8; }
.igdgl-icon-sheet { color: #188038; }
.igdgl-icon-slide { color: #e37400; }
.igdgl-icon-archive { color: #795548; }
.igdgl-icon-generic { color: var( --igdgl-muted ); }

.igdgl-icon-folder::before { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M10 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z'/></svg>" ); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M10 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z'/></svg>" ); }
.igdgl-icon-image::before,
.igdgl-icon-video::before { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-4.5z'/></svg>" ); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-4.5z'/></svg>" ); }
.igdgl-icon-video::before { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 5h12a2 2 0 0 1 2 2v1.2l4-2.4v12.4l-4-2.4V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/></svg>" ); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 5h12a2 2 0 0 1 2 2v1.2l4-2.4v12.4l-4-2.4V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/></svg>" ); }
.igdgl-icon-audio::before { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 18V5l12-2v13M9 18a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm12-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0z'/></svg>" ); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 18V5l12-2v13M9 18a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm12-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0z'/></svg>" ); }
.igdgl-icon-pdf::before,
.igdgl-icon-doc::before,
.igdgl-icon-sheet::before,
.igdgl-icon-slide::before,
.igdgl-icon-archive::before,
.igdgl-icon-generic::before { mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5z'/></svg>" ); -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2h9l5 5v15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm8 1.5V8h4.5z'/></svg>" ); }

/* ---------------------------------------------------------------- */
/* Lijst-weergave                                                     */
/* ---------------------------------------------------------------- */
.igdgl-list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
.igdgl-list-item {
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 1px solid var( --igdgl-border );
}
.igdgl-list-item:last-child {
	border-bottom: none;
}
.igdgl-list-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 6px;
	color: inherit;
	text-decoration: none;
}
.igdgl-list-link:hover .igdgl-title {
	text-decoration: underline;
}
.igdgl-list-item .igdgl-icon {
	width: 22px;
	height: 22px;
	font-size: 22px;
}
.igdgl-list-item .igdgl-icon-ext {
	display: none;
}
.igdgl-list-item .igdgl-title {
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------------------------------------------------------------- */
/* Grid-weergave                                                      */
/* Elk item heeft dezelfde hoogte, een zeer lichte rand, een          */
/* gecentreerd bestandstype-icoon en de titel eronder.                */
/* ---------------------------------------------------------------- */
.igdgl-grid {
	display: grid;
	/* Kolommen-instelling is een MAXIMUM: op smallere schermen past de grid
	   zich vloeiend aan (minder kolommen). De vaste ondergrens (140px)
	   zorgt dat items nooit smaller worden dan bruikbaar is; zodra de
	   berekende kolombreedte daaronder zakt, past auto-fill vanzelf minder
	   kolommen per rij toe. */
	grid-template-columns: repeat( auto-fill, minmax( max( 140px, calc( ( 100% - ( var( --igdgl-cols, 4 ) - 1 ) * var( --igdgl-gap-h, 20px ) ) / var( --igdgl-cols, 4 ) ) ), 1fr ) );
	column-gap: var( --igdgl-gap-h, 20px );
	row-gap: var( --igdgl-gap-v, 20px );
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
/* Harde ondergrens: op mobiel altijd één item per rij (onder elkaar). */
@media ( max-width: 480px ) {
	.igdgl-grid {
		grid-template-columns: 1fr !important;
	}
}
.igdgl-grid-item {
	height: var( --igdgl-item-height );
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var( --igdgl-border );
	border-radius: 6px;
}
.igdgl-grid-link {
	display: flex;
	height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 10px;
	color: inherit;
	text-decoration: none;
	text-align: center;
}
.igdgl-grid-item .igdgl-icon {
	width: var( --igdgl-icon-size, 44px );
	height: var( --igdgl-icon-size, 44px );
	font-size: var( --igdgl-icon-size, 44px );
}
.igdgl-grid-item .igdgl-title {
	font-size: 13px;
	line-height: 1.3;
	max-width: 100%;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	word-break: break-word;
}

/* Optionele module-instelling "Lijst weergave op mobiel": op smalle
   schermen een compacte rij (klein icoon + bestandsnaam) i.p.v. een
   gestapelde kaart. */
@media ( max-width: 480px ) {
	.igdgl-grid--mobile-list {
		row-gap: 0 !important;
	}
	.igdgl-grid--mobile-list .igdgl-grid-item {
		height: auto !important;
		border: none !important;
		border-bottom: 1px solid var( --igdgl-border );
		border-radius: 0;
	}
	.igdgl-grid--mobile-list .igdgl-grid-item:last-child {
		border-bottom: none;
	}
	.igdgl-grid--mobile-list .igdgl-grid-item:nth-child( odd ) {
		background: transparent;
	}
	.igdgl-grid--mobile-list .igdgl-grid-item:nth-child( even ) {
		background: rgba( 0, 0, 0, 0.03 );
	}
	.igdgl-grid--mobile-list .igdgl-grid-link {
		flex-direction: row;
		justify-content: flex-start;
		text-align: left;
		height: auto;
		gap: 12px;
		padding: 10px 6px;
	}
	.igdgl-grid--mobile-list .igdgl-grid-item .igdgl-icon {
		width: 16px !important;
		height: 16px !important;
		font-size: 16px !important;
	}
	.igdgl-grid--mobile-list .igdgl-grid-item .igdgl-icon-ext {
		display: none;
	}
	.igdgl-grid--mobile-list .igdgl-grid-item .igdgl-title {
		font-size: 14px;
		text-align: left;
		display: block;
		-webkit-line-clamp: unset;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
}
