/*
 * Single Case — botão "Voltar para Cases" flutuante no mobile.
 * Editor: grupo (linha) com classe back-to-case envolvendo wp-block-buttons.
 * O sticky nativo do editor não cobre FAB; fixed no canto inferior direito.
 */
@media (max-width: 781px), ((hover: none) and (pointer: coarse)) {
	body.single-case .wp-block-group.back-to-case,
	body.single-case .wp-block-group.back-to-case.is-position-sticky {
		position: fixed !important;
		top: auto !important;
		left: auto !important;
		right: max(1rem, env(safe-area-inset-right, 0px)) !important;
		bottom: max(2rem, env(safe-area-inset-bottom, 0px)) !important;
		z-index: 90;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.2s ease, visibility 0.2s ease;
	}

	body.single-case .wp-block-group.back-to-case.back-to-case--visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	body.single-case .wp-block-group.back-to-case .wp-block-buttons {
		justify-content: flex-end !important;
		width: auto !important;
		margin: 0 !important;
	}
}

@media (max-width: 781px) and (prefers-reduced-motion: reduce),
       ((hover: none) and (pointer: coarse)) and (prefers-reduced-motion: reduce) {
	body.single-case .wp-block-group.back-to-case {
		transition: none;
	}
}
