/* Document viewer modal */
html.dnccp-document-viewer-lock,
body.dnccp-document-viewer-lock {
	overflow: hidden;
}

.dnccp-document-viewer {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	box-sizing: border-box;
	padding: 24px;
	font-family: inherit;
}

.dnccp-document-viewer *,
.dnccp-document-viewer *::before,
.dnccp-document-viewer *::after {
	box-sizing: border-box;
}

.dnccp-document-viewer.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

.dnccp-document-viewer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.76);
	backdrop-filter: blur(3px);
}

.dnccp-document-viewer__panel {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(1120px, 100%);
	height: min(860px, calc(100vh - 48px));
	flex-direction: column;
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.42);
}

.dnccp-document-viewer__header {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	min-height: 72px;
	padding: 14px 18px;
	border-bottom: 1px solid #e5e7eb;
	background: #ffffff;
}

.dnccp-document-viewer__heading {
	min-width: 0;
}

.dnccp-document-viewer__eyebrow {
	margin: 0 0 2px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
	color: #006a4e;
}

.dnccp-document-viewer__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: #111827;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 680px;
}

.dnccp-document-viewer__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.dnccp-document-viewer__action,
.dnccp-document-viewer__close {
	display: inline-flex;
	height: 38px;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: 8px;
	border: 1px solid #006a4e;
	padding: 0 12px;
	background: #fff;
	color: #006a4e;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dnccp-document-viewer__action:hover,
.dnccp-document-viewer__close:hover {
	background: #effaf5;
	color: #00533d;
	text-decoration: none;
}

.dnccp-document-viewer__action--primary {
	background: #006a4e;
	color: #fff;
}

.dnccp-document-viewer__action--primary:hover {
	background: #00533d;
	color: #fff;
}

.dnccp-document-viewer .ph {
	font-size: 15px;
	line-height: 1;
}

.dnccp-document-viewer__close {
	width: 38px;
	padding: 0;
	border-color: #d1d5db;
	color: #111827;
	font-size: 24px;
	font-weight: 400;
}

.dnccp-document-viewer__toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 8px 16px;
	border-bottom: 1px solid #e5e7eb;
	background: #fafafa;
}

.dnccp-document-viewer__toolbar[hidden] {
	display: none;
}

.dnccp-document-viewer__tool {
	display: inline-flex;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #111827;
	cursor: pointer;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.dnccp-document-viewer__tool:hover:not(:disabled) {
	border-color: #006a4e;
	color: #006a4e;
	background: #effaf5;
}

.dnccp-document-viewer__tool:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.dnccp-document-viewer__page {
	min-width: 104px;
	color: #374151;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.dnccp-document-viewer__divider {
	width: 1px;
	height: 24px;
	background: #d1d5db;
}

.dnccp-document-viewer__body {
	position: relative;
	min-height: 0;
	flex: 1;
	padding: 12px;
	background: #f3f4f6;
}

.dnccp-document-viewer__pdf {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	overflow: auto;
	border-radius: 6px;
	background: #d8dde5;
	box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.dnccp-document-viewer__pdf[hidden],
.dnccp-document-viewer__frame[hidden] {
	display: none;
}

.dnccp-document-viewer__canvas {
	display: block;
	margin: 24px auto;
	max-width: none;
	background: #fff;
	box-shadow: 0 12px 34px rgba(15, 23, 42, 0.2);
}

.dnccp-document-viewer__frame {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.dnccp-document-viewer__status {
	position: absolute;
	inset: 12px;
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 24px;
	border-radius: 6px;
	background: #fff;
	color: #374151;
	font-size: 15px;
	font-weight: 500;
	text-align: center;
}

.dnccp-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid #f3f4f6;
	border-top: 4px solid #006a4e;
	border-radius: 50%;
	animation: dnccp-spin 1s linear infinite;
}

@keyframes dnccp-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.dnccp-document-viewer__status[hidden] {
	display: none;
}

.dnccp-document-viewer__fallback {
	position: absolute;
	inset: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 24px;
	color: #4b5563;
	text-align: center;
}

@media (max-width: 640px) {
	.dnccp-document-viewer {
		padding: 0;
	}

	.dnccp-document-viewer__panel {
		width: 100%;
		height: 100vh;
		border-radius: 0;
	}

	.dnccp-document-viewer__header {
		position: relative;
		align-items: flex-start;
		flex-direction: column;
		min-height: 132px;
		padding: 14px 14px 12px;
	}

	.dnccp-document-viewer__actions {
		width: 100%;
		flex-wrap: wrap;
	}

	.dnccp-document-viewer__action {
		flex: 1 1 0;
		min-width: 0;
		padding: 0 10px;
		font-size: 13px;
	}

	.dnccp-document-viewer__close {
		position: absolute;
		top: 12px;
		right: 12px;
	}

	.dnccp-document-viewer__title {
		max-width: none;
		padding-right: 44px;
		white-space: normal;
		font-size: 15px;
	}

	.dnccp-document-viewer__toolbar {
		justify-content: flex-start;
		overflow-x: auto;
		padding: 8px;
	}

	.dnccp-document-viewer__page {
		min-width: 92px;
		font-size: 12px;
	}

	.dnccp-document-viewer__body {
		padding: 8px;
	}

	.dnccp-document-viewer__canvas {
		margin: 12px auto;
	}

	.dnccp-document-viewer__fallback,
	.dnccp-document-viewer__status {
		inset: 8px;
	}
}
