//
// Grid
//
.qazana {
  &:after {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;

    @media (min-width: $screen-lg-min) {
      content: 'desktop';
    }

    @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
      content: 'tablet';
    }

    @media (max-width: $screen-sm-max) {
      content: 'mobile';
    }
  }
}

// Section
.qazana-section {
	position: relative;

	// Container
	.qazana-container {
		position: relative;
		display: flex;
		margin-right: auto;
		margin-left: auto;
	}

	// Max-width of container depending on section settings
	&.qazana-section-boxed {
		& > .qazana-container {
			max-width: 1140px;
		}
	}

	// Stretched section settings
	&.qazana-section-stretched {
		position: relative;
		width: 100%;
	}

	// In section min-height / fit to screen mode
	&.qazana-section-items- {
		&top {
			> .qazana-container {
				align-items: flex-start;
			}
		}

		&middle {
			> .qazana-container {
				align-items: center;
			}
		}

		&bottom {
			> .qazana-container {
				align-items: flex-end;
			}
		}
	}

	@media (min-width: $screen-md-min) {

		// Section Full Height (note: don't be smart - min-height does not work well with the content position)
		&.qazana-section-height-full {
			height: 100vh;

			> .qazana-container {
				height: 100%;
			}
		}
	}
}

// In columns stretch mode

.qazana-container {
	> .qazana-row {
		> .qazana-column {
			> .qazana-column-wrap {
				.qazana-section-content-top > & {
					align-items: flex-start;
				}

				.qazana-section-content-middle > & {
					align-items: center;
				}

				.qazana-section-content-bottom > & {
					align-items: flex-end;
				}
			}
		}
	}
}

// Row
.qazana-row {
	display: flex;
	width: 100%;

  @media (max-width: $screen-md-max) {
    flex-wrap: wrap;
  }
}

@media (max-width: 1024px) {
  .qazana-row {
    flex-wrap: wrap;
  }
}


// Widget
.qazana-column-wrap {
	display: flex;
	width: 100%;
}

.qazana-widget-wrap {
	width: 100%;
    z-index: $ground-layer-overlay;
}

// Columns
.qazana-column {
	position: relative;
	display: flex;
	min-height: 1px;
}
@mixin qazana-grid-classes {
	 @each $sizeKey, $size in $column-sizes{
		&.qazana-col-#{$sizeKey},
		&[data-col="#{$sizeKey}"] {
			width: $size;
		}
	}
}
@mixin qazana-responsive($breakpoint-name) {
	 @each $size-name, $size in $column-sizes{
		&.qazana-#{$breakpoint-name}-#{$size-name} {
			width: $size;
		}
	}

}

// Columns Gap
.qazana-row {
	> .qazana-column {
		> .qazana-element-populated {
			.qazana-column-gap-narrow > & {
				padding: 5px;
			}

			.qazana-column-gap-default > & {
				padding: 10px;
			}

			.qazana-column-gap-extended > & {
				padding: 15px;
			}

			.qazana-column-gap-wide > & {
				padding: 20px;
			}

			.qazana-column-gap-wider > & {
				padding: 30px;
			}
		}
	}
}

// Columns Gap for Inner section
.qazana-inner-section {
	.qazana-column-gap-no {
		.qazana-element-populated {
			padding: 0;
		}
	}
}

.qazana-column-gap-no .qazana-widget {
	margin-bottom: 0px;
}

// Responsive Grid
@media (min-width: $screen-md-min) {
	.qazana-column {
		@include qazana-grid-classes;
	}
}

.qazana-column {
	@media (max-width: $screen-xs-max) {
		 @include qazana-responsive(xs);
	}
	@media (max-width: $screen-sm-max) {
		 @include qazana-responsive(sm);
	}
	@media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
		 @include qazana-responsive(md);
	}
}
@media (max-width: $screen-sm-max) {
	.qazana-column {
		width: 100%;
	}

	.qazana-reverse-mobile > .qazana-container > .qazana-row {
		flex-direction: column-reverse;
	}
}

#grid {
	position: fixed;
	top: -20px;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999;
	display: none;
	overflow-y: hidden;
	pointer-events: none;

	.vc_col-lg-1 {
		padding: 0.5rem 40px;
		min-height: 0.125rem;
		height: 2000px;
	}

	.shadow {
		width: 100%;
		height: 100%;
		background: rgba(0,0,0,0.05);
	}
}
