@use "./variables" as variables;

@mixin shapes() {
	&-sharp {
		--ehp-shapes-border-radius-sharp: #{variables.$corners-shape-sharp};

		border-radius: var(--ehp-shapes-border-radius-sharp);
	}

	&-rounded {
		--ehp-shapes-border-radius-rounded: #{variables.$corners-shape-rounded};

		border-radius: var(--ehp-shapes-border-radius-rounded);
	}

	&-round {
		--ehp-shapes-border-radius-round: #{variables.$corners-shape-round};

		border-radius: var(--ehp-shapes-border-radius-round);
	}

	&-default {
		--ehp-shapes-border-radius-default: #{variables.$corners-shape-default};

		border-radius: var(--ehp-shapes-border-radius-default);
	}

	&-oval {
		--ehp-shapes-border-radius-oval: #{variables.$corners-shape-oval};

		border-radius: var(--ehp-shapes-border-radius-oval);
	}

	&-custom {
		border-top-left-radius: var(--ehp-shapes-border-radius-block-end);
		border-top-right-radius: var(--ehp-shapes-border-radius-block-start);
		border-bottom-right-radius: var(--ehp-shapes-border-radius-inline-end);
		border-bottom-left-radius: var(--ehp-shapes-border-radius-inline-start);
	}
}

.has-shape,
.elementor img.has-shape {
	@include shapes();

	&-md {
		@media screen and (max-width: variables.$screen-tablet-max) {
			@include shapes();
		}
	}

	&-sm {
		@media screen and (max-width: variables.$screen-mobile-max) {
			@include shapes();
		}
	}

	&.shape-type {

		&-box {
			--ehp-shapes-border-shape-rounded: #{variables.$corners-box-shape-rounded};
		}

		&-image {
			--ehp-shapes-border-radius-rounded: #{variables.$corners-image-shape-rounded};
			--ehp-shapes-border-radius-round: #{variables.$corners-image-shape-round};
		}

		&-logo {
			--ehp-shapes-border-radius-round: #{variables.$corners-logo-shape-round};
		}
	}
}
