.claim-drafter-page {
	overflow: hidden;
}

.claim-drafter-page .container {
	max-width: none;
	margin: 0;
	padding: 0;
}

/* The global #header reserves a fixed 164px even after the banner shrinks,
   which leaves a wasted gray gap above the workspace and floors
   syncWorkspaceTop() at 164px. Let it size to its actual content (banner + nav)
   so the workspace can sit right under the nav in both full and compact states. */
.claim-drafter-page #header {
	height: auto;
	min-height: 0;
}

.claim-drafter-shell {
	position: fixed;
	top: 224px;
	right: 0;
	bottom: 0;
	left: 0;
	box-sizing: border-box;
	padding: 16px;
	background: var(--secondary-color);
	transition: top 0.8s ease;
}

/* Banner shrink while working in Claim Drafter is driven by the iframe's internal
   scroll (see claim-drafter.html), which toggles `is-compact` on #topbar. The
   styling for that class lives in common.css alongside User.handleScroll()'s
   own use of it. */

.claim-drafter-frame {
	display: block;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	border: 0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.claim-drafter-loading {
	position: absolute;
	inset: 16px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	border-radius: 8px;
	background: #fff;
	color: var(--primary-color);
	font-weight: 600;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.claim-drafter-shell.is-loaded .claim-drafter-loading {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.claim-drafter-spinner {
	width: 24px;
	height: 24px;
	box-sizing: border-box;
	border: 3px solid #c9dce9;
	border-top-color: var(--primary-color);
	border-radius: 50%;
	animation: claim-drafter-spin 800ms linear infinite;
}

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

@media (max-width: 768px) {
	/* Sits over the shell, not in place of it: the iframe still loads and still
	   receives its token via forwardToken(), so "Open anyway" just uncovers a
	   working session. */
	.drafter-mobile-notice {
		display: flex;
		position: fixed;
		inset: 0;
		z-index: 30;
		padding: 1rem;
		background-color: var(--secondary-color);
		overflow-y: auto;
	}

	.claim-drafter-shell {
		padding: 8px;
	}

	.claim-drafter-frame,
	.claim-drafter-loading {
		border-radius: 6px;
	}

	.claim-drafter-loading {
		inset: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.claim-drafter-spinner {
		animation: none;
	}
}
