/* Personalizzatore targhetta - Premiazioni e Regali */

.prt-wrap {
	margin: 18px 0 22px;
	border: 1px solid #e2e4e8;
	border-radius: 6px;
	background: #fbfbfc;
	font-size: 15px;
	line-height: 1.5;
	color: #3c3950;
}

.prt-head {
	padding: 14px 16px;
}

.prt-toggle {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	cursor: pointer;
	font-weight: 400;
}

.prt-toggle input {
	margin: 3px 0 0;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.prt-body {
	padding: 0 16px 16px;
	border-top: 1px solid #ecedf1;
}

.prt-hint {
	margin: 12px 0;
	font-size: 13px;
	color: #6b6880;
}

/* Nota sul formato */

.prt-nota {
	margin: -4px 0 12px;
	padding: 10px 12px;
	background: #fff8e6;
	border-left: 3px solid #e0b64a;
	font-size: 13px;
	line-height: 1.5;
	color: #6b6880;
}

/* Piano di lavoro */

.prt-stage-outer {
	position: relative;
	background: #eceef2 repeating-linear-gradient(45deg, rgba(0, 0, 0, .025) 0 8px, transparent 8px 16px);
	border-radius: 4px;
	padding: 18px;
	display: flex;
	justify-content: center;
}

.prt-stage {
	position: relative;
	max-width: 100%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='8' height='8' fill='%23f0f0f0'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23f0f0f0'/%3E%3C/svg%3E");
}

.prt-stage canvas {
	display: block;
	width: 100%;
	height: auto;
	touch-action: none;
	cursor: grab;
}

.prt-stage canvas.prt-dragging {
	cursor: grabbing;
}

/* Comandi */

.prt-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
	margin-top: 16px;
}

.prt-block {
	background: #fff;
	border: 1px solid #e6e7ec;
	border-radius: 5px;
	padding: 12px 14px;
}

.prt-block h4 {
	margin: 0 0 8px;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #8a879c;
}

.prt-block input[type="text"],
.prt-block input[type="file"],
.prt-block select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 14px;
}

.prt-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

.prt-row label,
.prt-inline {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #6b6880;
	margin: 0;
}

.prt-row input[type="range"] {
	width: 120px;
}

.prt-inline {
	margin-right: 14px;
}

.prt-mini {
	border: 1px solid #d5d7de;
	background: #fff;
	color: #3c3950;
	border-radius: 3px;
	padding: 5px 10px;
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
}

.prt-mini:hover {
	background: #f3f4f7;
}

.prt-mini.prt-danger {
	color: #a8253a;
	border-color: #e6c3ca;
}

.prt-status {
	margin: 12px 0 0;
	min-height: 1.4em;
	font-size: 13px;
	color: #6b6880;
}

.prt-status.prt-error {
	color: #a8253a;
}

.prt-status.prt-ok {
	color: #2c7a4b;
}

@media (max-width: 600px) {
	.prt-stage-outer {
		padding: 10px;
	}

	.prt-controls {
		grid-template-columns: 1fr;
	}
}

/* Gli elementi nascosti restano nascosti anche dentro i blocchi flex. */
.prt-wrap [hidden] {
	display: none !important;
}

/* Avviso di attesa durante la preparazione del file. */

.prt-busy {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .9);
	border-radius: 4px;
	z-index: 5;
}

.prt-busy.prt-busy-on {
	display: flex;
}

.prt-busy-box {
	text-align: center;
	color: #3c3950;
}

.prt-busy-box strong {
	display: block;
	margin: 10px 0 2px;
	font-size: 14px;
}

.prt-busy-box span:last-child {
	font-size: 13px;
	color: #6b6880;
}

.prt-spin {
	display: inline-block;
	width: 26px;
	height: 26px;
	border: 3px solid #d7d9e0;
	border-top-color: #004a88;
	border-radius: 50%;
	animation: prt-turn .8s linear infinite;
}

@keyframes prt-turn {
	to {
		transform: rotate(360deg);
	}
}

/* Anteprima della targhetta nel carrello.
   Il tema ritaglia in quadrato le immagini del carrello: la targhetta
   deve invece restare nelle sue proporzioni. */
.prt-cart-preview {
	display: block !important;
	width: 150px !important;
	max-width: none !important;
	height: auto !important;
	aspect-ratio: auto !important;
	object-fit: contain !important;
	margin-top: 8px !important;
	border: 1px solid #e0e0e0;
	background: #fff;
}
