/* Hondenschool Drive PDF v2 — Frontend Portal, Compact File List, Kennisbank Search Box & PDF Viewer */
.hsdp-portal {
	--hsdp-accent: #2563eb;
	--hsdp-viewer-height: 760px;
	--hsdp-bg: #ffffff;
	--hsdp-surface: #f8fafc;
	--hsdp-border: #e5e7eb;
	--hsdp-text: #111827;
	--hsdp-muted: #6b7280;
	--hsdp-radius: 14px;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	color: var(--hsdp-text);
	background: var(--hsdp-bg);
	border: 1px solid var(--hsdp-border);
	border-radius: var(--hsdp-radius);
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
	margin: 1rem 0;
	box-sizing: border-box;
	text-align: left;
}

.hsdp-portal *,
.hsdp-portal *::before,
.hsdp-portal *::after,
.hsdp-lightbox *,
.hsdp-lightbox *::before,
.hsdp-lightbox *::after {
	box-sizing: border-box;
}

/* Header & breadcrumbs */
.hsdp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding: 14px 18px;
	background: var(--hsdp-surface);
	border-bottom: 1px solid var(--hsdp-border);
}

.hsdp-header__left {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.hsdp-header__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--hsdp-text);
	line-height: 1.3;
}

.hsdp-breadcrumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 13px;
	color: var(--hsdp-muted);
}

.hsdp-breadcrumb-btn {
	background: none;
	border: none;
	padding: 2px 4px;
	margin: 0;
	color: var(--hsdp-accent);
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	border-radius: 4px;
}

.hsdp-breadcrumb-btn:hover {
	text-decoration: underline;
}

/* Compact top filter bar ("17 bestanden" + "Filter bestanden") */
.hsdp-list-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 18px;
	border-bottom: 1px solid #f1f5f9;
	background: #ffffff;
}

.hsdp-file-count {
	font-size: 14px;
	font-weight: 600;
	color: var(--hsdp-text);
}

.hsdp-filter-wrap {
	position: relative;
	flex: 0 1 230px;
	min-width: 150px;
}

.hsdp-filter-icon {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	pointer-events: none;
	display: inline-flex;
}

.hsdp-filter-input {
	width: 100%;
	height: 36px;
	padding: 0 12px 0 34px;
	border: 1px solid #e5e7eb;
	border-radius: 9px;
	font-size: 13.5px;
	color: var(--hsdp-text);
	background: #f9fafb;
	outline: none;
	transition: border-color 0.14s ease, background-color 0.14s ease;
}

.hsdp-filter-input:focus {
	border-color: var(--hsdp-accent);
	background: #ffffff;
}

/* Compact File List Rows (matching Divi portal screenshot) */
.hsdp-list {
	list-style: none;
	margin: 0;
	padding: 6px 10px 10px;
}

.hsdp-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 10px;
	border-radius: 10px;
	transition: background-color 0.12s ease;
}

.hsdp-list-item + .hsdp-list-item {
	border-top: 1px solid #f3f4f6;
}

.hsdp-list-item:hover {
	background: #f8fafc;
}

.hsdp-item-main {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
	cursor: pointer;
}

.hsdp-doc-icon {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.hsdp-doc-icon--pdf {
	background: #fef2f2;
	color: #dc2626;
}

.hsdp-doc-icon--folder {
	background: #eff6ff;
	color: #2563eb;
}

.hsdp-item-text {
	min-width: 0;
	flex: 1;
}

.hsdp-item-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--hsdp-text);
	white-space: normal;
	word-break: break-word;
	line-height: 1.35;
}

.hsdp-item-meta {
	font-size: 12px;
	color: var(--hsdp-muted);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hsdp-item-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.hsdp-icon-btn {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	color: #4b5563;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
	padding: 0;
	transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.hsdp-icon-btn:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: var(--hsdp-text);
}

.hsdp-icon-btn--download {
	background: #eff6ff;
	border-color: #dbeafe;
	color: var(--hsdp-accent);
}

.hsdp-icon-btn--download:hover {
	background: var(--hsdp-accent);
	border-color: var(--hsdp-accent);
	color: #ffffff;
}

/* Search Box / Kennisbank module */
.hsdp-portal--search_box {
	padding: 26px 24px;
}

.hsdp-searchbox-head {
	text-align: center;
	margin: 0 0 18px;
	font-size: 20px;
	font-weight: 700;
	color: var(--hsdp-text);
}

.hsdp-searchbox-form {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 6px 6px 6px 14px;
	max-width: 560px;
	margin: 0 auto;
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.hsdp-searchbox-form:focus-within {
	border-color: var(--hsdp-accent);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.hsdp-searchbox-input {
	flex: 1;
	min-width: 0;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	font-size: 14.5px;
	color: var(--hsdp-text);
	height: 38px;
	padding: 0 6px;
}

.hsdp-searchbox-submit {
	background: var(--hsdp-accent);
	color: #ffffff;
	border: none;
	border-radius: 9px;
	padding: 0 20px;
	height: 38px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
	transition: opacity 0.14s ease;
}

.hsdp-searchbox-submit:hover {
	opacity: 0.92;
}

.hsdp-searchbox-results {
	margin-top: 18px;
}

.hsdp-searchbox-results:empty {
	display: none;
}

/* Grid view */
.hsdp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
	padding: 16px;
	background: var(--hsdp-surface);
}

.hsdp-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid var(--hsdp-border);
	border-radius: 11px;
	overflow: hidden;
	transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.hsdp-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.hsdp-card__preview {
	height: 98px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
	border-bottom: 1px solid var(--hsdp-border);
}

.hsdp-card__body {
	padding: 12px 14px;
	flex: 1;
}

.hsdp-card__body .hsdp-item-name {
	white-space: normal;
	word-break: break-word;
}

.hsdp-card__footer {
	display: flex;
	gap: 8px;
	padding: 10px 14px 14px;
}

.hsdp-card__footer .hsdp-btn {
	flex: 1;
	padding: 7px 10px;
	font-size: 12.5px;
}

/* Buttons */
.hsdp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	border: 1px solid transparent;
	white-space: nowrap;
}

.hsdp-btn--primary {
	background: var(--hsdp-accent);
	color: #ffffff;
}

.hsdp-btn--primary:hover {
	opacity: 0.92;
	color: #ffffff;
}

.hsdp-btn--secondary {
	background: #ffffff;
	color: var(--hsdp-text);
	border-color: var(--hsdp-border);
}

.hsdp-btn--secondary:hover {
	background: var(--hsdp-surface);
}

/* Loading, empty, error & login box */
.hsdp-loading,
.hsdp-empty,
.hsdp-error {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 10px;
	padding: 34px 20px;
	text-align: center;
	color: var(--hsdp-muted);
	font-size: 14px;
}

.hsdp-spinner {
	width: 24px;
	height: 24px;
	border: 3px solid var(--hsdp-border);
	border-top-color: var(--hsdp-accent);
	border-radius: 50%;
	display: inline-block;
	animation: hsdp-spin 0.75s linear infinite;
}

@keyframes hsdp-spin {
	to {
		transform: rotate(360deg);
	}
}

.hsdp-notice {
	padding: 20px 22px;
	background: #ffffff;
}

.hsdp-notice--warn {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}

.hsdp-notice__text {
	margin: 0 0 12px;
	font-size: 14.5px;
	color: var(--hsdp-text);
}

.hsdp-login-box {
	max-width: 380px;
	margin: 0 auto;
}

.hsdp-login-box form p {
	margin: 0 0 12px;
}

.hsdp-login-box label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 4px;
}

.hsdp-login-box input[type="text"],
.hsdp-login-box input[type="password"] {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
}

.hsdp-login-box input[type="submit"] {
	background: var(--hsdp-accent);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

/* Embed split-view layout */
.hsdp-embed-shell {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	height: var(--hsdp-viewer-height);
	min-height: 460px;
}

.hsdp-embed-shell--single {
	grid-template-columns: 1fr;
}

.hsdp-embed-sidebar {
	border-right: 1px solid var(--hsdp-border);
	background: var(--hsdp-surface);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.hsdp-embed-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--hsdp-border);
	padding: 11px 14px;
	cursor: pointer;
	color: var(--hsdp-text);
	font-size: 13.5px;
	font-weight: 500;
}

.hsdp-embed-nav-item:hover {
	background: #eef2f7;
}

.hsdp-embed-nav-item.is-active {
	background: #ffffff;
	color: var(--hsdp-accent);
	font-weight: 600;
	box-shadow: inset 3px 0 0 var(--hsdp-accent);
}

.hsdp-embed-viewer-pane {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: #1e293b;
}

@media (max-width: 820px) {
	.hsdp-embed-shell {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		height: auto;
	}
	.hsdp-embed-sidebar {
		border-right: none;
		border-bottom: 1px solid var(--hsdp-border);
		max-height: 220px;
	}
	.hsdp-embed-viewer-pane {
		height: var(--hsdp-viewer-height);
		min-height: 480px;
	}
}

/* PDF Viewer core */
.hsdp-viewer {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
	background: #1e293b;
	color: #f8fafc;
}

.hsdp-viewer-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	padding: 10px 14px;
	background: #0f172a;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	flex-shrink: 0;
}

.hsdp-viewer-title {
	font-size: 14px;
	font-weight: 600;
	color: #f8fafc;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 280px;
}

.hsdp-viewer-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.hsdp-vbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 32px;
	min-width: 32px;
	padding: 0 9px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.08);
	color: #f8fafc;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
}

.hsdp-vbtn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.18);
	color: #ffffff;
}

.hsdp-vbtn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.hsdp-vbtn--accent {
	background: var(--hsdp-accent, #2563eb);
	border-color: transparent;
}

.hsdp-page-indicator {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: #e2e8f0;
}

.hsdp-page-input {
	width: 48px;
	height: 30px;
	text-align: center;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 5px;
	color: #ffffff;
	font-size: 13px;
	padding: 0 4px;
}

.hsdp-zoom-label {
	min-width: 46px;
	text-align: center;
	font-size: 12.5px;
	color: #cbd5e1;
}

.hsdp-viewer-stage {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 18px 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	background: #334155;
	position: relative;
	-webkit-overflow-scrolling: touch;
}

.hsdp-viewer-stage.is-view-only {
	user-select: none;
	-webkit-user-select: none;
}

.hsdp-pdf-page {
	background: #ffffff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.hsdp-pdf-page canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.hsdp-viewer-message {
	margin: auto;
	text-align: center;
	color: #e2e8f0;
	padding: 30px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.hsdp-fallback-frame {
	width: 100%;
	height: 100%;
	border: 0;
	background: #ffffff;
}

/* Lightbox modal */
.hsdp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(15, 23, 42, 0.8);
	backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

.hsdp-lightbox[hidden] {
	display: none;
}

.hsdp-lightbox__dialog {
	width: min(1140px, 100%);
	height: min(92vh, 960px);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
}

@media (max-width: 640px) {
	.hsdp-lightbox {
		padding: 0;
	}
	.hsdp-lightbox__dialog {
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
	.hsdp-viewer-title {
		max-width: 160px;
	}
}
