/* Pro WP Farms — content tables (brand vars; light/dark via light-dark()). */
/* Content containers: tables are styled here whether or not the server-side enhancement ran (it adds
   the wrapper for horizontal scroll, scope, data-label and header rows as progressive enhancement). */
:is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description, .pwf-ctable-wrap) {
	/* Settings (inline :root --pwf-ct-*) > Divi global colours > brand defaults. */
	--pwf-t-head-bg: var(--pwf-ct-head-bg, light-dark(#0b5d3b, #1d6b52));
	--pwf-t-head-fg: var(--pwf-ct-head-fg, #fff);
	--pwf-t-zebra: var(--pwf-ct-zebra, light-dark(#f4f8f5, rgba(255, 255, 255, .04)));
	--pwf-t-border: var(--pwf-ct-border, light-dark(#e3e8e5, rgba(255, 255, 255, .12)));
	--pwf-t-hover: var(--pwf-ct-hover, light-dark(#fbf3dc, rgba(212, 166, 52, .12)));
	--pwf-t-bg: light-dark(#fff, #16201b);
	--pwf-t-ink: light-dark(var(--gcid-body-color, #1d2a23), #e7ece9);
	--pwf-t-radius: 16px;
}
.pwf-ctable-wrap {
	position: relative; max-inline-size: 100%; margin-block: 24px 32px; overflow-x: auto; overscroll-behavior-inline: contain;
	border: 1px solid var(--pwf-t-border); border-radius: var(--pwf-t-radius); background: var(--pwf-t-bg);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
	scrollbar-width: thin; scrollbar-color: var(--pwf-t-border) transparent;
	/* Scroll shadow cue at the inline edges while there is more to scroll. */
	background-image:
		linear-gradient(to right, var(--pwf-t-bg), var(--pwf-t-bg)), linear-gradient(to right, var(--pwf-t-bg), var(--pwf-t-bg)),
		radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .16), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .16), transparent);
	background-position: left center, right center, left center, right center;
	background-repeat: no-repeat; background-size: 24px 100%, 24px 100%, 12px 100%, 12px 100%;
	background-attachment: local, local, scroll, scroll;
}
.pwf-ctable-wrap:focus-visible { outline: 3px solid #d4a634; outline-offset: 2px; }
/* Un-wrapped table (enhancement did not run): the table itself carries the card frame. */
:is(:is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) {
	inline-size: 100%; margin-block: 24px 32px; border: 1px solid var(--pwf-t-border); border-radius: var(--pwf-t-radius); overflow: hidden;
	border-collapse: separate; border-spacing: 0; background: var(--pwf-t-bg); color: var(--pwf-t-ink); font-size: max(.9375em, .875rem); line-height: 1.6;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
}
.pwf-ctable-wrap table.pwf-ctable {
	inline-size: 100%; min-inline-size: 0; margin: 0; border: 0; border-collapse: separate; border-spacing: 0;
	color: var(--pwf-t-ink); font-size: max(.9375em, .875rem); line-height: 1.6; text-align: start; background: transparent;
}
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) caption { caption-side: top; padding: 12px 16px; font-weight: 800; text-align: start; color: var(--pwf-t-ink); }
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) :is(thead th, tr:first-child > th) {
	position: sticky; inset-block-start: 0; z-index: 1; padding: 12px 16px; background: var(--pwf-t-head-bg); color: var(--pwf-t-head-fg);
	font-weight: 700; text-align: start; vertical-align: bottom; white-space: normal; border: 0;
}
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) :is(thead th, tr:first-child > th) * { color: inherit; }
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) :is(td, tbody th:not(tr:first-child > th)) {
	padding: 12px 16px; border: 0; border-block-start: 1px solid var(--pwf-t-border); text-align: start; vertical-align: top; background: transparent;
}
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) tbody tr:first-child > * { border-block-start: 0; }
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) tbody tr:nth-child(even) > td { background: var(--pwf-t-zebra); }
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) tbody tr:hover > td { background: var(--pwf-t-hover); }
.pwf-ctable tbody th { font-weight: 700; }
.pwf-ctable .is-num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: end; }
:is(table.pwf-ctable, :is(.et_pb_text_inner, .et_pb_post_content, .entry-content, .wp-block-table, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) table:not(.shop_table, .variations, .woocommerce-product-attributes, .pwf-cmp__table, .form-table, .group_table, .pwf-ctable)) :is(td, th) > p { margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) { .pwf-ctable tbody tr > * { transition: background-color .15s; } }

/* Phones: stacked cards (setting), one card per row with the header label before each value. */
@media (max-width: 599px) {
	.pwf-ctable--stack { overflow: visible; border: 0; box-shadow: none; background: none; }
	.pwf-ctable--stack table.pwf-ctable { min-inline-size: 0; }
	.pwf-ctable--stack .pwf-ctable thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
	.pwf-ctable--stack .pwf-ctable tbody, .pwf-ctable--stack .pwf-ctable tr { display: block; }
	.pwf-ctable--stack .pwf-ctable tr { margin-block-end: 12px; border: 1px solid var(--pwf-t-border); border-radius: 12px; overflow: hidden; background: var(--pwf-t-bg); }
	.pwf-ctable--stack .pwf-ctable tr > * {
		display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 12px; text-align: start;
		background: transparent !important; border-block-start: 1px solid var(--pwf-t-border);
	}
	.pwf-ctable--stack .pwf-ctable tr > :first-child { border-block-start: 0; background: var(--pwf-t-zebra) !important; font-weight: 700; }
	.pwf-ctable--stack .pwf-ctable [data-label]::before { content: attr(data-label); font-weight: 700; color: var(--pwf-t-ink); opacity: .8; }
	.pwf-ctable--stack .pwf-ctable .is-num { text-align: start; white-space: normal; }
}

/* 1.5.24 responsive: 3+ columns keep a readable minimum width (the box scrolls), 2 columns fit the column;
   long Arabic words wrap; tall tables scroll inside the box on tablet/desktop so the sticky header stays visible. */
.pwf-ctable-wrap table.pwf-ctable:has(tr > :nth-child(3)) { min-inline-size: 480px; }
.pwf-ctable-wrap table.pwf-ctable:has(tr > :nth-child(5)) { min-inline-size: 640px; }
:is(table.pwf-ctable, .pwf-ctable-wrap) :is(td, th) { overflow-wrap: break-word; word-break: normal; hyphens: auto; }
@media (max-width: 599px) {
	.pwf-ctable-wrap table.pwf-ctable :is(td, th) { padding: 10px 12px; }
}
@media (min-width: 600px) {
	.pwf-ctable--scroll, .pwf-ctable--stack { max-block-size: min(80vh, 760px); overflow: auto; }
}
@media (max-width: 599px) {
	.pwf-ctable--stack table.pwf-ctable:is(*, :has(tr > :nth-child(3))) { min-inline-size: 0; }
}
