:root{
  --color--accent-1: #6767FF;
}

.threejs-editor-page {
	position: relative;
	z-index: 1;
	display: flex;
	align-self: flex-start;
	flex-direction: column;
	font-family: inherit !important;

	& .threejs-editor-page__text-item-button {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 7px;
		cursor: pointer;
		background-color: transparent;
		border: 0;
		font-weight: 400;
		font-size: 12px;
		line-height: 18px;
		letter-spacing: 0%;
		border: 1px solid #dbdadf;
		border-radius: 8px;
		color: #2c2c2c;
		gap: 4px;

		&:hover,
		&:focus {
			background-color: #f5f5f790;
		}
	}

	& .threejs-editor-page__share-loading {
		position: absolute;
		padding: 16px;
		inset: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background-color: rgba(0, 0, 0, 0.5);
		color: #ffffff;
		z-index: 6;
		display: none;
		text-align: center;

		&.active {
			display: flex;
		}
	}

	& .threejs-editor-page__modal {
		position: absolute;
		padding: 16px;
		inset: 0;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background-color: rgba(0, 0, 0, 0.5);
		color: #ffffff;
		z-index: 6;
		display: none;
		text-align: center;

		&.active {
			display: flex;
		}
	}

	& .threejs-editor-page__modal-content {
		background-color: #ffffff;
		color: #2c2c2c;
		border-radius: 12px;
		max-width: 400px;
		width: 100%;
	}

	& .threejs-editor-page__modal-header {
		padding: 16px;
		display: flex;
		flex-direction: column;
		gap: 8px;
		text-align: left;

		& a {
			color: #6767ff;
			text-decoration: underline;
		}
	}

	& .threejs-editor-page__modal-footer {
		border-top: 1px solid #dbdadf;
		padding: 16px;
		display: flex;
		align-items: center;
		gap: 12px;
	}

	& .threejs-editor-page__modal-title {
		display: flex;
		align-items: center;
		gap: 8px;
		font-weight: 600;
		font-size: 18px;
		line-height: 24px;
		letter-spacing: 0%;
	}

	& .threejs-editor-page__modal-footer-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
	}

	& .threejs-editor-page__modal-title-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 32px;
		height: 32px;
		color: #6767ff;
		background-color: #f0f0ff;
		border-radius: 50%;
	}

	@media (max-width: 767px) {
		position: relative;
		min-height: 0;
		border-right: 0;
		overflow: hidden;
	}

	& .threejs-editor-page__text-item-position-align-wrapper {
		display: flex;
		border: 1px solid #dbdadf;
		border-radius: 8px;
		align-items: center;
		overflow: hidden;

		> * {
			border-right: 1px solid #dbdadf;
		}

		> *:last-of-type {
			border-right: 0;
		}
	}

	#remove-background-wrapper {
		display: flex;
		align-items: center;
		gap: 8px;
		flex-wrap: wrap;
	}

	& .threejs-editor-page__dropdown-drawer-type-list {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;

		@media (max-width: 1440px) {
			grid-template-columns: repeat(1, 1fr);
		}
	}

	& .threejs-editor-page__dropdown-drawer-type-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 12px;
		border-radius: 8px;
		border: 1px solid #dbdadf;
		cursor: pointer;

		&.active {
			border-color: #6767ff;
		}

		& > span:first-of-type {
			display: flex;
			align-items: center;
			gap: 12px;

			& > span {
				display: flex;
				flex-direction: column;

				& > span:first-of-type {
					font-family: inherit !important;
					font-weight: 500;
					font-size: 16px;
					line-height: 24px;
					color: #2c2c2c;
					text-transform: capitalize;
					letter-spacing: 0;
				}

				& > span:last-of-type {
					font-family: inherit !important;
					font-weight: 400;
					font-size: 16px;
					line-height: 24px;
					color: #5f5e66;
					text-transform: capitalize;
					letter-spacing: 0;
				}
			}
		}

		& img {
			aspect-ratio: 1/1;
			object-fit: cover;
			min-width: 80px;
			max-width: 80px;
			height: 80px;
			border-radius: 6px;
		}

		& input {
			display: none;

			&:checked {
				& + span {
					& svg:first-of-type {
						display: block;
					}

					& svg:last-of-type {
						display: none;
					}
				}
			}

			&:not(:checked) {
				& + span {
					& svg:first-of-type {
						display: none;
					}

					& svg:last-of-type {
						display: block;
					}
				}
			}
		}
	}

	& .threejs-editor-page__design-remove-background-preview {
		flex-grow: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		padding: 10px 16px;
		border-radius: 8px;
		border: 0;
		outline: 0;
		cursor: pointer;
		background-color: transparent;
		border: 1px solid #dbdadf;
		color: #2c2c2c;
		& > div {
			display: flex;
			align-items: center;
			gap: 8px;
		}
		& > button {
			cursor: pointer;
			background-color: transparent;
			border: 0;
			outline: 0;
			padding: 0;
			margin: 0;
		}
	}

	& .threejs-editor-page__design-remove-background-preview-image {
		width: 32px;
		min-width: 32px;
		max-width: 32px;
		height: 32px;
		border-radius: 90px;
		object-fit: cover;
		aspect-ratio: 1/1;
	}

	& .threejs-editor-page__design-remove-background-btn {
		display: flex;
		align-items: center;
		gap: 4px;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 12px;
		line-height: 18px;
		padding: 16px;
		border-radius: 8px;
		border: 0;
		outline: 0;
		cursor: pointer;
		background-color: transparent;
		border: 1px solid #dbdadf;
		color: #6767FF;
	}

	& .threejs-editor-page__text-item-position-align-container {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	& .threejs-editor-page__text-item-position-align {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 5px 8px;
		cursor: pointer;

		&:hover {
			background-color: #f5f5f790;
		}

		&:active,
		&.active {
			background-color: #f5f5f7;
		}

		& > svg {
			display: flex;
			width: 24px;
			height: 24px;
		}
	}

	& .threejs-editor-page__text-item-position-align-input {
		display: none;
	}

	& .threejs-editor-page__content {
		position: relative;
		display: flex;
		flex-direction: column;
		flex-grow: 1;
		border: 1px solid #dbdadf;
		border-radius: 28px;
		overflow: hidden;

		@media (max-width: 767px) {
			border: 0;
			border-radius: 0;
		}
	}

	& ul {
		padding: 0;
		list-style: none;
	}

	& .threejs-editor-page__model-list {
		display: none;
	}

	& .threejs-editor-page__text-item-position-wrapper {
		display: flex;
		align-items: center;
		gap: 12px;
		flex-wrap: wrap;

		& > * {
			display: flex;
			flex-direction: column;
			gap: 4px;
			padding: 0;
		}

		& p {
			font-family: inherit !important;
			font-weight: 400;
			font-size: 12px;
			line-height: 18px;
			letter-spacing: 0;
			color: #2c2c2c;
			text-transform: capitalize;
		}
	}

	& .threejs-editor-page__text-item-file-input-wrapper {
		flex-grow: 1;
		display: flex;
		align-items: flex-start;
		gap: 8px;
		cursor: pointer;
		background-color: var(--color--accent-3);
		border-radius: 8px;
		padding: 12px;
	}

	& .threejs-editor-page__design-submit-btn {
		margin: 0;
		line-height: 0px !important;
		height: 54px;
	}

	& .threejs-editor-page__design-submit-wrapper {
		display: flex;
		gap: 12px;

		@media (max-width: 767px) {
			flex-direction: column;
		}
	}

	& .threejs-editor-page__text-item-file-input-text {
		display: flex;
		flex-direction: column;

		& p {
			font-family: inherit !important;
			font-weight: 500;
			font-size: 16px;
			line-height: 24px;
			color: #2c2c2c;
			letter-spacing: 0;
			text-transform: capitalize !important;
			margin: 0;
		}

		& span {
			font-family: inherit !important;
			font-family: Test Söhne;
			font-weight: 400;
			font-size: 12px;
			line-height: 18px;
			letter-spacing: 0;
			color: #88868f;
			text-transform: capitalize !important;
		}
	}

	& .threejs-editor-page__summary {
		position: absolute;
		left: 0;
		right: 0;
		bottom: -81px;
		pointer-events: none;
		transition: bottom 0.35s ease;
	}

	& .threejs-editor-page__summary.active {
		pointer-events: auto;
		bottom: 0;
	}

	& .threejs-editor-page__text-item-file-input-icon {
		display: flex;
		background-color: #6767ff1a;
		border-radius: 6px;
		padding: 8px;
		color: #6767FF;
	}

	& .threejs-editor-page__text-item-file-input {
		display: none;
	}

	& .threejs-editor-page__text-item-position-input {
		border-radius: 8px;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		letter-spacing: 0;
		color: #2c2c2c;
		padding: 6px 28px 6px 10px;
		border: 1px solid #dbdadf;
		width: 100%;
		min-width: 92px;
		max-width: 92px;
		height: 100%;
		margin: 0;
	}

	& .threejs-editor-page__text-item-position-input-wrapper {
		position: relative;
	}

	& .threejs-editor-page__text-item-position-input-unit {
		position: absolute;
		right: 10px;
		top: 50%;
		transform: translateY(-50%);
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		letter-spacing: 0;
		color: #88868f;
	}

	& .threejs-editor-page__text-item-position-input::-webkit-outer-spin-button,
	& .threejs-editor-page__text-item-position-input::-webkit-inner-spin-button {
		/* display: none; <- Crashes Chrome on hover */
		-webkit-appearance: none;
		margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
	}

	& .threejs-editor-page__text-item-position-input[type='number'] {
		-moz-appearance: textfield; /* Firefox */
	}

	& .threejs-editor-page__editor {
		position: relative;
		width: 100%;
		display: block;
		flex-grow: 0;
		aspect-ratio: 1;
		min-height: 0;

		canvas#threejs-canvas {
			position: absolute;
			inset: 0;
			display: block;
			width: 100%;
			height: 100%;
		}
	}

	& .threejs-editor-page__dropdown-drawer-footer {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 16px;
		border-top: 1px solid #dbdadf;
		background-color: #ffffff;
	}

	& .threejs-editor-page__back-to-edit,
	& .threejs-editor-page__add-to-cart-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 10px 16px;
		height: 40px;
		border-radius: 100px;
		background-color: #ffffff;
		border: 1px solid #dbdadf;
		font-family: inherit !important;
		font-weight: 500;
		font-size: 14px;
		line-height: 1.1;
		color: #2c2c2c;
		cursor: pointer;
		outline: 0;
		white-space: nowrap;

		& svg {
			width: 16px;
			height: 16px;
		}

		&[hidden] {
			display: none;
		}

		@media (max-width: 767px) {
			padding: 8px 14px;
			font-size: 12px;
			gap: 6px;
			height: 32px;

			& svg {
				width: 14px;
				height: 14px;
			}
		}
	}

	& .threejs-editor-page__add-to-cart-btn {
		background-color: #000000;
		color: #ffffff;
		border-color: #000000;
		width: fit-content;
	}

	& .threejs-editor-page__side {
		position: absolute;
		top: 16px;
		left: 16px;
		z-index: 2;
		display: flex;
		align-items: stretch;
		padding: 2px;
		height: 40px;
		border-radius: 100px;
		background-color: rgba(44, 44, 44, 0.05);

		@media (max-width: 767px) {
			height: 32px;
		}

		& > button {
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 8px 14px;
			border-radius: 6px;
			border: 0;
			outline: 0;
			font-family: inherit !important;
			font-weight: 500;
			font-size: 14px;
			line-height: 1.1;
			color: #88868f;
			background-color: transparent;
			cursor: pointer;
			transition: background-color 0.2s ease, color 0.2s ease;

			&.active {
				background-color: #ffffff;
				color: #000000;
				border-radius: 100px;
			}

			&:disabled {
				opacity: 0.4;
				pointer-events: none;
			}
		}
	}

	& .customizer-outline-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
		padding: 11px 24px !important;
		font-weight: 400 !important;
		font-size: 16px !important;
		line-height: 24px !important;
		color: #6767FF !important;
		border: 1px solid #6767FF !important;
		background-color: transparent !important;
		font-family: inherit !important;
		border-radius: 8px !important;
		outline: 0 !important;
		cursor: pointer !important;
		text-transform: capitalize !important;

		& > :disabled {
			opacity: 0.5;
			pointer-events: none;
		}
	}

	& .threejs-editor-page_ai > button {
		width: auto;
	}

	& .threejs-editor-page_ai {
		position: static;
		padding: 0;

		& .threejs-editor-page__text-item-input {
			padding: 12px;
		}
	}

	& .threejs-editor-page__overlay-actions {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 16px;
		padding: 16px;
		z-index: 1;
		pointer-events: none;

		& > * {
			pointer-events: auto;
		}

		@media (max-width: 767px) {
			gap: 8px;
		}
	}

	& .threejs-editor-page__overlay-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 14px 24px;
		border: 1px solid rgba(255, 255, 255, 0.4);
		border-radius: 100px;
		font-family: inherit !important;
		font-weight: 500;
		font-size: 14px;
		line-height: 1.1;
		color: #ffffff;
		cursor: pointer;
		outline: 0;
		white-space: nowrap;
		box-shadow: inset 0px -2px 0px 0px rgba(0, 0, 0, 0.12);
		transition: background-color 0.2s ease, transform 0.1s ease;

		&:active {
			transform: translateY(1px);
		}

		&:disabled {
			opacity: 0.5;
			cursor: not-allowed;
		}

		@media (max-width: 767px) {
			padding: 10px 18px;
			font-size: 12px;
			gap: 6px;

			& svg {
				width: 14px;
				height: 14px;
			}
		}
	}

	& .threejs-editor-page__overlay-btn--ai {
		background-color: #232323;

		&:hover {
			background-color: #2c2c2c;
		}
	}

	& .threejs-editor-page__overlay-btn--finalize {
		background-color: #6767ff;
    padding: 15px 32px;
    min-height: 49px;

		&:hover {
			background-color: #5757ee;
		}

		@media (max-width: 767px) {
			padding: 12px 18px;
    	min-height: 41px;
		}
	}

	& .threejs-editor-page__tools {
		position: relative;
		opacity: 0.5;
		display: flex;
		/* visibility: hidden; */
		pointer-events: none;
		user-select: none;
		tab-index: -1;

		@media (max-width: 767px) {
			position: relative;
			/* bottom: 81px; */
			z-index: 1;
			left: 0;
			right: 0;
			background-color: #ffffff;
		}

		&.active {
			opacity: 1;
			pointer-events: auto;
			user-select: auto;
			tab-index: 0;
			/* visibility: visible; */
		}
	}

	& .threejs-editor-page__prompt-input {
		display: block;
		border-radius: 8px;
		border: 1px solid #dbdadf;
		padding: 10px 10px 82px 10px;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		color: #2c2c2c;
		margin: 0;
		outline: 0;
		resize: none;
		width: 100%;
	}

	& .threejs-editor-page__prompt-creation-wrapper {
		display: none;
		flex-direction: column;
		gap: 4px;
	}

	& .threejs-editor-page__prompt-creation-wrapper.active {
		display: flex;
	}

	& .loading-btn {
		pointer-events: none;

		& > .loading {
			display: flex;
			animation: anime-btn-loading 2s linear infinite;
		}

		& > .no-loading {
			display: none;
		}
	}

	& .no-loading {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
	}

	& .loading {
		display: none;
		align-items: center;
		justify-content: center;
		gap: 4px;
	}

	& .threejs-editor-page__prompt-creation {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 4px;
		border: 1px solid #dbdadf;
		border-radius: 8px;
		padding: 8px;
	}

	& .threejs-editor-page__prompt-creation-image-remove-background {
		border-radius: 8px;
		border: 1px solid #dbdadf;
		outline: 0;
		padding: 0;
		margin: 0;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 12px;
		font-family: inherit !important;
		gap: 4px;
	}

	& .threejs-editor-page__prompt-creation-image-btns {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 8px;
	}

	& .threejs-editor-page__prompt-creation-image-delete {
		border-radius: 8px;
		border: 1px solid #dbdadf;
		outline: 0;
		padding: 0;
		margin: 0;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 12px;
	}

	& .threejs-editor-page__prompt-creation-image {
		width: 65px;
		height: 65px;
		border-radius: 8px;
		border: 1px solid #dbdadf;
		object-fit: cover;
		object-position: center;
	}

	& .threejs-editor-page__prompt-input-image-upload-preview-delete {
		position: absolute;
		display: flex;
		align-items: center;
		justify-content: center;
		top: 4px;
		right: 4px;
		cursor: pointer;
		background-color: #2c2c2c;
		color: #ffffff;
		border: 0;
		outline: 0;
		padding: 4px;
		border-radius: 90px;
	}

	& .threejs-editor-page__prompt-input-image-upload-wrapper {
		position: absolute;
		display: flex;
		align-items: center;
		justify-content: flex-start;
		flex-wrap: wrap;
		gap: 12px;
		bottom: 10px;
		left: 10px;
	}

	& .threejs-editor-page__prompt-input-image-upload {
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		padding: 0;

		& > input {
			display: none;
		}
	}

	& .threejs-editor-page__prompt-input-image-upload-preview {
		object-fit: cover;
		border-radius: 8px;
		object-position: center;
		border: 1px solid #dbdadf;
		width: 57px;
		height: 57px;
		max-width: 57px;
		max-height: 57px;
		min-width: 57px;
		min-height: 57px;
	}

	& .threejs-editor-page__selected-color {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 24px;
		min-width: 24px;
		max-width: 24px;
		height: 24px;
		cursor: pointer;
		pointer-events: none;

		& > span {
			width: 20px;
			height: 20px;
			border-radius: 4px;
			border: 1px solid #dbdadf;
		}
	}

	& .threejs-editor-page__dropdown-drawer-color-list li {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		min-width: 38px;
		max-width: 38px;
		height: 38px;
		cursor: pointer;

		& > span {
			width: 30px;
			height: 30px;
			border-radius: 6px;
			border: 1px solid #dbdadf;
		}

		&.color-item--selected {
			border-radius: 8px;
			border: 1px solid #2c2c2c;
		}
	}

	& #ai-drawer.threejs-editor-page__dropdown-drawer {
		bottom: -80px;
		border-bottom: 0;
		z-index: 5;

		&.active {
			bottom: 0;
		}

		@media (max-width: 767px) {
			z-index: 5;
		}
	}

	& .threejs-editor-page__dropdown-drawer {
		opacity: 0;
		position: absolute;
		left: 0;
		z-index: 5;
		bottom: 0;
		width: 100%;
		pointer-events: none;
		transition:
			opacity 0.35s ease,
			bottom 0.35s ease;

		will-change: opacity, bottom;

		&.active {
			bottom: 100%;
			opacity: 1;
			pointer-events: auto;
		}

		&.threejs-editor-page__dropdown-drawer--summary {
			border-bottom: 0;

			@media (max-width: 767px) {
				bottom: 0;
			}
		}

		@media (max-width: 767px) {
			position: absolute;
			z-index: 5;
			bottom: -80px;
			left: 0;
			right: 0;
			border-radius: 12px 12px 0 0;

			&.active {
				bottom: 0;
			}
		}
	}

	& .threejs-editor-page__dropdown-drawer-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px;
		border-bottom: 1px solid #dbdadf;
		border-radius: 12px 12px 0 0;
		background-color: #ffffff;

		& > button {
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: transparent;
			border: 0;
			outline: 0;
			cursor: pointer;
			padding: 0;
		}
	}

	& .threejs-editor-page__dropdown-drawer-color-list {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
	}

	& .threejs-editor-page__dropdown-drawer-selected-color {
		display: flex;
		align-items: center;
		gap: 6px;
		font-weight: 500;
		font-size: 16px;
		line-height: 24px;
		color: #2c2c2c;

		& > span {
			font-weight: 400;
		}
	}

	& .threejs-editor-page__layers-list {
		display: flex;
		flex-direction: column;
		gap: 4px;

		& > li {
			display: flex;
			align-items: center;
			justify-content: space-between;
			gap: 16px;
			font-family: inherit !important;
			font-weight: 400;
			font-size: 16px;
			line-height: 24px;
			letter-spacing: 0;
			color: #2c2c2c;
			padding: 12px;
			border: 1px solid #dbdadf;
			border-radius: 8px;

			& button {
				display: flex;
				padding: 0;
			}

			& .move-forward-btn {
				display: flex;
				transform: rotate(90deg);
			}

			& .drag-and-drop-btn {
				display: flex;
			}

			& .move-backward-btn {
				display: flex;
				transform: rotate(-90deg);
			}

			& > div:first-of-type {
				display: flex;
				align-items: center;
				gap: 10px;

				& > img {
					border: 1px solid #dbdadf;
					border-radius: 6px;
					width: 32px;
					height: 32px;
				}
			}

			& > div:last-of-type {
				display: flex;
				align-items: center;
				gap: 8px;
			}
		}

		& > .layer {
			& button:has(> .drag-and-drop-btn) {
				cursor: grab;
			}
		}

		& > .layer.dragging {
			border: 1px dashed #6767FF;
			& button * {
				user-select: none;
				-webkit-user-select: none; /* Safari */
				-ms-user-select: none; /* IE/Edge */
			}
		}
	}

	& .threejs-editor-page__text-item {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	& .threejs-editor-page__text-item-input-wrapper {
		display: flex;
		position: relative;
		width: 100%;
		& button {
			position: absolute;
			top: 50%;
			right: 12px;
			transform: translateY(-50%);
			background-color: transparent;
			border: 0;
			outline: 0;
			cursor: pointer;
			padding: 0;
		}
	}

	& .threejs-editor-page__text-quantity-input-wrapper {
		position: relative;
	}

	& .threejs-editor-page__text-quantity-input {
		border-radius: 8px;
		border: 1px solid #dbdadf;
		padding: 10px 45px;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		color: #2c2c2c;
		margin: 0;
		text-align: center;
		width: 222px;
		
		@media (width < 768px){
			width: 207px;
		}

		&::-webkit-outer-spin-button,
		&::-webkit-inner-spin-button {
			-webkit-appearance: none;
			margin: 0;
		}
	}

	& .threejs-editor-page__text-quantity-input-btn {
		position: absolute;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: transparent;
		border: 0;
		outline: 0;
		cursor: pointer;
		padding: 0;
		width: 36px;
		height: 36px;
		top: 50%;
		transform: translateY(-50%);
		background: #f5f5f7;
		border-radius: 8px;

		&.minus-btn {
			left: 5px;
		}

		&.plus-btn {
			right: 5px;
		}
	}

	& .threejs-editor-page__text-item-summary {
		background-color: #f5f5f7;
		border-radius: 8px;
	}

	& .threejs-editor-page__text-item-summary-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-family: inherit !important;
		padding: 16px;
		width: 100%;

		&.active > .threejs-editor-page__text-item-summary-header-icon {
			transform: rotate(180deg);
		}

		&.active ~ .threejs-editor-page__text-item-summary-content {
			display: block;
		}
	}

	& .threejs-editor-page__text-item-summary-content-table {
		display: flex;
		gap: 8px;
		padding: 16px;
		border-top: 1px solid #ffffff;
		border-bottom: 1px solid #ffffff;

		& > p {
			flex-grow: 1;
			display: flex;
			flex-direction: column;
			font-family: inherit !important;
			font-weight: 400;
			font-size: 16px;
			line-height: 24px;
			color: #2c2c2c;

			& > strong {
				font-weight: 500;
			}
		}
	}

	& .threejs-editor-page__top-right-buttons {
		position: absolute;
		right: 16px;
		top: 16px;
		z-index: 2;
		display: flex;
		align-items: center;
		gap: 8px;
	}

	& .threejs-editor-page__save-design > button {
		display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 11px 24px;
    border-radius: 100px;
    color: #000000;
    font-family: inherit !important;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.1;
    letter-spacing: 0;
    cursor: pointer;
    outline: 0;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    min-height: 40px;

		&:hover {
			background-color: #f5f5f7;
		}

		&.active {
			color: #6767FF;
		}

		@media (max-width: 767px) {
		  padding: 8px 18px;
			font-size: 12px;
			min-height: 32px;
		}
	}

	& .threejs-editor-page__share > button {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 8px;
		background-color: #ffffff;
		border: 0;
		border-radius: 100px;
		color: #2c2c2c;
		cursor: pointer;
		outline: 0;
		transition: background-color 0.2s ease;

		&:hover {
			background-color: #f5f5f7;
		}

		&.active {
			color: #6767FF;
		}

		@media (max-width: 767px) {
			width: 32px;
			height: 32px;
		}
	}

	& .threejs-editor-page__share-dropdown {
		position: absolute;
		top: 48px;
		right: 0;
		min-width: 300px;
		background-color: #ffffff;
		border-radius: 8px;
		z-index: 1;
		display: none;

		&.active {
			display: block;
		}
	}

	& .threejs-editor-page__share-dropdown-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px;
		gap: 8px;
		border-bottom: 1px solid #dbdadf;
	}

	& .threejs-editor-page__share-dropdown-header-title {
		font-family: inherit !important;
		font-weight: 600;
		font-size: 18px;
		line-height: 24px;
		letter-spacing: 0;
		color: #2c2c2c;
	}

	& .threejs-editor-page__share-dropdown-close {
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: transparent;
		border: 0;
		outline: 0;
		padding: 0;
		cursor: pointer;
	}

	& .threejs-editor-page__share-dropdown-content {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding: 16px;
	}

	& .threejs-editor-page__share-btn {
		display: flex;
		align-items: center;
		gap: 8px;
		background-color: transparent;
		border: 1px solid #dbdadf;
		outline: 0;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		letter-spacing: 0px;
		vertical-align: middle;
		color: #2c2c2c;
		padding: 8px;
		border-radius: 8px;
		width: 100%;

		& > svg {
			display: flex;
		}
	}

	& .threejs-editor-page__text-item-summary-content-total {
		display: flex;
		justify-content: space-between;
		padding: 16px;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		letter-spacing: 0;
		color: #2c2c2c;
	}

	& .threejs-editor-page__text-quantity-wrapper {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}

	& .threejs-editor-page__text-item-summary-content-total-wrapper {
		display: flex;
		flex-direction: column;
		max-width: 210px;
		width: 100%;

		& strong {
			font-family: inherit !important;
			font-weight: 600;
			font-size: 18px;
			line-height: 24px;
			letter-spacing: 0;
			color: #2c2c2c;
		}

		& > button {
			font-family: inherit !important;
			font-weight: 400;
			font-size: 16px;
			line-height: 24px;
			letter-spacing: 0%;
			text-decoration: underline;
			margin: 0 !important;
			color: #6767FF;
		}
	}

	& .threejs-editor-page__text-item-summary-header-icon {
		display: flex;
		align-items: center;
		justify-content: center;

		& > svg {
			display: flex;
			transform: rotate(90deg);
		}
	}

	& .threejs-editor-page__text-item-summary-content {
		display: none;
	}

	& .threejs-editor-page__text-item-summary-title {
		font-family: inherit !important;
		font-weight: 500;
		font-size: 16px;
		line-height: 24px;
		color: #2c2c2c;
	}

	& .threejs-editor-page__text-item-summary-header-title {
		display: flex;
		align-items: center;
		gap: 14px;
	}

	& .threejs-editor-page__text-item-summary-separator {
		width: 1px;
		height: 24px;
		background-color: #dbdadf;
	}

	& .threejs-editor-page__text-item-summary-total {
		font-family: inherit !important;
		font-weight: 600;
		font-size: 18px;
		line-height: 24px;
		letter-spacing: 0;
		color: #2c2c2c;
	}

	& .threejs-editor-page__text-item-input {
		width: 100%;
		border-radius: 8px;
		border: 1px solid #dbdadf;
		padding: 12px 48px 12px 54px;
		font-family: inherit !important;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
		color: #2c2c2c;
		margin: 0;
		resize: vertical;
	}

	& .threejs-editor-page__text-item-submit {
		margin: 0;
		line-height: 0px !important;
	}

	& .threejs-editor-page__text-form {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	& .threejs-editor-page__text-list {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	& .threejs-editor-page__text-remark {
		color: #5f5e66;
		font-weight: 400;
		font-size: 16px;
		line-height: 24px;
	}

	& .threejs-editor-page__text-item-select-wrapper {
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-family: inherit !important;
		font-weight: 500;
		font-size: 16px;
		line-height: 24px;
		letter-spacing: 0%;
		color: #2c2c2c;
	}

	& .threejs-editor-page__text-item-select {
		display: none;
	}

	& .threejs-editor-page__text-item-select-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 2px;
		font-weight: 400;
		font-size: 14px;
		line-height: 18px;
		color: #2c2c2c;
		background-color: transparent;
		border: 0;
		outline: 0;
		cursor: pointer;
		padding: 0;

		& > svg {
			transform: rotate(90deg);
		}
	}

	& .threejs-editor-page__text-item-checkbox-wrapper {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	& .threejs-editor-page__text-item-color-input {
		width: 24px;
		height: 28px;
		border-radius: 8px;
		border: none;
		padding: 0;
		font-family: inherit !important;
		margin: 0;
	}

	& .threejs-editor-page__text-item-color-wrapper {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 2px;
		cursor: pointer;
		padding: 0;
		border: 1px solid #dbdadf;
		border-radius: 8px;
		padding: 3px 5px 3px 7px;
		cursor: pointer;
		width: 100%;

		& > svg {
			transform: rotate(90deg);
		}
	}

	& .threejs-editor-page__text-font-select {
		@media (max-width: 767px) {
			display: none;
		}
	}

	& .threejs-editor-page__tab.threejs-editor-page__tab-style {
		flex-grow: 0;

		@media (max-width: 767px) {
			justify-content: space-between;
			align-items: center;
			width: 100%;
			flex-grow: 1;
		}
	}

	& .threejs-editor-page__text-item-style-title {
		font-weight: 500;
		font-size: 16px;
		line-height: 24px;
		letter-spacing: 0%;
		color: #2c2c2c;
		display: none;

		@media (max-width: 767px) {
			display: block;
		}
	}

	& .threejs-editor-page__text-item-checkboxes {
		display: flex;
		align-items: center;
		gap: 6px;
	}

	& .threejs-editor-page__text-item-checkbox {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
		font-weight: 400;
		font-size: 12px;
		line-height: 18px;
		color: #2c2c2c;
		border: 1px solid #dbdadf;
		border-radius: 8px;
		padding: 7px 11px;
		letter-spacing: 0;
		text-transform: capitalize;
		font-family: inherit !important;
		cursor: pointer;
		transition: all 0.3s ease;

		&.active {
			border-color: #6767ff;
		}

		& > input {
			display: none;
		}
	}

	& .threejs-editor-page__text-item-input-icon {
		pointer-events: none;
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		left: 12px;
		top: calc(50% - 2px);
		transform: translateY(-50%);
		color: #2c2c2c;
		border-radius: 6px;
		border: 1px solid #dbdadf;
		padding: 4px;
	}

	& .threejs-editor-page__text-item-input-icon-text {
		pointer-events: none;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #2c2c2c;
		border-radius: 6px;
		border: 1px solid #dbdadf;
		padding: 4px;
	}

	& .font-drawer-list {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		flex-direction: column;
		gap: 6px;
		width: 100%;

		@media (max-width: 390px) {
			grid-template-columns: repeat(2, 1fr);
		}
	}

	& .threejs-editor-page__text-font-select-list {
		display: none;
		width: 100%;

		@media (max-width: 767px) {
			display: block;
		}
	}

	& .font-size-drawer-item,
	& .font-drawer-item {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
		width: 100%;
		font-weight: 400;
		font-size: 14px;
		line-height: 18px;
		letter-spacing: 0%;
		color: #5f5e66;
		padding: 7px 16px;
		border-radius: 4px;
		border: 1px solid #dbdadf;
		cursor: pointer;
		transition: all 0.3s ease;

		&.active {
			background-color: #f5f5f7;
			border-color: #6767ff;
		}

		&:focus,
		&:hover {
			background-color: #f5f5f7;
		}
	}

	& .threejs-editor-page__text-wrapper {
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: space-between;
		width: 100%;
		gap: 12px;
	}

	& .threejs-editor-page__text-item-wrapper-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		width: 100%;

		@media (max-width: 767px) {
			align-items: stretch;
			flex-direction: column;
		}
	}

	& .threejs-editor-page__select-dropdown-btn {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 4px;
		border: 1px solid #dbdadf;
		border-radius: 8px;
		padding: 5px 11px;
		cursor: pointer;
		font-weight: 400;
		font-size: 14px;
		line-height: 18px;
		letter-spacing: 0%;
		color: ##2c2c2c;

		& > svg {
			transform: rotate(90deg);
			color: #5f5e66;
		}

		@media (max-width: 767px) {
			width: 100%;
		}
	}

	& .threejs-editor-page__tabs-list {
		display: flex;
		flex-direction: row;
		gap: 8px;
		flex-wrap: wrap;
	}

	& .threejs-editor-page__text-input {
		width: 100%;
	}

	& .threejs-editor-page__dropdown-drawer-content {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding: 16px;
		background-color: #ffffff;
		max-height: 260px;
		overflow-y: auto;
	}

	& .threejs-editor-page__tabs {
		display: flex;
		background-color: #ffffff;
		overflow: auto;
	}

	& .threejs-editor-page__tabs-btn {
		font-weight: 500;
		font-size: 10px;
		line-height: 18px;
		letter-spacing: 0%;
		padding: 8px 16px;
		display: none;
		align-items: center;
		justify-content: center;
		font-family: inherit !important;
		transition: all 0.3s ease;
		white-space: nowrap;
		width: 100%;

		@media (max-width: 767px) {
			display: flex;
		}

		&.active {
			color: #6767ff;
			box-shadow: inset 0 -2px 0 0 #6767ff;
		}
	}

	& .threejs-editor-page__tab {
		flex-grow: 1;

		@media (max-width: 767px) {
			display: none;

			&.active {
				display: flex;
			}
		}
	}

	&
		.threejs-editor-page__summary
		.threejs-editor-page__dropdown-drawer-content {
		max-height: 255px;
	}

	& .threejs-editor-page__dropdown-drawer-header-title {
		font-weight: 600;
		font-size: 18px;
		line-height: 24px;
		color: #2c2c2c;
	}

	& .threejs-editor-page__dropdown:not(:last-of-type) > button {
		border-right: 1px solid #dbdadf;
	}

	& .threejs-editor-page__dropdown {
		flex-grow: 1;

		& > button {
			position: relative;
			z-index: 2;
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 8px;
			font-family: inherit !important;
			font-weight: 500;
			font-size: 14px;
			line-height: 1.2;
			color: #232323;
			background-color: #fff;
			outline: 0;
			cursor: pointer;
			padding: 25px 16px 24px;
			width: 100%;
			height: 100%;
			transition: color 0.35s ease;
			will-change: color;
			border-top: 1px solid #dbdadf;

			&::after {
				position: absolute;
				content: '';
				display: block;
				width: 0;
				height: 2px;
				left: 0;
				bottom: 0;
				background-color: #6767FF;
				transition:
					width 0.35s ease,
					opacity 0.35s ease;
				will-change: width, opacity;
				opacity: 0;
			}

			& path {
				transition: stroke 0.35s ease;
				will-change: stroke;
			}

			@media (max-width: 767px) {
				gap: 8px;
				font-size: 11px;
				padding: 13px 16px 12px;
			}

			&.active {
				color: #6767FF;

				& path {
					stroke: #6767FF;
				}

				&::after {
					width: 100%;
					opacity: 1;

					@media (max-width: 767px) {
						display: none;
					}
				}
			}
		}
	}
}

.hat-pattern {
	display: inline-flex;
	align-self: flex-start;
	border: 1px solid #dbdadf;
	border-radius: 8px;
	padding: 4px;
	cursor: pointer;
	gap: 8px;
}

canvas#threejs-canvas {
	width: 100%;
	height: 100%;
}

#loading-screen {
	position: absolute;
	z-index: 10;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #ffffff;
	opacity: 1;
	transition: 1s opacity;
}

#loading-screen.fade-out {
	opacity: 0;
	pointer-events: none;
}

#loader {
	color: #ffffff;
	font-size: 3rem;
	font-weight: 600;
}

.canvas-container {
	display: none;
	position: absolute !important;
	top: 35% !important;
	left: 25% !important;
	transform: translate(-50%, -50%);
	overflow: hidden;
	@media (max-width: 1439px) {
		top: 20% !important;
		left: 50% !important;
		transform: translate(-50%, -50%);
	}
	& > .upper-canvas {
		border: 2px dashed #2c2c2c;
		border-radius: 8px;
	}
}

.canvas-container.show {
	display: block;
}

.canvas-container.loading::before {
	content: 'processing...';
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background-color: #2c2c2c;
	color: #ffffff;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
	opacity: 0.75;
	text-transform: uppercase;
	border-radius: 8px;
}

.canvas-container.Print {
	width: 300px !important;
	height: 150px !important;
	& > canvas {
		width: 300px !important;
		height: 150px !important;
	}
}

.canvas-container.Embroidery {
	width: 300px !important;
	height: 150px !important;
	& > canvas {
		width: 300px !important;
		height: 150px !important;
	}
}

.hat-modal {
	display: none;
	align-items: center;
	justify-content: center;
	position: fixed;
	padding: 16px;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(44, 44, 44, 0.5);
}

.hat-modal__content {
	background-color: #fff;
	border-radius: 8px;
	max-width: 400px;
	width: 100%;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	animation: fadeIn 0.3s;
	overflow-y: auto;
	max-height: 90vh;
}

.hat-modal__content-body-save-design {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	letter-spacing: 0%;
	color: #2C2C2C;
}

.hat-modal__content-body-save-design-header {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 18px;
	line-height: 24px;
	letter-spacing: 0%;
	color: #2C2C2C;
}

.hat-modal__content-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 16px;
	border-bottom: 1px solid #dbdadf;
}

.hat-modal__content-body-select {
	width: auto;
	border-radius: 8px;
	border-width: 1px;
	padding-top: 10px;
	padding-right: 40px;
	padding-bottom: 10px;
	padding-left: 12px;
	border-color: #dbdadf;
	font-family: inherit !important;
	font-weight: 500;
	font-size: 16px;
	line-height: 24px;
	letter-spacing: 0;
	color: #2c2c2c;
	margin: 0;
	background-image: none;
}

.hat-modal__content-body-select-wrapper {
	position: relative;
}

.hat-modal__content-body-select-wrapper svg {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%) rotate(90deg);
	color: #2c2c2c;
}

.hat-modal__content-body-wrapper {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 8px;
}

.hat-modal__content-header-title {
	font-weight: 500;
	font-size: 18px;
	line-height: 24px;
	color: #2c2c2c;
}

.hat-modal__content-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
}

.hat-modal__close {
	background-color: transparent;
	border: 0;
	outline: 0;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hat-modal__content-footer {
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	border-top: 1px solid #dbdadf;
}

.hat-modal__content-body-text {
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #2c2c2c;
}

.hat-modal--big .hat-modal__content {
	max-width: 600px;
}

.hat-modal--big .hat-modal__content-header {
	padding: 24px;
}

.hat-modal--big .hat-modal__content-footer {
	padding: 24px;
}

.hat-modal--big .hat-modal__content-body {
	padding: 24px;
}

.hat-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: inherit !important;
	font-weight: 500;
	font-size: 11px;
	line-height: 16px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #1f9971;
	background: #1f99711a;
	border-radius: 4px;
	padding: 2px 12px;
	width: 222px;
	@media (width < 768px){
		width: 207px;
	}
}

.hat-badge:empty {
	display: none;
}

/* Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.version {
	position: absolute;
	color: white;
	background-color: red;
	top: 0;
	left: 0;
	z-index: 9999;
}

#priceTable {
	border: 1px solid #dbdadf;
	overflow-x: auto;
	border-radius: 8px;

	& > ul {
		margin: 0;
		display: grid;
		list-style: none;
		color: #2c2c2c;
		grid-template-columns: 220px repeat(1, 1fr);

		& > li {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 12px 16px;
			border-right: 1px solid #dbdadf;
			border-bottom: 1px solid #dbdadf;

			&:last-of-type {
				border-right: 0;
			}
		}

		&:first-of-type > li {
			font-weight: 400;
			font-size: 16px;
			line-height: 24px;
		}

		&:last-of-type > li {
			border-bottom: 0;
		}
	}
}

.hide {
	display: none !important;
}

canvas {
	touch-action: none;
	-ms-touch-action: none;
}

.layer-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100px;
}

/* Styles for complex colors in the palette */
.complex-color-sample {
	display: flex;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #dbdadf;
}

.color-part-front {
	flex: 1;
	height: 100%;
}

.color-part-back {
	flex: 1;
	height: 100%;
}

.color-part-visor {
	flex: 1;
	height: 100%;
}

/* Styles for a selected complex color */
.selected-complex-color {
	display: flex;
	width: 20px;
	height: 20px;
	border-radius: 4px;
	overflow: hidden;
}

.selected-color-part-front,
.selected-color-part-back,
.selected-color-part-visor {
	flex: 1;
	height: 100%;
}

@keyframes anime-btn-loading {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
