/* Pixel Pop tee editor. Only enqueued on the Design Editor page template. */
.tb-ed { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; margin: 1.5rem 0 3rem; }
.tb-ed__tools, .tb-ed__side { background: #fff; border: 4px solid var(--dark); box-shadow: var(--shadow); padding: .9rem; }
.tb-ed__group { padding-bottom: .85rem; margin-bottom: .85rem; border-bottom: 2px dashed var(--dark); }
.tb-ed__group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.tb-ed__toolbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.tb-ed__tool { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem .1rem; min-height: 44px; background: #fff; color: var(--dark); border: 3px solid var(--dark); cursor: pointer; font: inherit; }
.tb-ed__tool .tb-ed__label { font-size: .58rem; font-weight: 700; text-transform: uppercase; }
.tb-ed__tool[aria-pressed="true"] { background: var(--yellow); box-shadow: 3px 3px 0 var(--dark); }
.tb-ed__palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; margin-bottom: .6rem; }
.tb-ed__swatch { aspect-ratio: 1; min-height: 32px; border: 3px solid var(--dark); cursor: pointer; padding: 0; }
.tb-ed__swatch[aria-pressed="true"] { outline: 3px solid var(--pink); outline-offset: 1px; }
.tb-ed button:focus-visible, .tb-ed input:focus-visible, .tb-ed select:focus-visible, .tb-ed__shirtopt input:focus-visible + span { outline: 3px solid var(--purple); outline-offset: 2px; }
.tb-ed__field { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 700; margin-bottom: .55rem; }
.tb-ed__field input[type="color"] { width: 100%; height: 40px; padding: 0; border: 3px solid var(--dark); background: #fff; }
.tb-ed__field input[type="text"], .tb-ed__field input[type="number"], .tb-ed__field select { padding: .5rem; border: 3px solid var(--dark); font: inherit; border-radius: 0; background: #fff; min-height: 40px; }
.tb-ed__field input[type="range"] { width: 100%; min-height: 32px; accent-color: var(--pink); }
.tb-ed__check { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; margin-bottom: .45rem; }
.tb-ed__check input { width: 20px; height: 20px; margin-top: .1rem; accent-color: var(--pink); flex: none; }
.tb-ed__hint { font-size: .75rem; color: #555; margin: .35rem 0 0; }
.tb-ed__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.tb-ed__actions .btn { flex: 1 1 40%; text-align: center; }
.tb-ed .btn:disabled { opacity: .45; cursor: not-allowed; }

.tb-ed__stage { min-width: 0; }
.tb-ed__canvaswrap { position: relative; width: 100%; max-width: 600px; margin: 0 auto; aspect-ratio: 5 / 6; border: 4px solid var(--dark); box-shadow: var(--shadow);
	background: #fff conic-gradient(#e8e8f0 25%, #fff 0 50%, #e8e8f0 0 75%, #fff 0) 0 0 / 24px 24px; touch-action: none; }
.tb-ed__canvaswrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#tb-canvas { image-rendering: auto; }
.tb-ed.is-grid #tb-canvas { image-rendering: pixelated; }
#tb-overlay { touch-action: none; cursor: crosshair; }

.tb-ed__shirt { position: relative; width: 100%; max-width: 300px; margin: 0 auto 1rem; }
.tb-ed__shirtsvg { display: block; width: 100%; height: auto; }
.tb-ed__shirtbody { fill: var(--shirt); stroke: var(--dark); stroke-width: 6; stroke-linejoin: round; transition: fill .2s; }
.tb-ed__collar { stroke: var(--dark); stroke-width: 5; }
.tb-ed__preview { position: absolute; left: 30%; top: 16%; width: 40%; height: auto; aspect-ratio: 5 / 6; pointer-events: none; }
.tb-ed.is-grid .tb-ed__preview { image-rendering: pixelated; }
.tb-ed__fs { border: 0; padding: 0; margin: 0 0 .7rem; }
.tb-ed__fs legend { font-size: .8rem; font-weight: 700; margin-bottom: .4rem; padding: 0; }
.tb-ed__shirtcolours { display: flex; flex-wrap: wrap; gap: .4rem; }
.tb-ed__shirtopt { position: relative; cursor: pointer; }
.tb-ed__shirtopt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tb-ed__shirtopt span:not(.screen-reader-text) { display: block; width: 36px; height: 36px; border: 3px solid var(--dark); }
.tb-ed__shirtopt input:checked + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.tb-ed__row { display: grid; grid-template-columns: 1fr 90px; gap: .6rem; }
.tb-ed__price { font-family: var(--font-pixel); font-size: .85rem; margin: .4rem 0 .8rem; }
.tb-ed__price small { font-family: var(--font-body); font-size: .75rem; color: #555; }
.tb-ed__rights { padding: .6rem; background: var(--yellow); border: 3px solid var(--dark); font-weight: 600; }
.tb-ed__form .btn { width: 100%; text-align: center; margin-top: .4rem; }
.tb-ed__status { min-height: 1.3em; font-size: .85rem; margin: .5rem 0 0; font-weight: 700; }
.tb-ed__status.is-error { color: #c0123c; }
.tb-ed__warn { background: var(--yellow); border: 3px solid var(--dark); padding: .7rem; }

@media (max-width: 1100px) {
	.tb-ed { grid-template-columns: 230px minmax(0, 1fr); }
	.tb-ed__side { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1rem; align-items: start; }
	.tb-ed__shirt { margin-bottom: 0; }
}
@media (max-width: 760px) {
	.tb-ed { grid-template-columns: 1fr; gap: 1rem; }
	.tb-ed__stage { order: 1; }
	.tb-ed__tools { order: 0; }
	.tb-ed__side { order: 2; grid-template-columns: 1fr; }
	.tb-ed__toolbar { grid-template-columns: repeat(4, 1fr); }
	.tb-ed__tool { min-height: 52px; }
	.tb-ed__palette { grid-template-columns: repeat(6, 1fr); }
	.tb-ed__swatch { min-height: 40px; }
	.tb-ed__shirt { max-width: 260px; }
}
