<?php if ( forminator_array_value_exists( $properties, 'fields-style' ) && forminator_array_value_exists( $properties, 'spacing' ) ) { ?>

	<?php if ( $properties['fields-style'] === "custom" && '' !== $properties['spacing'] ) { ?>

		#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-row:not(:last-child) {
			margin-bottom: <?php echo $properties['spacing'] ?>px;
		}

		#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-col:not(:last-child) {
			margin-bottom: <?php echo $properties['spacing'] ?>px;
		}

		@media (min-width: 783px) {

			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-row {
				display: flex;
				flex-wrap: wrap;
				margin-right: -<?php echo ($properties['spacing'] / 2) ?>px;
				margin-left: -<?php echo ($properties['spacing'] / 2) ?>px;
			}

			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-row:not(:last-child) {
				margin-bottom: <?php echo $properties['spacing'] ?>px;
			}

			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-col {
				min-width: 0;
				flex: 1;
				padding: 0 <?php echo ($properties['spacing'] / 2) ?>px;
			}

			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-col:not(:last-child) {
				margin-bottom: 0;
			}

			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-col-3 .forminator-row[data-multiple="true"],
			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-col-4 .forminator-row[data-multiple="true"] {
				display: block;
			}

			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-col-3 .forminator-row[data-multiple="true"] .forminator-col:not(:last-child) {
				margin-bottom: <?php echo $properties['spacing'] ?>px;
			}

			#forminator-module-<?php echo $properties['form_id'] ?>[data-grid="custom"] .forminator-col-4 .forminator-row[data-multiple="true"] .forminator-col:not(:last-child) {
				margin-bottom: <?php echo $properties['spacing'] ?>px;
			}
		}

	<?php } ?>

<?php } ?>
