/* FONTS */

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

@font-face {
  font-family: "Spartan";
  src: url("../fonts/Spartan-Variable.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
}

:root {
/*  colors  */
  --red-hex: #cc1e1c;
	--red-rgb: 204,30,28;
	--blue-hex: #004380;
	--blue-rgb: 0,67,128;
	--green-hex: #3ce4b0;
	--green-rgb: 60,228,176;
	--pink-hex: #f03174;
	--pink-rgb: 240,49,116;
  --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  */
  --caveat-brush: "CaveatBrush", sans-serif;
  --spartan: "Spartan", sans-serif;
  
/*  styles  */
	--line-height: 1.25;
	--transition: all .3s;
	
	--editor-margin-right-left: 31px;
	--editor-width: min(1090px, calc(100vw - 2 * var(--editor-margin-right-left)));
	--editor-height: 500px;
	--editor-margin-top-bottom: 20px;
	--editor-padding: 20px;
	--editor-font-size: 1.125rem;
	
	--h2-font-size: 1.5rem;
	
	--step-font-size: 1.5rem;
	
	--classic-button-padding: 14px 55px 10px;
	--classic-button-font-size: 1.375rem;
	
	--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);
	
	--image-buttons-height: 75px;
	--image-buttons-border-width: 3px;
  
	width: 100vw;
	height: 100vh;
  font-family: var(--spartan);
  font-size: 16px;
	font-weight: 400;
  line-height: var(--line-height);
	word-wrap: break-word;
	color: var(--gray-dark-hex);
}

#line-decor {
	width: 100%;
	height: 100%;
	position: absolute;
	background-image: url(../images/s-curve-1a.svg);
	background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

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 {
  font-family: var(--caveat-brush);
}

h2, h3, h4, h5, h6 {
	overflow-wrap: break-word;
  margin: 0;
	text-align: center;
	font-weight: 700;
	color: var(--gray-dark-hex);
}

h2 {
  font-size: var(--h2-font-size);
}

input {
  display: none;
}

label {
	cursor: pointer;
}

a {
	color: var(--pink-hex);
	text-decoration: underline;
}

a:hover {
	text-decoration: none;
}

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

button[disabled] {
	opacity: .5;
	cursor: not-allowed;
  transition: var(--transition);
}

#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-top-bottom) 0;
	padding: var(--editor-padding);
	border-radius: 18px;
	background-color: #fff;
	box-shadow: 0 0 10px rgba(0,0,0,.25);
	font-size: var(--editor-font-size);
}

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

#stage {
  transform: scale(var(--stage-scale));
  transform-origin: top left;
	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;
}

#placeholder-image {
  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(--blue-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;
	align-items: center;
  gap: var(--controls-gap);
	user-select: none;
}

.classic-button {
	width: fit-content;
	padding: var(--classic-button-padding);
	background-color: var(--blue-hex);
	font-family: var(--spartan);
	font-size: var(--classic-button-font-size);
	font-weight: 700;
	color: #fff;
	transition: var(--transition);
}

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

#instruction {
	width: 100%;
	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: 1.5em;
	height: 1.5em;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 100%;
	background-color: var(--pink-hex);
	font-family: var(--caveat-brush);
	font-size: var(--step-font-size);
	font-weight: 700;
	color: #fff;
}

.step-text {
  margin-top: .25em;
}
          
#stage-text:empty,
#stage-text:focus,
#stage-text:hover {
	outline: 0;
	background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%233CE4B0FF' stroke-width='3' stroke-dasharray='15%2c 15' stroke-dashoffset='0' stroke-linecap='butt'/%3e%3c/svg%3e");
}

.controls-container {
	display: flex;
}

#image-buttons {
	width: min(100%, 335px);
	height: var(--image-buttons-height);
	justify-content: space-between;
	align-items: center;
	gap: var(--editor-padding);
	padding: 5px;
	border: var(--image-buttons-border-width) solid #000;
  border-radius: var(--image-buttons-height);
}

.image-button {
	width: calc(var(--image-buttons-height) - 15px);
	height: calc(var(--image-buttons-height) - 15px);
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0;
	background-color: var(--blue-hex);
	border-radius: 100%;
	font-size: 1.5rem;
  font-weight: 700;
	color: #fff;
}

.image-button.zoom {
	padding-bottom: .1em;
}

.image-button > svg {
	width: 25px;
	height: 25px;
}

#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-circle {
	flex-shrink: 0;
	width: 2em;
	height: 2em;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	border: 2px solid #000;
	border-radius: 100%;
}

.confirm-check {
	width: 30%;
	height: 30%;
	position: absolute;
	opacity: 0;
	rotate: -10deg;
	background-image: url("../images/icons/list-marker-1.svg");
	background-size: contain;
	background-size: 60%;
  background-repeat: no-repeat;
	background-position: 79% 5%;
	transition: var(--transition);
}

input.checked + label.confirm-label .confirm-check {
	width: 300%;
	height: 300%;
	opacity: 1;
	transition: var(--transition);
}



/* MEDIA QUERIES */

@media screen and (max-width: 1366px) {
	:root {
		--classic-button-padding: 15px 50px 12px;
		--classic-button-font-size: 1.25rem;
		--image-buttons-height: 63px;
		--image-buttons-border-width: 2px;
	}
}

@media screen and (max-width: 1355px) {
	#line-decor {
		background-size: contain;
	}
}

@media screen and (max-width: 1200px) {
	:root {
		--editor-width: min(930px, calc(100vw - 2 * var(--editor-margin-right-left)));
		--editor-font-size: 1rem;
		--h2-font-size: 1.375rem;
	}
}

@media screen and (max-width: 992px) {
	:root {
		--editor-width: 690px;
		--editor-height: calc(var(--editor-width) * 1.535);
		--controls-gap: var(--editor-padding);
		--h2-font-size: 1.25rem;
	}
	#editor {
		flex-direction: column;
		justify-content: space-evenly;
	}
}

@media screen and (max-width: 768px) {
	:root {
		--editor-width: min(510px, calc(100vw - 2 * var(--editor-margin-right-left)));
		--editor-height: calc((100vw - var(--editor-margin-right-left) * 2) * 1.5);
		--classic-button-padding: 17px 20px 12px;
		--classic-button-font-size: 1rem;
		--image-buttons-height: 57px;
	}
}

@media screen and (max-width: 672px) {
	:root {
		--editor-height: calc((100vw - var(--editor-margin-right-left) * 2) * 1.75);
	}
}

@media screen and (max-width: 576px) {
	:root {
		--editor-margin-right-left: 20px;
		--editor-width: calc(100vw - 2 * var(--editor-margin-right-left));
		--editor-height: calc((100vw - var(--editor-margin-right-left) * 2) * 1.87);
		--editor-font-size: .9375rem;
		--step-font-size: 1.375rem;
	}
}

@media screen and (max-width: 480px) {
	:root {
		--editor-height: calc((100vw - var(--editor-margin-right-left) * 2) * 2.11);
	}
}

@media screen and (max-width: 400px) {
	:root {
		--editor-height: calc((100vw - var(--editor-margin-top-bottom) * 2) * 2.5);
	}
}



















