/* DTF Customizer — frontend editor styles */

.dtfc-app {
	--dtfc-accent: #3582c4;
	--dtfc-ok: #1a7f37;
	--dtfc-warn: #9a6700;
	--dtfc-err: #cf222e;
	font-size: 15px;
	line-height: 1.5;
}

.dtfc-loading,
.dtfc-error {
	padding: 24px;
	text-align: center;
}

.dtfc-error {
	color: var(--dtfc-err);
}

/* Lite credit link */
.dtfc-badge {
	display: block;
	margin: 10px auto 0;
	text-align: center;
	font-size: 11px;
	color: #757575;
	text-decoration: none;
}
.dtfc-badge:hover {
	text-decoration: underline;
}

/* Picker */
.dtfc-picker {
	max-width: 960px;
	margin: 0 auto;
	padding: 24px 0;
	text-align: center;
}

.dtfc-picker-title {
	margin: 0 0 4px;
	font-size: 26px;
	font-weight: 700;
}

.dtfc-picker-sub {
	margin: 0 0 24px;
	color: #57606a;
}

.dtfc-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
	text-align: left;
}

.dtfc-card {
	display: flex;
	flex-direction: column;
	padding: 0;
	border: 1px solid #e0e3e7;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
	text-align: left;
	/* The card is a <button>: undo theme button typography/colors so the
	   title never inherits e.g. white-on-white from the active theme. */
	color: #1f2328;
	font: inherit;
	line-height: inherit;
	transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.dtfc-card:hover,
.dtfc-card:focus-visible {
	border-color: var(--dtfc-accent, #3582c4);
	box-shadow: 0 6px 18px rgba(20, 24, 30, 0.12);
	transform: translateY(-2px);
}

.dtfc-card-img {
	aspect-ratio: 4 / 3;
	background: #f4f6f8;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	box-sizing: border-box;
}

.dtfc-card-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dtfc-card-body {
	flex: 1;
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.dtfc-card-title {
	color: #1f2328;
	font-weight: 600;
	font-size: 16px;
}

.dtfc-card-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
}

.dtfc-card-price {
	color: #57606a;
	font-size: 14px;
}

.dtfc-card-price:empty::before {
	content: '\00a0'; /* keep footer height stable when no price is set */
}

@media (max-width: 640px) {
	.dtfc-picker-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.dtfc-card-img {
		aspect-ratio: 1 / 1;
	}

	.dtfc-card-body {
		padding: 10px 12px 12px;
		gap: 4px;
	}

	.dtfc-card-title {
		font-size: 14px;
	}

	.dtfc-card-price,
	.dtfc-card-cta {
		font-size: 13px;
	}
}

.dtfc-card-cta {
	color: var(--dtfc-accent, #3582c4);
	font-weight: 600;
	font-size: 14px;
}

.dtfc-card-cta::after {
	content: ' \2192';
}

/* Back link + section labels */
.dtfc-back {
	align-self: flex-start;
	border: 0;
	background: none;
	padding: 0;
	color: var(--dtfc-accent, #3582c4);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.dtfc-back:hover {
	text-decoration: underline;
}

.dtfc-section-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #57606a;
	border-top: 1px solid #eceff2;
	padding-top: 12px;
}

/* Layout */
.dtfc-editor {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.dtfc-canvas-wrap {
	flex: 0 0 auto;
	border: 1px solid #e0e3e7;
	border-radius: 8px;
	overflow: hidden;
	background: #fafbfc;
}

.dtfc-side {
	flex: 1 1 300px;
	min-width: 280px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.dtfc-title {
	margin: 0;
}

/* Zone cards */
.dtfc-zone {
	border: 1px solid #e0e3e7;
	border-radius: 8px;
	padding: 12px 14px;
}

.dtfc-zone-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.dtfc-zone-name {
	font-weight: 600;
}

.dtfc-zone-hint {
	color: #6a737d;
	font-size: 13px;
	margin: 2px 0 8px;
}

.dtfc-dpi {
	font-size: 12px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

.dtfc-dpi-ok {
	background: #dafbe1;
	color: var(--dtfc-ok);
}

.dtfc-dpi-low {
	background: #ffebe9;
	color: var(--dtfc-err);
}

.dtfc-upload-btn {
	width: 100%;
	padding: 8px 12px;
	border: 1px dashed var(--dtfc-accent);
	border-radius: 6px;
	background: #f3f8fc;
	color: var(--dtfc-accent);
	cursor: pointer;
	font-weight: 600;
}

.dtfc-upload-btn:hover {
	background: #e7f1f9;
}

/* Placement preset chips */
.dtfc-presets {
	display: flex;
	gap: 6px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.dtfc-chip {
	padding: 4px 10px;
	border: 1px solid #d0d7de;
	border-radius: 999px;
	background: #fff;
	color: #24292f;
	font-size: 13px;
	cursor: pointer;
}

.dtfc-chip:hover {
	border-color: var(--dtfc-accent);
	color: var(--dtfc-accent);
}

.dtfc-chip-on {
	border-color: var(--dtfc-accent);
	background: #f3f8fc;
	color: var(--dtfc-accent);
	font-weight: 600;
}

/* Decoration method */
.dtfc-methods {
	display: flex;
	gap: 14px;
	align-items: center;
	flex-wrap: wrap;
	font-size: 14px;
}

.dtfc-methods-label {
	font-weight: 600;
}

.dtfc-method {
	display: inline-flex;
	gap: 5px;
	align-items: center;
	cursor: pointer;
}

/* Guest fields */
.dtfc-guest {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.dtfc-guest input {
	padding: 9px 12px;
	border: 1px solid #d0d7de;
	border-radius: 6px;
	font-size: 15px;
}

/* Messages */
.dtfc-msg {
	min-height: 1em;
	font-size: 14px;
}

.dtfc-msg-warn {
	color: var(--dtfc-warn);
}

.dtfc-msg-error {
	color: var(--dtfc-err);
}

.dtfc-msg-ok {
	color: var(--dtfc-ok);
}

.dtfc-ack {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-size: 14px;
	cursor: pointer;
}

/* Buttons */
.dtfc-continue {
	padding: 12px 18px;
	border: 0;
	border-radius: 6px;
	background: var(--dtfc-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.dtfc-continue:disabled {
	background: #a8c7e0;
	cursor: not-allowed;
}

.dtfc-upsell-btn {
	padding: 10px 16px;
	border: 1px solid var(--dtfc-accent);
	border-radius: 6px;
	background: #fff;
	color: var(--dtfc-accent);
	font-weight: 600;
	cursor: pointer;
}

/* Done state */
.dtfc-done {
	max-width: 480px;
	margin: 0 auto;
	text-align: center;
	padding: 32px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.dtfc-done-check {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--dtfc-ok, #1a7f37);
	color: #fff;
	font-size: 26px;
	line-height: 48px;
}

.dtfc-done img {
	max-width: 360px;
	width: 100%;
	border: 1px solid #e0e3e7;
	border-radius: 8px;
}

.dtfc-done-msg {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
}

.dtfc-done-sub {
	margin: 0;
	color: #57606a;
}

.dtfc-cart-btn {
	display: inline-block;
	margin-top: 4px;
	padding: 12px 24px;
	border-radius: 8px;
	background: var(--dtfc-accent, #3582c4);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
}

.dtfc-cart-btn:hover {
	filter: brightness(1.08);
}

/* Upsell modal */
.dtfc-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(20, 24, 30, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
}

.dtfc-modal {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 28px;
	max-width: 440px;
	width: calc(100% - 40px);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.dtfc-modal textarea {
	min-height: 90px;
	padding: 10px 12px;
	border: 1px solid #d0d7de;
	border-radius: 6px;
	resize: vertical;
}

.dtfc-modal-close {
	position: absolute;
	top: 8px;
	right: 12px;
	border: 0;
	background: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #6a737d;
}

.dtfc-hidden {
	display: none !important;
}

@media (max-width: 720px) {
	.dtfc-editor {
		flex-direction: column;
	}

	.dtfc-canvas-wrap {
		width: 100%;
	}
}

/* ---------------- Layers (Pro) ---------------- */
.dtfc-layers { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.dtfc-layer { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid #e2e6ea; border-radius: 6px; cursor: pointer; background: #fff; }
.dtfc-layer:hover { border-color: var(--dtfc-accent, #3582c4); }
.dtfc-layer-on { border-color: var(--dtfc-accent, #3582c4); box-shadow: 0 0 0 1px var(--dtfc-accent, #3582c4) inset; }
.dtfc-layer img { width: 32px; height: 32px; object-fit: contain; background: #f4f6f8; border-radius: 4px; flex: none; }
.dtfc-layer-dpi { font-size: 11px; color: #666; margin-right: auto; }
.dtfc-layer-btn { border: 0; background: none; cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 4px; color: #555; }
.dtfc-layer-btn:hover { color: #111; }

/* Gang sheet bar */
.dtfc-sheetbar { margin: 0 0 14px; }
.dtfc-sheet-info { font-size: 14px; font-weight: 600; color: var(--dtfc-accent, #3582c4); margin: 6px 0 10px; }
.dtfc-sheetbar .dtfc-upload-btn { background: #fff; color: var(--dtfc-accent, #3582c4); border: 1px solid var(--dtfc-accent, #3582c4); }
.dtfc-sheetbar .dtfc-upload-btn:hover { background: rgba(53,130,196,0.08); }
