/* PDF viewer modal */
.pdf-modal {
	position: fixed;
	inset: 0;
	z-index: 12000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 2.5vh, 40px) clamp(16px, 3vw, 48px);
	box-sizing: border-box;
}

.pdf-modal[hidden] {
	display: none !important;
}

.pdf-modal__backdrop {
	appearance: none;
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(10, 10, 12, 0.78);
	cursor: pointer;
}

.pdf-modal__shell {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: stretch;
	justify-content: center;
	width: min(1600px, calc(100vw - 64px));
	height: min(920px, calc(100vh - 64px));
	max-height: calc(100vh - 64px);
}

.pdf-modal__dialog {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 16px;
	background: #111;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
	outline: none;
	animation: pdf-modal-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pdf-modal-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.pdf-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex: 0 0 auto;
	padding: 14px 16px 14px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	background: #18181b;
}

.pdf-modal__title {
	margin: 0;
	min-width: 0;
	font-family: var(--ee-font-condensed, "Open Sans", sans-serif);
	font-variation-settings: "wdth" 75;
	font-weight: 700;
	font-size: clamp(16px, 1.1vw, 22px);
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: #fff;
}

.pdf-modal__header-actions {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

.pdf-modal__download {
	flex: 0 0 auto;
	font-family: var(--ee-font-body-os, "Open Sans", sans-serif);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	color: #ff7a59;
	text-decoration: none;
	white-space: nowrap;
}

.pdf-modal__download:hover,
.pdf-modal__download:focus-visible {
	color: #fff;
	outline: none;
}

.pdf-modal__close {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #000;
	box-shadow: none;
	cursor: pointer;
	box-sizing: border-box;
	line-height: 0;
}

.pdf-modal__close img {
	display: block;
	width: 16px;
	height: 16px;
	object-fit: contain;
	pointer-events: none;
	/* SVG paths are white — keep them visible on the dark button */
	filter: none;
}

.pdf-modal__close:hover,
.pdf-modal__close:focus-visible {
	background: #222;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.pdf-modal__viewer {
	flex: 1 1 auto;
	min-height: 0;
	background: #0b0b0d;
}

.pdf-modal__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #0b0b0d;
}

body.pdf-modal-open {
	overflow: hidden;
}

@media (min-width: 1920px) {
	.pdf-modal__shell {
		width: min(1800px, calc(100vw - 96px));
		height: min(1040px, calc(100vh - 80px));
		max-height: calc(100vh - 80px);
	}
}

@media (min-width: 2560px) {
	.pdf-modal {
		padding: clamp(24px, 2.2vh, 56px) clamp(32px, 4vw, 80px);
	}

	.pdf-modal__shell {
		width: min(2400px, 78vw);
		height: calc(100vh - 96px);
		max-height: calc(100vh - 96px);
	}

	.pdf-modal__dialog {
		border-radius: 20px;
	}

	.pdf-modal__header {
		padding: 18px 20px 18px 28px;
	}

	.pdf-modal__close {
		width: 48px;
		height: 48px;
		min-width: 48px;
		min-height: 48px;
	}

	.pdf-modal__close img {
		width: 18px;
		height: 18px;
	}

	.pdf-modal__download {
		font-size: 15px;
	}
}

@media (min-width: 3840px) {
	.pdf-modal__shell {
		width: min(3000px, 72vw);
		height: calc(100vh - 120px);
		max-height: calc(100vh - 120px);
	}
}

@media (max-width: 767px) {
	.pdf-modal {
		padding: 12px;
	}

	.pdf-modal__shell {
		width: 100%;
		height: calc(100vh - 24px);
		max-height: calc(100vh - 24px);
	}

	.pdf-modal__dialog {
		border-radius: 12px;
	}

	.pdf-modal__header {
		padding: 12px 12px 12px 16px;
	}

	.pdf-modal__title {
		font-size: 16px;
	}

	.pdf-modal__close {
		width: 36px;
		height: 36px;
		min-width: 36px;
		min-height: 36px;
	}
}
