/**
 * Shared tool output actions + print stylesheet.
 */

.fsp-tool-out {
	margin-top: 14px;
}

.fsp-tool-out__actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.fsp-tool-out__btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
	font-size: 12px;
	font-weight: 800;
	color: #1e3a5f;
	background: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.fsp-tool-out__btn:hover {
	border-color: #1e3a5f;
	background: #f8fafc;
}

.fsp-tool-out__btn--primary {
	grid-column: 1 / -1;
	border-color: #1e3a5f;
	background: #1e3a5f;
	color: #fff;
}

.fsp-tool-out__btn--primary:hover {
	background: #2d4a6f;
	border-color: #2d4a6f;
	color: #fff;
}

.fsp-tool-out__btn--accent {
	grid-column: 1 / -1;
	border-color: #334155;
	background: #334155;
	color: #fff;
}

.fsp-tool-out__btn--accent:hover {
	background: #1e3a5f;
	border-color: #1e3a5f;
	color: #fff;
}

.fsp-tool-out__hint {
	margin: 8px 0 0;
	font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
	font-size: 11px;
	line-height: 1.5;
	color: #94a3b8;
}

.fsp-tool-out__toast {
	margin: 8px 0 0;
	padding: 8px 10px;
	border-radius: 8px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
	font-size: 12px;
	font-weight: 700;
	color: #1e3a5f;
	line-height: 1.5;
}

.fsp-tool-out__toast a {
	color: #1e40af;
	font-weight: 800;
}

.fsp-tool-print-root {
	display: none;
}

@media (min-width: 720px) {
	.fsp-tool-out__actions {
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	}

	.fsp-tool-out__btn--primary,
	.fsp-tool-out__btn--accent {
		grid-column: auto;
	}
}

@media print {
	body.fsp-tool-printing * {
		visibility: hidden !important;
	}

	body.fsp-tool-printing .fsp-tool-print-root,
	body.fsp-tool-printing .fsp-tool-print-root * {
		visibility: visible !important;
	}

	body.fsp-tool-printing .fsp-tool-print-root {
		display: block !important;
		position: absolute;
		inset: 0;
		padding: 24px;
		background: #fff;
		color: #0f172a;
	}

	.fsp-tool-print-sheet header {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		margin-bottom: 16px;
		padding-bottom: 12px;
		border-bottom: 1px solid #cbd5e1;
		font-family: 'Vazirmatn', Tahoma, sans-serif;
		font-size: 14px;
	}

	.fsp-tool-print-sheet pre {
		white-space: pre-wrap;
		word-break: break-word;
		font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
		font-size: 13px;
		line-height: 1.7;
		margin: 0;
	}

	.fsp-tool-print-sheet footer {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		margin-top: 20px;
		padding-top: 12px;
		border-top: 1px solid #e2e8f0;
		font-family: 'Vazirmatn', Tahoma, sans-serif;
		font-size: 11px;
		color: #64748b;
	}
}
