html {
	overflow-x: hidden;
}

body.single-projectx_coa {
	overflow-x: hidden;
	margin: 0;
	background: #0b1d33;
	color: #f5faff;
}

body.single-projectx_coa.admin-bar {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

body.single-projectx_coa .px-site-header,
body.single-projectx_coa .px-site-footer,
body.single-projectx_coa .site-header,
body.single-projectx_coa .site-footer,
body.single-projectx_coa .generate-sections-inside-site-header,
body.single-projectx_coa #wpadminbar {
	display: none !important;
}

body.single-projectx_coa .site,
body.single-projectx_coa .site-content,
body.single-projectx_coa .content-area,
body.single-projectx_coa .inside-article,
body.single-projectx_coa .grid-container,
body.single-projectx_coa .separate-containers .inside-article,
body.single-projectx_coa .separate-containers .site-main {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent;
	box-shadow: none;
}

body.single-projectx_coa .entry-header,
body.single-projectx_coa .entry-meta,
body.single-projectx_coa .page-header,
body.single-projectx_coa .entry-content {
	display: none;
}

.projectx-coa-viewer {
	--coa-bg: #0b1d33;
	--coa-text: #f5faff;
	--coa-muted: #9db8d3;
	--coa-accent: #42a5f5;
	--coa-border: rgba(255, 255, 255, 0.1);
	--coa-touch: 44px;

	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	background: var(--coa-bg);
	color: var(--coa-text);
	overflow-x: hidden;
	padding-bottom: env(safe-area-inset-bottom);
}

.projectx-coa-viewer__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	padding: 0.75rem 1rem;
	padding-top: max(0.75rem, env(safe-area-inset-top));
	border-bottom: 1px solid var(--coa-border);
}

.projectx-coa-viewer__info {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.75rem;
	min-width: 0;
	flex: 1 1 0;
}

.projectx-coa-viewer__brand {
	color: #ffffff;
	font-family: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, sans-serif;
	font-size: 0.95rem;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	white-space: nowrap;
}

.projectx-coa-viewer__title {
	margin: 0;
	font-family: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.projectx-coa-viewer__batch {
	color: var(--coa-muted);
	font-size: 0.85rem;
	font-weight: 500;
	overflow-wrap: anywhere;
}

.projectx-coa-viewer__back {
	display: inline-flex;
	align-items: center;
	align-self: center;
	padding: 0.35rem 0.75rem;
	border: 1px solid transparent;
	border-radius: 6px;
	color: var(--coa-accent);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.875rem;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.projectx-coa-viewer__back:hover,
.projectx-coa-viewer__back:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	border-color: var(--coa-border);
	outline: none;
}

.projectx-coa-viewer__back:focus-visible {
	box-shadow: 0 0 0 2px var(--coa-accent);
}

.projectx-coa-viewer__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 1rem;
	border-bottom: 1px solid var(--coa-border);
}

.projectx-coa-viewer__group {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.projectx-coa-viewer__group--zoom {
	margin-left: auto;
}

.projectx-coa-viewer__toolbar button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--coa-touch);
	height: var(--coa-touch);
	padding: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--coa-text);
	font: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.projectx-coa-viewer__toolbar button:hover,
.projectx-coa-viewer__toolbar button:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.15);
	outline: none;
}

.projectx-coa-viewer__toolbar button:focus-visible {
	box-shadow: 0 0 0 2px var(--coa-accent);
}

.projectx-coa-viewer__toolbar button:disabled {
	opacity: 0.4;
	cursor: default;
	background: transparent;
	border-color: transparent;
}

.projectx-coa-viewer__toolbar button svg {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.projectx-coa-viewer__page {
	min-width: 3.5rem;
	padding: 0 0.25rem;
	text-align: center;
	color: var(--coa-muted);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}

.projectx-coa-viewer__stage {
	flex: 1;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 1rem;
}

.projectx-coa-viewer__canvas-wrap {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	position: relative;
	width: 100%;
	min-height: 100%;
	max-width: 100%;
}

.projectx-coa-viewer canvas {
	display: block;
	max-width: 100%;
	height: auto;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
	border-radius: 2px;
}

.projectx-coa-viewer__status {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
	padding: 0.75rem 1.25rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: var(--coa-text);
	font-size: 0.875rem;
	text-align: center;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.projectx-coa-viewer__status[hidden] {
	display: none;
}

.projectx-coa-viewer:fullscreen,
.projectx-coa-viewer:-webkit-full-screen {
	width: 100%;
	height: 100%;
	min-height: 100%;
	border-radius: 0;
}

@media (max-width: 768px) {
	.projectx-coa-viewer__header {
		padding: 0.65rem 0.75rem;
	}

	.projectx-coa-viewer__title {
		font-size: 0.95rem;
	}

	.projectx-coa-viewer__batch {
		font-size: 0.8rem;
	}

	.projectx-coa-viewer__toolbar {
		justify-content: center;
		padding: 0.25rem 0.75rem;
	}

	.projectx-coa-viewer__group--zoom {
		margin-left: 0;
	}

	.projectx-coa-viewer__stage {
		padding: 0.5rem;
	}
}

@media (max-width: 480px) {
	.projectx-coa-viewer__toolbar {
		gap: 0.15rem;
	}

	.projectx-coa-viewer__toolbar button {
		width: 44px;
		height: 44px;
	}

	.projectx-coa-viewer__page {
		min-width: 3rem;
		font-size: 0.8rem;
	}

	.projectx-coa-viewer__stage {
		padding: 0.25rem;
	}
}
