/**
 * Re-apply gap to other element.
 * Apply gap to .elementor-element-populated instead of .elementor-widget-wrap
 */
.elementor-container {
	&.elementor-container { // Strong selector to override style.
		 > .elementor-column > .elementor-element-populated {
			> .elementor-widget-wrap {
				padding: 0;
			}
		}
	}

	&.elementor-column-gap-narrow > .elementor-column > .elementor-element-populated {
		padding: 0 5px;
	}

	&.elementor-column-gap-default > .elementor-column > .elementor-element-populated {
		padding: 0 10px;
	}

	&.elementor-column-gap-extended > .elementor-column > .elementor-element-populated {
		padding: 0 15px;
	}

	&.elementor-column-gap-wide > .elementor-column > .elementor-element-populated {
		padding: 0 20px;
	}

	&.elementor-column-gap-wider > .elementor-column > .elementor-element-populated {
		padding: 0 30px;
	}
}

/* Remove Gap Beside Of Section */
/*
.elementor-row {
	flex-wrap: wrap;
}

.elementor-section-gap-beside-no {
	> .elementor-container {
		> .elementor-row {
			flex-grow: 1;
		}
	}

	> .elementor-column-gap-narrow {
		> .elementor-row {
			margin-left: -5px;
			margin-right: -5px;
		}
	}

	> .elementor-column-gap-default {
		> .elementor-row {
			margin-left: -10px;
			margin-right: -10px;
		}
	}

	> .elementor-column-gap-extended {
		> .elementor-row {
			margin-left: -15px;
			margin-right: -15px;
		}
	}

	> .elementor-column-gap-wide {
		> .elementor-row {
			margin-left: -20px;
			margin-right: -20px;
		}
	}

	> .elementor-column-gap-wider {
		> .elementor-row {
			margin-left: -30px;
			margin-right: -30px;
		}
	}
}*/

.elementor-section {
	&.elementor-section-content-align-left {
		> .elementor-container {
			margin-left: 0;
			margin-right: 0;
		}
	}

	&.elementor-section-content-align-right {
		@extend %clearfix;

		> .elementor-container {
			margin-left: 0;
			margin-right: 0;
			float: right;
			width: 100%;
		}
	}

	.elementor-widget:not(:last-child) {
		margin-bottom: 0;
	}

	&.elementor-inner-section {
		margin-left: 0;
		margin-right: 0;
	}
}

@include media-breakpoint-up(xl) {
	.elementor-section.elementor-section-extended > .elementor-container {
		max-width: 1310px !important;
	}

	.elementor-section.elementor-section-broad > .elementor-container {
		max-width: 1370px !important;
	}

	.elementor-section.elementor-section-large > .elementor-container {
		max-width: 1440px !important;
	}

	.elementor-section.elementor-section-wide > .elementor-container {
		max-width: 1650px !important;
	}

	.elementor-section.elementor-section-wider > .elementor-container {
		max-width: 1750px !important;
	}

	.elementor-section.elementor-section-full-wide > .elementor-container {
		max-width: 1850px !important;
	}

	.elementor-section.elementor-top-section {
		&.elementor-section-boxed {
			> .elementor-container {
				max-width: 1270px; // Do not apply !important make custom width not working.
				padding-left: 35px;
				padding-right: 35px;
			}
		}

		// Custom Section Layout ( Content Width )
		&.elementor-section-full-wide {
			> .elementor-container {
				max-width: 1920px !important;
				padding-left: 35px;
				padding-right: 35px;

				&.elementor-column-gap-default {
					padding-left: 40px;
					padding-right: 40px;
				}

				&.elementor-column-gap-narrow {
					padding-left: 45px;
					padding-right: 45px;
				}

				&.elementor-column-gap-wide {
					padding-left: 30px;
					padding-right: 30px;
				}

				&.elementor-column-gap-wider {
					padding-left: 20px;
					padding-right: 20px;
				}
			}
		}

		&.elementor-section-wider {
			> .elementor-container {
				max-width: 1820px !important;
				padding-left: 35px;
				padding-right: 35px;

				&.elementor-column-gap-default {
					padding-left: 40px;
					padding-right: 40px;
				}

				&.elementor-column-gap-narrow {
					padding-left: 45px;
					padding-right: 45px;
				}

				&.elementor-column-gap-wide {
					padding-left: 30px;
					padding-right: 30px;
				}

				&.elementor-column-gap-wider {
					padding-left: 20px;
					padding-right: 20px;
				}
			}
		}

		&.elementor-section-wide {
			> .elementor-container {
				max-width: 1720px !important;
				padding-left: 35px;
				padding-right: 35px;

				&.elementor-column-gap-default {
					padding-left: 40px;
					padding-right: 40px;
				}

				&.elementor-column-gap-narrow {
					padding-left: 45px;
					padding-right: 45px;
				}

				&.elementor-column-gap-wide {
					padding-left: 30px;
					padding-right: 30px;
				}

				&.elementor-column-gap-wider {
					padding-left: 20px;
					padding-right: 20px;
				}
			}
		}

		&.elementor-section-large {
			> .elementor-container {
				max-width: 1510px !important;
				padding-left: 35px;
				padding-right: 35px;

				&.elementor-column-gap-default {
					padding-left: 40px;
					padding-right: 40px;
				}

				&.elementor-column-gap-narrow {
					padding-left: 45px;
					padding-right: 45px;
				}

				&.elementor-column-gap-wide {
					padding-left: 30px;
					padding-right: 30px;
				}

				&.elementor-column-gap-wider {
					padding-left: 20px;
					padding-right: 20px;
				}
			}
		}

		&.elementor-section-broad {
			> .elementor-container {
				max-width: 1440px !important;
				padding-left: 35px;
				padding-right: 35px;

				&.elementor-column-gap-default {
					padding-left: 40px;
					padding-right: 40px;
				}

				&.elementor-column-gap-narrow {
					padding-left: 45px;
					padding-right: 45px;
				}

				&.elementor-column-gap-wide {
					padding-left: 30px;
					padding-right: 30px;
				}

				&.elementor-column-gap-wider {
					padding-left: 20px;
					padding-right: 20px;
				}
			}
		}

		&.elementor-section-extended {
			> .elementor-container {
				max-width: 1380px !important;
				padding-left: 35px;
				padding-right: 35px;

				&.elementor-column-gap-default {
					padding-left: 40px;
					padding-right: 40px;
				}

				&.elementor-column-gap-narrow {
					padding-left: 45px;
					padding-right: 45px;
				}

				&.elementor-column-gap-wide {
					padding-left: 30px;
					padding-right: 30px;
				}

				&.elementor-column-gap-wider {
					padding-left: 20px;
					padding-right: 20px;
				}
			}
		}
	}
}
