/**
 * Formspedia PDF Studio — PDFFiller / DocHub-Grade UI Styles
 * Compatible with the Formspedia theme + Full-Screen Studio mode
 */

.fi-pdf-studio-shell {
	--fi-bg-dark: #0f172a;
	--fi-bg-toolbar: #1e293b;
	--fi-bg-stage: #cbd5e1;
	--fi-border: #cbd5e1;
	--fi-accent: #0f6b5c;
	--fi-accent-hover: #0a5246;
	--fi-blue: #2563eb;
	--fi-blue-soft: rgba(37, 99, 235, 0.14);
	--fi-green: #2b3036;
	--fi-green-hover: #111417;
	--fi-text: #0f172a;
	--fi-muted: #64748b;
	margin: 28px 0 36px;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
	color: var(--fi-text);
}

.fi-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Fullscreen Studio Mode */
.fi-pdf-studio-shell.is-fullscreen {
	position: fixed !important;
	inset: 0 !important;
	z-index: 999999 !important;
	margin: 0 !important;
	border-radius: 0 !important;
	border: none !important;
	display: flex !important;
	flex-direction: column !important;
	height: 100vh !important;
	width: 100vw !important;
	overflow: hidden !important;
}

.fi-pdf-studio-shell.is-fullscreen .fi-pdf-hero-bar {
	padding: 10px 20px;
	flex-shrink: 0;
}

.fi-pdf-studio-shell.is-fullscreen .fi-pdf-hero-subtitle {
	display: none;
}

.fi-pdf-studio-shell.is-fullscreen .fi-pdf-workspace {
	flex: 1 1 0% !important;
	display: flex !important;
	flex-direction: column !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

.fi-pdf-studio-shell.is-fullscreen .fi-pdf-toolbar,
.fi-pdf-studio-shell.is-fullscreen .fi-pdf-statusbar {
	flex-shrink: 0;
}

.fi-pdf-studio-shell.is-fullscreen .fi-pdf-body {
	flex: 1 1 0% !important;
	min-height: 0 !important;
	height: auto !important;
	max-height: none !important;
	overflow: hidden !important;
}

.fi-pdf-studio-shell.is-fullscreen .fi-pdf-stage {
	flex: 1 1 0% !important;
	min-height: 0 !important;
	height: 100% !important;
	overflow-y: auto !important;
	overflow-x: auto !important;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* Fullscreen Expand / Shrink Icon Toggle */
.fi-pdf-studio-shell .fi-icon-shrink {
	display: none;
}

.fi-pdf-studio-shell.is-fullscreen .fi-icon-expand {
	display: none;
}

.fi-pdf-studio-shell.is-fullscreen .fi-icon-shrink {
	display: inline-block;
}

.fi-pdf-studio-shell.is-fullscreen .fi-js-toggle-fullscreen {
	background: #dc2626;
	border-color: #ef4444;
	color: #ffffff;
	width: auto;
	padding: 0 10px;
	gap: 5px;
	font-size: 12px;
	font-weight: 600;
}

.fi-pdf-studio-shell:not(.is-fullscreen) .fi-js-toggle-fullscreen .fi-fullscreen-btn-label {
	display: none;
}

/* Admin-Only In-Post Alert & Quick-Fix Bar (Only visible to logged-in Admins/Editors) */
.fi-pdf-admin-alert {
	padding: 12px 18px;
	font-size: 13px;
	border-bottom: 1px solid #cbd5e1;
}

.fi-pdf-admin-alert.is-missing {
	background: #fffbeb;
	border-bottom-color: #fde68a;
	color: #92400e;
}

.fi-pdf-admin-alert.is-linked {
	background: #ecfdf5;
	border-bottom-color: #a7f3d0;
	color: #065f46;
}

.fi-pdf-admin-alert-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.fi-pdf-admin-status-msg {
	flex: 1 1 320px;
	line-height: 1.4;
}

.fi-pdf-admin-link {
	color: #047857 !important;
	font-family: monospace;
	font-size: 12px;
	word-break: break-all;
}

.fi-pdf-admin-quick-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.fi-pdf-admin-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 6px;
	border: 1px solid rgba(15, 23, 42, 0.18);
	background: #ffffff;
	color: #0f172a !important;
	cursor: pointer;
	text-decoration: none !important;
}

.fi-pdf-admin-btn:hover {
	background: #f8fafc;
}

.fi-pdf-admin-btn-google {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #1d4ed8 !important;
}

.fi-pdf-admin-btn-save {
	background: #059669;
	border-color: #047857;
	color: #ffffff !important;
}

.fi-pdf-admin-btn-save:hover {
	background: #047857;
}

.fi-pdf-admin-input-row {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.fi-pdf-admin-input-row[hidden] {
	display: none !important;
}

.fi-pdf-admin-alert .fi-cand-list {
	margin-top: 10px;
	font-size: 12px;
}

.fi-pdf-admin-alert .fi-cand-meta,
.fi-pdf-admin-alert .fi-cand-reasons {
	opacity: 0.8;
	font-size: 11px;
}

.fi-pdf-admin-alert .fi-cand-items {
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.fi-pdf-admin-alert .fi-cand {
	padding: 6px 0;
	border-top: 1px dashed rgba(15, 23, 42, 0.15);
}

.fi-pdf-admin-alert .fi-cand a {
	word-break: break-all;
}

.fi-pdf-admin-alert .fi-cand-score {
	display: inline-block;
	min-width: 26px;
	padding: 1px 6px;
	border-radius: 10px;
	font-weight: 700;
	text-align: center;
	color: #ffffff;
	background: #94a3b8;
}

.fi-pdf-admin-alert .fi-cand-good {
	background: #059669;
}

.fi-pdf-admin-alert .fi-cand-mid {
	background: #d97706;
}

.fi-pdf-admin-alert .fi-cand .fi-pdf-admin-btn {
	margin-left: 6px;
	padding: 2px 8px;
}

.fi-pdf-admin-url-input {
	flex: 1;
	padding: 7px 11px;
	font-size: 13px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	color: #0f172a;
}

/* Hero Launch Bar */
.fi-pdf-hero-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 18px 22px;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border-bottom: 1px solid #e2e8f0;
}

.fi-pdf-hero-info {
	flex: 1 1 360px;
}

.fi-pdf-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.fi-pdf-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 3px 9px;
	border-radius: 999px;
}

.fi-pdf-badge-live {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.fi-pdf-pulse {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.fi-pdf-badge-agency {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.fi-pdf-badge-privacy {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
	cursor: help;
}

.fi-pdf-hero-title {
	margin: 0 0 4px !important;
	font-size: 18px !important;
	line-height: 1.3 !important;
	color: #0f172a !important;
	font-weight: 700 !important;
}

.fi-pdf-hero-subtitle {
	margin: 0 !important;
	font-size: 13px !important;
	color: #475569 !important;
	line-height: 1.45 !important;
}

.fi-pdf-hero-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* Buttons */
.fi-pdf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 15px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 7px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.15s ease;
	text-decoration: none !important;
	line-height: 1.2;
	white-space: nowrap;
}

.fi-pdf-btn-sm {
	padding: 6px 11px;
	font-size: 12px;
}

.fi-pdf-btn-primary {
	background: var(--fi-accent);
	color: #ffffff !important;
	box-shadow: none;
}

.fi-pdf-btn-primary:hover {
	background: var(--fi-accent-hover);
	transform: translateY(-1px);
}

.fi-pdf-btn-success {
	background: var(--fi-green);
	color: #ffffff !important;
	box-shadow: none;
}

.fi-pdf-btn-success:hover {
	background: var(--fi-green-hover);
	transform: translateY(-1px);
}

.fi-pdf-btn-outline {
	background: #ffffff;
	color: #1e293b !important;
	border-color: #cbd5e1;
}

.fi-pdf-btn-outline:hover {
	background: #f8fafc;
	border-color: #94a3b8;
}

/* Top Studio Ribbon Toolbar */
.fi-pdf-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	background: var(--fi-bg-dark);
	color: #f8fafc;
	border-bottom: 1px solid #334155;
}

.fi-pdf-tool-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.fi-pdf-format-group {
	padding-left: 8px;
	border-left: 1px solid #334155;
}

.fi-pdf-tool {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 10px;
	background: transparent;
	color: #cbd5e1;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.14s ease;
}

.fi-pdf-tool:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

.fi-pdf-tool.is-active {
	background: #2563eb;
	color: #ffffff;
	border-color: #3b82f6;
	box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
}

.fi-pdf-tool-sign {
	background: rgba(245, 158, 11, 0.16);
	color: #fbbf24;
	border-color: rgba(245, 158, 11, 0.35);
}

.fi-pdf-tool-sign:hover {
	background: rgba(245, 158, 11, 0.28);
	color: #fde68a;
}

.fi-pdf-mini-control {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #cbd5e1;
}

.fi-pdf-mini-control select {
	background: #1e293b;
	color: #f8fafc;
	border: 1px solid #475569;
	border-radius: 5px;
	padding: 4px 6px;
	font-size: 11px;
	cursor: pointer;
}

.fi-pdf-mini-control input[type="color"] {
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid #475569;
	border-radius: 4px;
	background: transparent;
	cursor: pointer;
}

.fi-pdf-comb-control input[type="range"] {
	width: 64px;
	accent-color: #3b82f6;
	cursor: pointer;
}

.fi-pdf-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	border: 1px solid #334155;
	background: #1e293b;
	color: #e2e8f0;
	cursor: pointer;
	transition: all 0.14s ease;
}

.fi-pdf-icon-btn:hover:not(:disabled) {
	background: #334155;
	color: #ffffff;
}

.fi-pdf-icon-btn:disabled {
	opacity: 0.38;
	cursor: not-allowed;
}

.fi-pdf-icon-danger:hover:not(:disabled) {
	background: #dc2626;
	border-color: #ef4444;
	color: #ffffff;
}

/* Theme Layout Integration: Close wide gap between Post and "On this page" sidebar & widen PDF column */
@media (min-width: 1080px) {
	.guide__grid {
		grid-template-columns: minmax(0, 1fr) 280px !important;
		column-gap: 20px !important;
		justify-content: normal !important;
	}
}

.toc__list a[href^="#fi-pdf-studio-"] {
	color: #0f6b5c !important;
	font-weight: 700 !important;
}

/* Main Body: Left Sidebar + Center PDF Stage */
.fi-pdf-body {
	display: flex;
	height: 780px;
	background: var(--fi-bg-stage);
	position: relative;
}

/* In inline post view, dedicate 100% of width to the PDF page; show left thumbnails sidebar in Fullscreen mode */
.fi-pdf-studio-shell:not(.is-fullscreen) .fi-pdf-sidebar-left {
	display: none;
}

.fi-pdf-sidebar-left {
	width: 175px;
	flex-shrink: 0;
	background: #f8fafc;
	border-right: 1px solid #cbd5e1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.fi-pdf-sidebar-tabs {
	display: flex;
	border-bottom: 1px solid #e2e8f0;
	background: #f1f5f9;
}

.fi-pdf-tab {
	flex: 1;
	padding: 8px 6px;
	font-size: 11px;
	font-weight: 600;
	color: #475569;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
}

.fi-pdf-tab.is-active {
	color: #0f172a;
	border-bottom-color: var(--fi-accent);
	background: #ffffff;
}

.fi-pdf-tab span {
	background: #e2e8f0;
	color: #334155;
	border-radius: 99px;
	padding: 1px 5px;
	font-size: 10px;
	margin-left: 3px;
}

.fi-pdf-tab-panel {
	display: none;
	flex: 1;
	overflow-y: auto;
	padding: 10px;
}

.fi-pdf-tab-panel.is-active {
	display: block;
}

.fi-pdf-thumb-item {
	margin-bottom: 12px;
	padding: 6px;
	border-radius: 6px;
	border: 2px solid transparent;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	cursor: pointer;
	text-align: center;
	transition: all 0.14s ease;
}

.fi-pdf-thumb-item:hover {
	border-color: #94a3b8;
}

.fi-pdf-thumb-item.is-current {
	border-color: var(--fi-blue);
	background: #eff6ff;
}

.fi-pdf-thumb-item canvas {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto 4px;
	border: 1px solid #e2e8f0;
}

.fi-pdf-thumb-label {
	font-size: 11px;
	font-weight: 600;
	color: #475569;
}

.fi-pdf-field-jump {
	display: block;
	width: 100%;
	text-align: left;
	padding: 7px 8px;
	margin-bottom: 6px;
	font-size: 11px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 5px;
	cursor: pointer;
	color: #1e293b;
}

.fi-pdf-field-jump:hover {
	border-color: var(--fi-blue);
	background: #eff6ff;
}

/* Center Stage & Pages */
.fi-pdf-stage {
	flex: 1;
	overflow: auto;
	padding: 12px 8px;
	position: relative;
	outline: none;
}

.fi-pdf-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	color: #334155;
	font-size: 14px;
	font-weight: 500;
}

.fi-pdf-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid #cbd5e1;
	border-top-color: var(--fi-accent);
	border-radius: 50%;
	animation: fi-spin 0.75s linear infinite;
	margin-bottom: 12px;
}

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

.fi-pdf-pages-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
}

.fi-pdf-page-wrapper {
	position: relative;
	background: #ffffff;
	box-shadow: 0 6px 24px rgba(15, 23, 42, 0.18);
	border-radius: 2px;
	user-select: none;
}

.fi-pdf-page-canvas {
	display: block;
}

/* Native AcroForm Layer & Custom Free-Placement Annotation Layer */
.fi-pdf-acroform-layer,
.fi-pdf-annotation-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.fi-pdf-studio-shell[data-active-tool="text"] .fi-pdf-page-wrapper,
.fi-pdf-studio-shell[data-active-tool="comb"] .fi-pdf-page-wrapper,
.fi-pdf-studio-shell[data-active-tool="date"] .fi-pdf-page-wrapper {
	cursor: text;
}

.fi-pdf-studio-shell[data-active-tool="check"] .fi-pdf-page-wrapper,
.fi-pdf-studio-shell[data-active-tool="cross"] .fi-pdf-page-wrapper,
.fi-pdf-studio-shell[data-active-tool="circle"] .fi-pdf-page-wrapper,
.fi-pdf-studio-shell[data-active-tool="highlight"] .fi-pdf-page-wrapper,
.fi-pdf-studio-shell[data-active-tool="whiteout"] .fi-pdf-page-wrapper {
	cursor: crosshair;
}

/* Native AcroForm Inputs */
.fi-acro-field {
	position: absolute;
	pointer-events: auto;
	box-sizing: border-box;
	background: rgba(219, 234, 254, 0.38);
	border: 1px dashed rgba(37, 99, 235, 0.45);
	color: #0f172a;
	font-family: "Helvetica Neue", Arial, sans-serif;
	padding: 1px 4px;
	margin: 0;
	outline: none;
	transition: background 0.12s ease, border-color 0.12s ease;
}

.fi-acro-field:hover {
	background: rgba(191, 219, 254, 0.55);
	border-color: #2563eb;
}

.fi-acro-field:focus {
	background: rgba(255, 255, 255, 0.94);
	border: 1.5px solid #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
	z-index: 10;
}

.fi-acro-checkbox {
	cursor: pointer;
	accent-color: #2563eb;
	width: 100%;
	height: 100%;
	margin: 0;
}

/* User-Placed Annotations (Text, Comb, Check, Cross, Circle, Highlight, Whiteout, Signature) */
.fi-annot-item {
	position: absolute;
	pointer-events: auto;
	box-sizing: border-box;
	border: 1.5px solid transparent;
	border-radius: 3px;
	cursor: move;
	transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.fi-annot-item:hover {
	border-color: rgba(37, 99, 235, 0.55);
}

.fi-annot-item.is-selected {
	border-color: #2563eb;
	background-color: rgba(239, 246, 255, 0.25);
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
	z-index: 30;
}

.fi-annot-text-input {
	min-width: 60px;
	min-height: 20px;
	padding: 2px 4px;
	outline: none;
	border: none;
	background: transparent;
	white-space: pre;
	line-height: 1.25;
	cursor: text;
}

.fi-annot-comb .fi-annot-text-input {
	font-family: "JetBrains Mono", "Courier New", monospace !important;
	background-image: repeating-linear-gradient(
		to right,
		rgba(37, 99, 235, 0.22) 0,
		rgba(37, 99, 235, 0.22) 1px,
		transparent 1px,
		transparent var(--fi-comb-step, 18px)
	);
}

.fi-annot-stamp {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	line-height: 1;
	user-select: none;
}

.fi-annot-highlight {
	background: rgba(250, 204, 21, 0.38);
}

.fi-annot-whiteout {
	background: #ffffff;
	border: 1px dashed #94a3b8;
}

.fi-annot-signature img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

/* Floating Mini Action Handle on Selected Item */
.fi-annot-handle-bar {
	display: none;
	position: absolute;
	top: -26px;
	right: -2px;
	background: #0f172a;
	color: #ffffff;
	border-radius: 4px;
	padding: 2px 4px;
	gap: 4px;
	align-items: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	z-index: 40;
}

.fi-annot-item.is-selected .fi-annot-handle-bar {
	display: inline-flex;
}

.fi-annot-mini-btn {
	background: transparent;
	border: none;
	color: #cbd5e1;
	font-size: 11px;
	padding: 1px 4px;
	cursor: pointer;
	line-height: 1;
}

.fi-annot-mini-btn:hover {
	color: #ffffff;
}

.fi-annot-resize-handle {
	display: none;
	position: absolute;
	right: -5px;
	bottom: -5px;
	width: 10px;
	height: 10px;
	background: #2563eb;
	border: 1.5px solid #ffffff;
	border-radius: 50%;
	cursor: nwse-resize;
}

.fi-annot-item.is-selected .fi-annot-resize-handle {
	display: block;
}

/* Bottom Status Bar */
.fi-pdf-statusbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 14px;
	background: #f8fafc;
	border-top: 1px solid #cbd5e1;
	font-size: 12px;
	color: #475569;
}

.fi-pdf-status-left,
.fi-pdf-status-center,
.fi-pdf-status-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.fi-pdf-autosave-indicator {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: #047857;
}

.fi-pdf-dot-ok {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #10b981;
}

.fi-pdf-page-btn,
.fi-pdf-zoom-btn {
	padding: 3px 9px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	border-radius: 5px;
	cursor: pointer;
	font-weight: 600;
	color: #1e293b;
}

.fi-pdf-page-btn:hover,
.fi-pdf-zoom-btn:hover {
	background: #f1f5f9;
}

/* Electronic Signature Modal */
.fi-pdf-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.fi-pdf-modal[hidden] {
	display: none !important;
}

.fi-pdf-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(2px);
}

.fi-pdf-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
	overflow: hidden;
	z-index: 1;
}

.fi-pdf-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid #e2e8f0;
}

.fi-pdf-modal-header h4,
.fi-pdf-modal-title {
	margin: 0 !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #0f172a;
}

.fi-pdf-modal-close {
	background: transparent;
	border: none;
	font-size: 22px;
	color: #64748b;
	cursor: pointer;
	line-height: 1;
}

.fi-pdf-sign-tabs {
	display: flex;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
}

.fi-pdf-sign-tab {
	flex: 1;
	padding: 10px;
	border: none;
	border-bottom: 2px solid transparent;
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
}

.fi-pdf-sign-tab.is-active {
	color: var(--fi-accent);
	border-bottom-color: var(--fi-accent);
	background: #ffffff;
}

.fi-pdf-modal-body {
	padding: 20px;
}

.fi-pdf-sign-panel {
	display: none;
}

.fi-pdf-sign-panel.is-active {
	display: block;
}

.fi-pdf-sig-canvas-wrap {
	position: relative;
	border: 2px dashed #cbd5e1;
	border-radius: 8px;
	background: #f8fafc;
	overflow: hidden;
}

.fi-pdf-sig-canvas-wrap canvas {
	display: block;
	width: 100%;
	height: 170px;
	cursor: crosshair;
	touch-action: none;
}

.fi-pdf-sig-baseline {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 34px;
	border-bottom: 1px solid #cbd5e1;
	font-size: 11px;
	color: #94a3b8;
	pointer-events: none;
}

.fi-pdf-sig-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
}

.fi-pdf-sig-colors {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #475569;
}

.fi-pdf-ink-swatch {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #ffffff;
	box-shadow: 0 0 0 1px #cbd5e1;
	cursor: pointer;
}

.fi-pdf-ink-swatch.is-active {
	box-shadow: 0 0 0 2px #2563eb;
}

.fi-pdf-sig-type-input {
	width: 100%;
	padding: 10px 12px;
	font-size: 15px;
	border: 1px solid #cbd5e1;
	border-radius: 7px;
	margin-bottom: 12px;
	box-sizing: border-box;
}

.fi-pdf-sig-font-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.fi-pdf-sig-font-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	font-size: 24px;
	color: #0f172a;
}

.fi-pdf-sig-font-option.is-selected {
	border-color: #2563eb;
	background: #eff6ff;
}

.fi-pdf-sig-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 150px;
	border: 2px dashed #cbd5e1;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	cursor: pointer;
	color: #475569;
	font-size: 13px;
}

.fi-pdf-sig-dropzone img {
	max-height: 110px;
	margin-top: 10px;
}

.fi-pdf-modal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.fi-pdf-legal-note {
	font-size: 11px;
	color: #64748b;
}

.fi-pdf-modal-actions {
	display: flex;
	gap: 8px;
}

@media (max-width: 780px) {
	.fi-pdf-sidebar-left {
		display: none;
	}
	.fi-pdf-body {
		height: 520px;
	}
	.fi-pdf-hint-text {
		display: none;
	}
	.fi-pdf-sig-font-grid {
		grid-template-columns: 1fr;
	}
}

/* "On this page" (#toc) PDF Studio Jump Link & Facts Bar Alignment */
#toc .toc__link.fi-toc-studio-link {
	font-weight: 600;
	color: #b8332a;
}

#toc .toc__link.fi-toc-studio-link:hover {
	color: #991b1b;
}

@media (min-width: 780px) {
	.facts {
		flex-wrap: nowrap;
	}
	.facts > div:last-child dd {
		white-space: nowrap;
	}
}


/* Report Outdated Form button + modal */
.fi-pdf-report-btn[disabled] {
	opacity: 0.65;
	cursor: default;
}

.fi-pdf-report-dialog {
	max-width: 460px;
}

.fi-pdf-report-intro {
	margin: 0 0 10px !important;
	font-size: 14px;
	color: #334155;
}

.fi-pdf-report-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	margin-bottom: 6px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 13px;
	color: #0f172a;
	cursor: pointer;
}

.fi-pdf-report-option:has(input:checked) {
	border-color: var(--fi-accent);
	background: #f8fafc;
}

.fi-pdf-report-note {
	width: 100%;
	box-sizing: border-box;
	margin-top: 4px;
	padding: 8px 10px;
	font-size: 13px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	resize: vertical;
}

.fi-pdf-report-trap {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.fi-pdf-report-status {
	min-height: 18px;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #047857;
}

.fi-pdf-admin-reports {
	margin-top: 10px;
	padding: 7px 10px;
	border-radius: 6px;
	background: #fef2f2;
	color: #b91c1c;
	font-size: 12px;
}
