/* Pro WP Farms — sidebar position for Theme Builder rows (the row's sidebar column is reordered or hidden). */
@media (min-width: 981px) {
	/* Divi 5 rows lay columns out with floats; the row holding a sidebar column becomes a flex row (same widths,
	   gutter kept by space-between) so the column can be reordered with `order`. */
	body.pwf-sb-set:is(.pwf-sb-right, .pwf-sb-left) .et_pb_row:has(> .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar)) { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; }
	body.pwf-sb-set:is(.pwf-sb-right, .pwf-sb-left) .et_pb_row:has(> .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar)) > .et_pb_column { float: none; margin-inline: 0; flex: 0 0 auto; }
	body.pwf-sb-set:is(.pwf-sb-right, .pwf-sb-left) .et_pb_row:has(> .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar))::after { content: none; }
	/* The sidebar column = a column holding the PWF sidebar, a Divi sidebar/widget area or the site's blog sidebar class. */
	html[dir="rtl"] body.pwf-sb-set.pwf-sb-right .et_pb_row > .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar),
	html:not([dir="rtl"]) body.pwf-sb-set.pwf-sb-left .et_pb_row > .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar) { order: -1; }
	html[dir="rtl"] body.pwf-sb-set.pwf-sb-left .et_pb_row > .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar),
	html:not([dir="rtl"]) body.pwf-sb-set.pwf-sb-right .et_pb_row > .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar) { order: 99; }
	/* Sticky off: the column scrolls with the page. */
	body.pwf-sticky-off .et_pb_column:is(.pwf-sticky-aside, .mf-blog-sidebar, .pwf-aside-host), body.pwf-sticky-off .pwf-aside { position: static !important; }
}
/* None: hide the sidebar column on every device; the content column takes the row. */
body.pwf-sb-none .et_pb_row > .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar) { display: none !important; }
body.pwf-sb-none .et_pb_row:has(> .et_pb_column:is(:has(.pwf-aside, .et_pb_widget_area, .et_pb_sidebar), .mf-blog-sidebar)) > .et_pb_column { flex: 1 1 100%; inline-size: 100%; max-inline-size: 100%; }
body.pwf-sb-none.et_full_width_page #sidebar { display: none; }
@media (min-width: 981px) {
	/* Sticky / smart sticky host (top is set by pwf-sidebar-sticky.js). */
	/* Divi sets overflow-y:hidden on #page-container, which disables sticky; clip keeps the horizontal guard. */
	body:is(.pwf-sticky-sticky, .pwf-sticky-smart):has(.pwf-sb-sticky) #page-container { overflow-x: clip !important; overflow-y: visible !important; }
	body:is(.pwf-sticky-sticky, .pwf-sticky-smart) .pwf-sb-sticky { position: sticky; align-self: flex-start; z-index: 1; }
	body:is(.pwf-sticky-sticky, .pwf-sticky-smart) .pwf-aside.is-hosted { position: static; }
}
