.tk-personalizer,
.tk-personalizer *,
.tk-personalizer *::before,
.tk-personalizer *::after,
.tk-ai-designer,
.tk-ai-designer *,
.tk-ai-designer *::before,
.tk-ai-designer *::after {
	box-sizing: border-box;
}

.tk-personalizer {
	clear: both;
	flex: 0 0 100%;
	margin: 0 0 1rem;
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.tk-personalizer[hidden],
.tk-personalizer [hidden],
.tk-ai-designer[hidden],
.tk-ai-designer [hidden] {
	display: none !important;
}

.tk-personalizer__card {
	background: #fff;
	border: 1px solid rgba(86, 48, 133, .2);
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(35, 24, 48, .04);
	max-width: 100%;
	padding: 18px;
}

.tk-personalizer__header {
	margin: 0 0 14px;
}

.tk-personalizer__title,
.tk-personalizer__subtitle,
.tk-ai-designer__title,
.tk-ai-designer__section-title {
	color: #231830;
	display: block;
	line-height: 1.3;
	margin: 0;
}

.tk-personalizer__title {
	font-size: clamp(1.2rem, 2.2vw, 1.5rem);
	font-weight: 700;
}

.tk-personalizer__subtitle,
.tk-ai-designer__title {
	font-size: 1rem;
	font-weight: 700;
}

.tk-personalizer__intro,
.tk-personalizer__note,
.tk-ai-designer__description {
	color: rgba(35, 24, 48, .76);
	line-height: 1.5;
	margin: 6px 0 0;
}

.tk-personalizer__methods {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0 0 14px;
}

.tk-personalizer__method {
	align-items: center;
	appearance: none;
	background: #fff;
	border: 1px solid rgba(86, 48, 133, .25);
	border-radius: 8px;
	color: #3d2854;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 600;
	gap: 7px;
	justify-content: center;
	line-height: 1.3;
	min-height: 44px;
	padding: 9px 12px;
	text-align: center;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
	width: 100%;
}

.tk-personalizer__method:hover:not(:disabled) {
	border-color: #563085;
}

.tk-personalizer__method[aria-selected="true"] {
	background: rgba(86, 48, 133, .13);
	border-color: #563085;
	box-shadow: inset 0 -4px #ec691f, 0 1px 4px rgba(86, 48, 133, .16);
	color: #563085;
	font-weight: 700;
}

.tk-personalizer__method:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.tk-personalizer__method:focus-visible,
.tk-personalizer__select-file:focus-visible,
.tk-personalizer__asset-action:focus-visible,
.tk-ai-designer .button:focus-visible,
.tk-personalizer__text input:focus-visible,
.tk-personalizer__text textarea:focus-visible,
.tk-ai-designer__prompt:focus-visible {
	outline: 3px solid rgba(236, 105, 31, .35);
	outline-offset: 2px;
}

.tk-personalizer__visual-panel {
	max-width: 100%;
	min-width: 0;
}

.tk-personalizer__dropzone {
	align-items: center;
	background: rgba(86, 48, 133, .025);
	border: 1.5px dashed rgba(86, 48, 133, .35);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	justify-content: center;
	margin-top: 10px;
	min-height: 112px;
	padding: 16px;
	text-align: center;
}

.tk-personalizer__dropzone.is-dragover {
	background: rgba(86, 48, 133, .08);
	border-color: #563085;
}

.tk-personalizer__dropzone.is-variation-disabled {
	background: rgba(86, 48, 133, .018);
	border-color: rgba(86, 48, 133, .2);
	cursor: not-allowed;
	opacity: .58;
}

.tk-personalizer__dropzone.is-variation-disabled .tk-personalizer__select-file {
	cursor: not-allowed;
}

.tk-personalizer__select-file {
	background: #563085 !important;
	border-color: #563085 !important;
	border-radius: 7px !important;
	color: #fff !important;
	cursor: pointer;
	font-weight: 600;
	margin: 0 !important;
	min-height: 40px;
	padding: 8px 16px !important;
}

.tk-personalizer__select-file:hover {
	background: #47266f !important;
	border-color: #47266f !important;
}

.tk-personalizer__dropzone-hint,
.tk-personalizer__upload-counter,
.tk-personalizer__upload-status,
.tk-personalizer__character-counter,
.tk-ai-designer__allowance {
	color: rgba(35, 24, 48, .62);
	font-size: .875rem;
	line-height: 1.4;
}

.tk-personalizer__upload-counter {
	align-items: center;
	background: rgba(86, 48, 133, .08);
	border-radius: 999px;
	display: inline-flex;
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 7px 0 0;
	padding: 3px 8px;
	width: fit-content;
}

.tk-personalizer__upload-status,
.tk-personalizer__character-counter {
	margin: 6px 0 0;
}

.tk-personalizer__asset-list {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 10px 0 0;
	max-width: 100%;
	padding: 0;
}

.tk-personalizer__asset {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(35, 24, 48, .11);
	border-radius: 8px;
	display: grid;
	gap: 10px;
	grid-template-columns: auto 72px minmax(0, 1fr) auto;
	max-width: 100%;
	min-width: 0;
	padding: 10px;
}

.tk-personalizer__asset-position {
	align-items: center;
	background: rgba(86, 48, 133, .08);
	border-radius: 999px;
	color: #563085;
	display: inline-flex;
	font-size: .75rem;
	font-weight: 700;
	height: 24px;
	justify-content: center;
	width: 24px;
}

.tk-personalizer__asset-thumb,
.tk-personalizer__asset-file-icon {
	background: #f4f1f7;
	border: 1px solid rgba(86, 48, 133, .1);
	border-radius: 6px;
	height: 72px;
	width: 72px;
}

.tk-personalizer__asset-thumb {
	display: block;
	object-fit: cover;
}

.tk-personalizer__asset-file-icon {
	align-items: center;
	color: #563085;
	display: flex;
	font-size: .75rem;
	font-weight: 800;
	justify-content: center;
	letter-spacing: .04em;
}

.tk-personalizer__asset-details {
	display: block;
	max-width: 100%;
	min-width: 0;
}

.tk-personalizer__asset-label,
.tk-personalizer__asset-details strong,
.tk-personalizer__asset-details small {
	display: block;
	max-width: 100%;
}

.tk-personalizer__asset-label {
	color: #563085;
	font-size: .75rem;
	font-weight: 700;
	margin-bottom: 2px;
}

.tk-personalizer__asset-details strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tk-personalizer__asset-details small {
	color: rgba(35, 24, 48, .62);
	margin-top: 2px;
}

.tk-personalizer__asset-actions,
.tk-personalizer__asset-primary-actions,
.tk-personalizer__asset-reorder-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.tk-personalizer__asset-actions {
	align-items: flex-end;
	flex-direction: column;
}

.tk-personalizer__asset-action {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(86, 48, 133, .22);
	border-radius: 6px;
	color: #563085;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: .78rem;
	justify-content: center;
	line-height: 1.2;
	min-height: 30px;
	padding: 5px 8px;
}

.tk-personalizer__asset-action:hover:not(:disabled) {
	background: rgba(86, 48, 133, .06);
	border-color: #563085;
}

.tk-personalizer__asset-action--move {
	font-size: 1rem;
	min-width: 32px;
	padding-left: 7px;
	padding-right: 7px;
}

.tk-personalizer__asset-action:disabled {
	cursor: not-allowed;
	opacity: .38;
}

.tk-personalizer__error,
.tk-personalizer__field-error,
.tk-ai-designer__error {
	background: rgba(179, 45, 46, .06);
	border-left: 3px solid #b32d2e;
	border-radius: 5px;
	color: #8f2425;
	font-size: .9rem;
	line-height: 1.4;
	margin: 0 0 12px;
	padding: 8px 10px;
}

.tk-personalizer__error-icon {
	margin-right: 5px;
}

.tk-personalizer__text {
	border-top: 1px solid rgba(86, 48, 133, .12);
	margin-top: 16px;
	padding-top: 14px;
}

.tk-personalizer__required {
	background: rgba(236, 105, 31, .1);
	border-radius: 999px;
	color: #a84610;
	font-size: .68rem;
	font-weight: 700;
	margin-left: 6px;
	padding: 3px 7px;
	text-transform: uppercase;
	vertical-align: middle;
}

.tk-personalizer__text input,
.tk-personalizer__text textarea,
.tk-ai-designer__prompt {
	background: #fff;
	border: 1px solid rgba(35, 24, 48, .2);
	border-radius: 7px;
	box-shadow: none;
	display: block;
	font: inherit;
	margin: 9px 0 0;
	max-width: 100%;
	padding: 10px 12px;
	width: 100%;
}

.tk-personalizer__text textarea,
.tk-ai-designer__prompt {
	resize: vertical;
}

.tk-ai-designer {
	clear: both;
	margin: 0;
	max-width: 100%;
	min-width: 0;
}

.tk-ai-designer:not(.tk-ai-designer--embedded) {
	margin-bottom: 1rem;
}

.tk-ai-designer__section-title {
	margin: 0 0 10px;
}

.tk-ai-designer__panel {
	border: 1px solid rgba(86, 48, 133, .14);
	border-radius: 8px;
	padding: 14px;
}

.tk-ai-designer--embedded .tk-ai-designer__panel {
	border: 0;
	border-radius: 0;
	padding: 0;
}

.tk-ai-designer__description {
	margin-top: 5px;
}

.tk-ai-designer__allowance {
	margin: 7px 0 0;
}

.tk-ai-designer__references {
	background: rgba(86, 48, 133, .035);
	border: 1px solid rgba(86, 48, 133, .14);
	border-radius: 8px;
	margin-top: 12px;
	padding: 11px;
}

.tk-ai-designer__reference-heading {
	align-items: flex-start;
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

.tk-ai-designer__reference-title {
	color: #231830;
	display: block;
	font-weight: 700;
}

.tk-ai-designer__reference-description {
	color: rgba(35, 24, 48, .7);
	font-size: .86rem;
	line-height: 1.4;
	margin: 3px 0 0;
}

.tk-ai-designer__reference-counter {
	background: rgba(86, 48, 133, .09);
	border-radius: 999px;
	color: #563085;
	flex: 0 0 auto;
	font-size: .75rem;
	font-weight: 700;
	padding: 3px 8px;
}

.tk-ai-designer__reference-list {
	display: grid;
	gap: 7px;
	margin-top: 9px;
}

.tk-ai-designer__reference-item {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(35, 24, 48, .11);
	border-radius: 7px;
	display: grid;
	gap: 9px;
	grid-template-columns: 62px minmax(0, 1fr) auto;
	padding: 8px;
}

.tk-ai-designer__reference-thumb {
	background: #f4f1f7;
	border-radius: 6px;
	height: 62px;
	object-fit: cover;
	width: 62px;
}

.tk-ai-designer__reference-details,
.tk-ai-designer__reference-details strong,
.tk-ai-designer__reference-details small {
	display: block;
	min-width: 0;
}

.tk-ai-designer__reference-details small {
	color: rgba(35, 24, 48, .62);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tk-ai-designer__reference-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.tk-ai-designer__reference-action {
	font-size: .78rem !important;
	min-height: 30px;
}

.tk-ai-designer__reference-add {
	border-radius: 7px !important;
	display: inline-flex !important;
	font-weight: 600 !important;
	margin: 9px 0 0 !important;
}

.tk-ai-designer__reference-add.disabled {
	cursor: not-allowed;
	opacity: .5;
}

.tk-ai-designer__reference-status {
	font-size: .86rem;
	margin-top: 6px;
}

.tk-ai-designer__prompt {
	min-height: 82px;
}

.tk-ai-designer__generate {
	background: #563085 !important;
	border-color: #563085 !important;
	border-radius: 7px !important;
	color: #fff !important;
	font-weight: 600 !important;
	margin: 9px 0 0 !important;
	min-height: 40px;
}

.tk-ai-designer__generate:hover:not(:disabled) {
	background: #47266f !important;
	border-color: #47266f !important;
}

.tk-ai-designer__status {
	font-size: .9rem;
	margin-top: 8px;
}

.tk-ai-designer__error {
	margin-top: 8px;
}

.tk-ai-designer__preview {
	margin-top: 12px;
	max-width: 430px;
}

.tk-ai-designer__image-frame {
	align-items: center;
	background: #f6f3f8;
	border: 1px solid rgba(86, 48, 133, .12);
	border-radius: 8px;
	display: flex;
	justify-content: center;
	overflow: hidden;
	width: 100%;
}

.tk-ai-designer__image {
	display: block;
	height: auto;
	max-height: 430px;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.tk-ai-designer__actions {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 9px;
}

.tk-ai-designer__actions .button {
	border-radius: 7px !important;
	margin: 0 !important;
	min-height: 40px;
	white-space: normal;
	width: 100%;
}

.tk-ai-designer__selected {
	align-items: center;
	background: rgba(24, 123, 50, .08);
	border: 1px solid rgba(24, 123, 50, .2);
	border-radius: 6px;
	color: #176b2d;
	display: flex;
	font-size: .9rem;
	font-weight: 650;
	margin: 10px 0 0;
	padding: 8px 10px;
}

.tk-ai-designer[aria-busy="true"] .tk-ai-designer__prompt {
	opacity: .7;
}

.tk-ai-cart-preview,
.tk-ai-cart-thumbnail,
.tk-personalizer-cart-thumbnail {
	height: auto;
	max-width: 100%;
}

@media (max-width: 480px) {
	.tk-personalizer__card {
		border-radius: 8px;
		padding: 13px;
	}

	.tk-personalizer__header {
		margin-bottom: 11px;
	}

	.tk-personalizer__methods {
		gap: 6px;
	}

	.tk-personalizer__method {
		font-size: .84rem;
		min-height: 46px;
		padding: 7px 6px;
	}

	.tk-personalizer__dropzone {
		min-height: 104px;
		padding: 13px 10px;
	}

	.tk-personalizer__asset {
		gap: 8px;
		grid-template-columns: 24px 60px minmax(0, 1fr);
		padding: 8px;
	}

	.tk-personalizer__asset-thumb,
	.tk-personalizer__asset-file-icon {
		height: 60px;
		width: 60px;
	}

	.tk-personalizer__asset-actions {
		align-items: center;
		flex-direction: row;
		grid-column: 1 / -1;
		justify-content: space-between;
		width: 100%;
	}

	.tk-personalizer__asset-primary-actions,
	.tk-personalizer__asset-reorder-actions {
		flex-wrap: nowrap;
	}

	.tk-personalizer__asset-action {
		min-height: 34px;
	}

	.tk-ai-designer__actions {
		grid-template-columns: 1fr;
	}

	.tk-ai-designer__reference-heading {
		align-items: flex-start;
	}

	.tk-ai-designer__reference-item {
		grid-template-columns: 56px minmax(0, 1fr);
	}

	.tk-ai-designer__reference-thumb {
		height: 56px;
		width: 56px;
	}

	.tk-ai-designer__reference-actions {
		grid-column: 1 / -1;
	}

	.tk-ai-designer__preview {
		max-width: 100%;
	}

	.tk-ai-designer__image {
		max-height: 360px;
	}
}

@media (max-width: 380px) {
	.tk-personalizer__method {
		font-size: .78rem;
	}

	.tk-personalizer__asset-primary-actions {
		flex-wrap: wrap;
	}
}
