:root {
	--mv-color-sapphire: #1f4b73;
	--mv-color-teal: #285f77;
	--mv-color-gold: #f0c04a;
	--mv-color-body: #475569;
	--mv-color-muted: #5c6c7f;
	--mv-color-white: #ffffff;
	--mv-color-offwhite: #f8fafc;
	--mv-color-border: #e4e9ed;
	--mv-color-panel: rgba(255, 255, 255, 0.96);
	--mv-shadow-light: 0 1px 2px rgba(9, 26, 47, 0.06);
	--mv-shadow-deep: 0 28px 80px rgba(9, 26, 47, 0.16);
	--mv-radius-sm: 6px;
	--mv-radius-xl: 24px;
}

html.mv-viewer-open,
body.mv-viewer-open {
	overflow: hidden;
}

.mv-screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pdf-viewer-helper-modal {
	position: relative;
	z-index: 9998;
	--mv-admin-bar-offset: 0px;
}

.admin-bar .pdf-viewer-helper-modal {
	--mv-admin-bar-offset: 32px;
}

.mv-reader__backdrop {
	position: fixed;
	inset: 0;
	z-index: 9998;
	background: rgba(7, 25, 48, 0.46);
	backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease;
}

.mv-reader[data-open="true"] .mv-reader__backdrop {
	opacity: 1;
	pointer-events: auto;
}

.mv-reader__shell {
	position: fixed;
	inset: calc(24px + var(--mv-admin-bar-offset, 0px)) 24px 24px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	padding: 8px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.96) 100%);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(9, 26, 47, 0.08);
	border-radius: var(--mv-radius-xl);
	box-shadow: var(--mv-shadow-deep);
	opacity: 0;
	pointer-events: none;
	overflow: hidden;
	transition: opacity 180ms ease;
}

.mv-reader[data-open="true"] .mv-reader__shell {
	opacity: 1;
	pointer-events: auto;
}


.mv-stage-wrap {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	min-height: 0;
}

.mv-state-panel {
	display: grid;
	gap: 10px;
	padding: 16px 18px;
	border: 1px solid rgba(9, 26, 47, 0.08);
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(243, 247, 251, 0.98) 100%);
	box-shadow: var(--mv-shadow-light);
}

.mv-state-panel[hidden] {
	display: none;
}

.mv-state-panel__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

.mv-status {
	margin: 0;
	color: var(--mv-color-muted);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
}

.mv-status.is-error {
	color: #d10003;
}

.mv-button,
.mv-button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 12px 18px;
	border: 1px solid transparent;
	border-radius: var(--mv-radius-sm);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mv-button:hover,
.mv-button:focus-visible {
	transform: translateY(-1px);
}

.mv-button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(9, 26, 47, 0.12);
}

.mv-button--primary {
	background: var(--mv-color-gold);
	color: var(--mv-color-sapphire);
}

.mv-button--primary:hover,
.mv-button--primary:focus-visible {
	background: #e7ab00;
	color: var(--mv-color-sapphire);
}

.mv-button--secondary {
	border-color: var(--mv-color-border);
	background: var(--mv-color-white);
	color: var(--mv-color-sapphire);
}

.mv-button--secondary:hover,
.mv-button--secondary:focus-visible {
	border-color: var(--mv-color-teal);
	color: var(--mv-color-teal);
}

.mv-stage {
	position: relative;
	flex: 1;
	min-height: 360px;
	padding: 0;
	border: 1px solid rgba(9, 26, 47, 0.08);
	border-radius: 16px;
	background: linear-gradient(180deg, #f8fafc 0%, #eef3f7 100%);
	overflow: hidden;
}

.mv-reader[data-state="error"] .mv-stage {
	min-height: 360px;
}

.mv-stage__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: inherit;
	background: var(--mv-color-white);
	overflow: hidden;
}

@media (max-width: 1080px) {
	.mv-reader__shell {
		inset: calc(18px + var(--mv-admin-bar-offset, 0px)) 18px 18px;
	}
}

@media (max-width: 768px) {
	.mv-reader__shell {
		inset: var(--mv-admin-bar-offset, 0px) 0 0;
		border-radius: 0;
	}

	.mv-stage {
		min-height: 0;
	}
}

@media (max-width: 480px) {
	.mv-state-panel {
		padding: 10px;
	}
}

@media screen and (max-width: 782px) {
	.admin-bar .pdf-viewer-helper-modal {
		--mv-admin-bar-offset: 46px;
	}
}
