/* FONTS */

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans-Variable.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
/*  colors  */
  --red-hex: #cc1e1c;
	--red-rgb: 204,30,28;
  --gray-light-hex: #b5afb5;
	--gray-light-rgb: 181,175,181;
  --gray-medium-hex: #655f65;
	--gray-medium-rgb: 101,95,101;
  --gray-dark-hex: #3f373f;
	--gray-dark-rgb: 63,55,63;
	--gray-border-hex: #a7a7a7;
	--gray-border-rgb: 167,167,167;
  
/*  fonts  */
  --open-sans: "Open Sans", Helvetica, Arial, sans-serif;
  --roboto: "Roboto", Helvetica, sans-serif;
  
/*  styles  */
	--line-height: 1.25;
	--transition: all .3s;
	
	--editor-width: min(920px, calc(100vw - 40px));
	--editor-height: 430px;
	--editor-margin: 20px 0;
	--editor-padding: 20px;
	--editor-after-width: min(1160px, calc(100vw - 110px));
	--editor-after-height: 80%;
	
	--stage-container-width: calc(var(--editor-height) - var(--editor-padding) * 2);
	--stage-container-height: var(--stage-container-width);
	
	--stage-download-size: 1080px;
	
	--controls-gap: calc(var(--editor-padding) * 1.5);
	
  --design-background-color: var(--gray-medium-hex);
  --design-checked-background-color: var(--red-hex);
  --design-font-size: 1.125rem;
  --design-color: #fff;
  
  font-family: var(--open-sans);
  font-size: 16px;
  line-height: var(--line-height);
	word-wrap: break-word;
	color: var(--gray-dark-hex);
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
	flex-direction: column;
	align-items: center;
  position: relative;
  margin: 0;
	overflow: hidden;
}

body *,
body *::before,
body *::after {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--roboto);
	overflow-wrap: break-word;
  margin: 0;
	color: var(--gray-dark-hex);
}

h2 {
  font-size: 1.875rem;
	font-weight: 400;
}

input {
  display: none;
}

label {
	cursor: pointer;
}

a {
	color: var(--red-hex);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

button,
.button {
	-webkit-appearance: none;
  -moz-appearance: none;
	background-color: unset;
	border: 0px;
	cursor: pointer;
	font-family: var(--open-sans);
  line-height: var(--line-height);
}

button[disabled] {
	cursor: not-allowed;
}

body > div {
/* 	position: absolute; */
	top: 0;
	left: 0;
}

#editor {
	width: var(--editor-width);
  height: var(--editor-height);
  display: flex;
  align-items: center;
  justify-content: center;
	gap: var(--editor-padding);
	position: relative;
	margin: var(--editor-margin);
	padding: var(--editor-padding);
	background-color: #fff;
/* 	border: 1px solid var(--gray-border-hex); */
	box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

#editor::after {
	content: '';
	width: var(--editor-after-width);
	height: var(--editor-after-height);
	position: absolute;
	top: calc((var(--editor-after-height) - 100%) / -2);
	left: calc((var(--editor-after-width) - 100%) / -2);
	background-color: var(--red-hex);
	z-index: -1;
}

#stage-container {
	flex-shrink: 0;
  width: var(--stage-container-width);
  height: var(--stage-container-height);
  position: relative;
}

#stage {
  transform: scale(var(--stage-scale));
  left: calc((var(--stage-download-size) - var(--stage-container-width)) / -2);
  top: calc((var(--stage-download-size) - var(--stage-container-height)) / -2);
/* 	left: -280px;
  top: -280px; */
	position: relative;
}

#stage.design_3 #stage-design::after,
#stage.design_4 #stage-design::after {
	content: '';
	width: 100%;
	height: 100%;
	position: absolute;
	border: 5px dashed rgba(255,255,255,.5);
	border-radius: 100%;
	pointer-events: none;
}

#stage-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--gray-light-hex);
	background-size: contain;
}

label#placeholder-upload-input {
	width: 100%;
	height: 100%;
	position: absolute;
  top: 0;
  left: 0;
}

#loading {
  width: 100%;
  height: 100%;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 30px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: rgba(255,255,255,0.9);
}

#loading-animation {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

#loading-animation div {
  animation: loading-animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  transform-origin: 40px 40px;
}
#loading-animation div:after {
  content: " ";
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-hex);
  margin: -4px 0 0 -4px;
}
#loading-animation div:nth-child(1) {
  animation-delay: -0.036s;
}
#loading-animation div:nth-child(1):after {
  top: 63px;
  left: 63px;
}
#loading-animation div:nth-child(2) {
  animation-delay: -0.072s;
}
#loading-animation div:nth-child(2):after {
  top: 68px;
  left: 56px;
}
#loading-animation div:nth-child(3) {
  animation-delay: -0.108s;
}
#loading-animation div:nth-child(3):after {
  top: 71px;
  left: 48px;
}
#loading-animation div:nth-child(4) {
  animation-delay: -0.144s;
}
#loading-animation div:nth-child(4):after {
  top: 72px;
  left: 40px;
}
#loading-animation div:nth-child(5) {
  animation-delay: -0.18s;
}
#loading-animation div:nth-child(5):after {
  top: 71px;
  left: 32px;
}
#loading-animation div:nth-child(6) {
  animation-delay: -0.216s;
}
#loading-animation div:nth-child(6):after {
  top: 68px;
  left: 24px;
}
#loading-animation div:nth-child(7) {
  animation-delay: -0.252s;
}
#loading-animation div:nth-child(7):after {
  top: 63px;
  left: 17px;
}
#loading-animation div:nth-child(8) {
  animation-delay: -0.288s;
}
#loading-animation div:nth-child(8):after {
  top: 56px;
  left: 12px;
}
@keyframes loading-animation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#loading-caption {
	padding: 0 30px;
	font-size: 1.125rem;
	text-align: center;
	text-shadow: 0 0 5px #fff;
}

#controls {
  width: 100%;
  display: flex;
  flex-direction: column;
	justify-content: center;
  gap: var(--controls-gap);
	user-select: none;
}

.classic-button {
	width: fit-content;
	min-width: 170px;
	padding: .375em 1.25em;
	background-color: var(--red-hex);
	font-size: 1rem;
	color: #fff;
	transition: var(--transition);
}

.classic-button[disabled],
.classic-button[disabled]:hover {
	opacity: .5;
	transition: var(--transition);
}

.classic-button:not([disabled]):hover {
	background-color: var(--gray-medium-hex);
}

#instruction {
	display: flex;
	flex-direction: column;
	gap: calc(var(--editor-padding) * .75);
}

.step {
	display: flex;
	align-items: center;
	gap: calc(var(--editor-padding) * .5);
}

.step-circle {
	flex-shrink: 0;
	width: 2em;
	height: 2em;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 100%;
	background-color: var(--red-hex);
	font-weight: 700;
	color: #fff;
}

.controls-container {
	display: flex;
}

#design-caption {
	margin-bottom: calc(var(--controls-gap) * -3 / 4);
}

#design-buttons {
  gap: 5px;
  font-family: var(--roboto);
  font-size: var(--design-font-size);
  color: var(--design-color);
}

.design-button {
	width: min-content;
	display: flex;
	justify-content: center;
	align-items: center;
  padding: .5em 1em;
  background-color: var(--design-background-color);
  cursor: pointer;
	text-align: center;
	transition: var(--transition);
}

input:checked + .design-button {
  background-color: var(--design-checked-background-color);
	transition: var(--transition);
}

#image-buttons {
	gap: var(--editor-padding);
}

.image-button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 0;
	font-size: .875rem;
	text-align: center;
	color: var(--gray-medium-hex);
}

.image-icon {
	width: 25px;
	height: 25px;
	justify-content: center;
	align-items: center;
	background-size: contain;
	background-repeat: no-repeat;
}

#zoom-out {
	background-image: url("../images/icons/icon_zoom_out_gray_medium.svg");
}

.image-button[disabled] #zoom-out {
	background-image: url("../images/icons/icon_zoom_out_gray_light.svg");
}

#zoom-in {
	background-image: url("../images/icons/icon_zoom_in_gray_medium.svg");
}

.image-button[disabled] #zoom-in {
	background-image: url("../images/icons/icon_zoom_in_gray_light.svg");
}

#swap-image {
	background-image: url("../images/icons/icon_image_gray_medium.svg");
}

#confirm-checkboxes {
	flex-direction: column;
	gap: .75em;
	font-size: .875rem;
}

label.confirm-label {
	display: flex;
	gap: .75em;
  cursor: pointer;
}

.confirm-box {
	flex-shrink: 0;
	width: 1.5em;
	height: 1.5em;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: .25em;
	border: 1px solid var(--red-hex);
}

.confirm-box::before {
	content: '';
	width: 65%;
	height: 65%;
	opacity: 0;
	background-color: var(--red-hex);
	transition: var(--transition);
}

input.checked + label.confirm-label .confirm-box::before {
	opacity: 1;
	transition: var(--transition);
}



/* MEDIA QUERIES */

@media screen and (max-width: 1090px) {
	:root {
		--editor-margin: 50px 0;
		--editor-after-width: 85%;
		--editor-after-height: calc(100% + 50px * 2);
		--controls-gap: var(--editor-padding);
		--design-font-size: 1rem;
	}
	#confirm-checkboxes {
		font-size: .75rem;
	}
}

@media screen and (max-width: 840px) {
	:root {
		--design-font-size: .8rem;
	}
}

@media screen and (max-width: 768px) {
	:root {
		--editor-height: calc((100vw - 20px * 2) * 1.555);
		--editor-height: calc((100vw - 20px * 2) * 1.63);
		--editor-margin: 30px 0;
		--editor-after-height: calc(100% + 30px * 2);
		--design-font-size: 1.125rem;
	}
	#editor {
		flex-direction: column;
		justify-content: flex-start;
	}
/* 	#controls {
		height: 100%;
	} */
	#confirm-checkboxes {
		font-size: .85rem;
	}
}

@media screen and (max-width: 600px) {
	:root {
		--editor-height: calc((100vw - 20px * 2) * 1.71);
		--editor-height: calc((100vw - 20px * 2) * 1.882);
		--design-font-size: 1rem;
	}
}

@media screen and (max-width: 480px) {
	:root {
		--editor-height: calc((100vw - 20px * 2) * 1.85);
		--editor-height: calc((100vw - 20px * 2) * 2.02);
		--design-font-size: .85rem;
	}
}

@media screen and (max-width: 465px) {
	h2 {
		font-size: 1.5rem;
	}
	.step,
	#design-caption,
	#dsgvo-info {
		font-size: .9rem;
	}
	.image-button,
	#confirm-checkboxes {
		font-size: .75rem;
	}
	.image-icon {
		width: 20px;
		height: 20px;
	}
}

@media screen and (max-width: 400px) {
	:root {
		--editor-height: calc((100vw - 20px * 2) * 2.2);
		--editor-height: calc((100vw - 20px * 2) * 2.48);
		--design-font-size: .75rem;
	}
	#design-buttons {
		flex-wrap: wrap;
	}
	.design-button {
		width: unset;
	}
}



















