/**
 * Takeoff / Renderings form (Gravity Forms #1) layout.
 * Loaded only when the form is on the page (see inc/takeoff-form.php).
 *
 * Width + centering are handled globally in css/gravity-forms.css.
 *
 * Selector note: these rules are scoped through `#gform_wrapper_1` on purpose.
 * Gravity Forms enqueues its foundation/orbital stylesheets AFTER the theme's,
 * so a plain class selector loses every specificity tie on source order — most
 * relevantly `.gform-theme--foundation .gfield_list_group { display: flex }`.
 * The ID carries the rules over that without needing `!important`.
 *
 * (An earlier version of this file targeted `.gfield_list_10`, a class Gravity
 * Forms never renders — only `.gfield_list_10_cellN` on the individual cells —
 * so none of it applied.)
 */

/* -- "Profile Requested" list --------------------------------------------
   The Model dropdown carries full WooCommerce product titles, up to 80
   characters ("UltraShield Naturale Magellan Solid with Groove Composite
   Decking Board – US01"). A native <select> clips its text instead of
   ellipsising it, so across four columns every option was cut mid-phrase —
   three different placeholders all rendered as "Select Product", and real
   model names were unreadable.

   Each profile therefore stacks into full-width labelled fields at every
   viewport, not just on mobile. Gravity Forms already emits the column name on
   each cell as `data-label`, so the header row can be retired. */

#gform_wrapper_1 .gfield_list_header {
	display: none;
}

#gform_wrapper_1 .gfield_list_group {
	display: block;
	margin-bottom: var(--space-sm, 1rem);
	padding: var(--space-sm, 1rem);
	background-color: var(--color-bg, #f4f4f2);
	border: 1px solid var(--color-border, #e0e0e0);
	border-radius: var(--radius-md, 2px);
}

#gform_wrapper_1 .gfield_list_group:last-child {
	margin-bottom: 0;
}

#gform_wrapper_1 .gfield_list_cell {
	display: block;
	width: 100%;
	max-width: none;
	min-width: 0;
	margin-bottom: 0.85rem;
	padding: 0;
}

#gform_wrapper_1 .gfield_list_cell[data-label]::before {
	content: attr(data-label);
	display: block;
	margin-bottom: 0.3rem;
	font-family: var(--font-primary);
	font-size: var(--fs-meta);
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-light);
}

#gform_wrapper_1 .gfield_list_cell select,
#gform_wrapper_1 .gfield_list_cell input[type="text"] {
	width: 100%;
	min-width: 0;
}

/* Row add/remove controls read as an action row, not a squeezed table cell. */
#gform_wrapper_1 .gfield_list_icons {
	display: flex;
	gap: var(--space-xs, 0.5rem);
	align-items: center;
	width: auto;
	margin-bottom: 0;
	padding-top: 0.25rem;
}

/* js/takeoff-form.js hides the Trim column unless a chosen product type has
   trims (siding, decking, deck tiles). It toggles this class rather than an
   inline style so the rule sits in the same cascade as the display rules above;
   keep it last so it wins the tie. */
#gform_wrapper_1 .ntw-takeoff-hidden {
	display: none;
}
