/* Bees TeeCraft Designer — editor styles (scoped to .btd-*) */
.btd-editor, .btd-overlay {
	--btd-ink: #1d1a16;
	--btd-ink-2: #4a443c;
	--btd-muted: #857c70;
	--btd-line: #e7e1d6;
	--btd-bg: #faf8f4;
	--btd-panel: #ffffff;
	--btd-stage: #efebe3;
	--btd-honey: #f2a900;
	--btd-honey-d: #d18f00;
	--btd-honey-l: #fff4d6;
	--btd-ok: #2b8a3e;
	--btd-warn: #c27c0e;
	--btd-bad: #c92a2a;
	--btd-r: 10px;
	--btd-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.btd-editor { position: relative; display: flex; flex-direction: column; height: min(860px, 92vh); min-height: 560px; background: var(--btd-bg); color: var(--btd-ink); font: 14px/1.4 var(--btd-font); border: 1px solid var(--btd-line); border-radius: 14px; overflow: hidden; box-sizing: border-box; outline: none; text-align: left; }
.btd-editor *, .btd-editor *::before, .btd-editor *::after { box-sizing: border-box; }
.btd-editor button { font: inherit; color: inherit; cursor: pointer; letter-spacing: normal; text-transform: none; line-height: 1.2; box-shadow: none; margin: 0; }
.btd-editor svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btd-editor h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; color: var(--btd-ink); }
.btd-editor h4 { font-size: 12px; margin: 14px 0 8px; color: var(--btd-ink-2); }
.btd-editor [hidden] { display: none !important; }
.btd-muted { color: var(--btd-muted); }
.btd-small { font-size: 12px; }
.btd-center-text { text-align: center; margin: 8px 0 0; }

/* header */
.btd-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--btd-ink); color: #fff; }
.btd-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.btd-logo svg { width: 28px; height: 28px; }
.btd-brand-name { font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.btd-product-name { color: #bdb4a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; border-left: 1px solid #4a443c; }
.btd-header-tools { display: flex; align-items: center; gap: 4px; }
.btd-header .btd-ib { color: #fff; }
.btd-header .btd-ib:hover:not(:disabled) { background: #3a342c; }
.btd-sep { width: 1px; height: 20px; background: var(--btd-line); margin: 0 4px; display: inline-block; }
.btd-header .btd-sep { background: #4a443c; }

/* buttons */
.btd-ib { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; padding: 0; }
.btd-ib:hover:not(:disabled) { background: var(--btd-honey-l); }
.btd-ib:disabled { opacity: .35; cursor: default; }
.btd-ib.is-active { background: var(--btd-honey); color: var(--btd-ink); }
.btd-ib-sm { width: 26px; height: 26px; }
.btd-ib-sm svg { width: 14px; height: 14px; }
.btd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border: 1px solid var(--btd-line); border-radius: 9px; background: #fff; font-weight: 600; text-decoration: none; color: var(--btd-ink); }
.btd-btn:hover:not(:disabled) { border-color: var(--btd-honey); }
.btd-btn:disabled { opacity: .45; cursor: not-allowed; }
.btd-btn svg { width: 15px; height: 15px; }
.btd-btn-primary { background: var(--btd-honey); border-color: var(--btd-honey); color: var(--btd-ink); }
.btd-btn-primary:hover:not(:disabled) { background: var(--btd-honey-d); border-color: var(--btd-honey-d); }
.btd-btn-danger { color: var(--btd-bad); }
.btd-btn-sm { padding: 6px 10px; font-size: 12px; }
.btd-btn-lg { padding: 13px 18px; font-size: 16px; }
.btd-btn-lg svg { width: 20px; height: 20px; }
.btd-block { display: flex; width: 100%; }
.btd-link { border: 0; background: none; color: var(--btd-honey-d); font-size: 12px; padding: 0 4px; text-decoration: underline; }
.btd-editor a.btd-btn-primary, .btd-editor a.btd-btn-primary:visited { color: var(--btd-ink); }

/* layout */
.btd-body { flex: 1; display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; min-height: 0; }
.btd-left { display: grid; grid-template-columns: 72px minmax(0, 1fr); border-right: 1px solid var(--btd-line); background: var(--btd-panel); min-height: 0; }
.btd-tabs { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-right: 1px solid var(--btd-line); background: #fbfaf7; }
.btd-tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border: 0; border-radius: 9px; background: transparent; font-size: 11px; font-weight: 600; color: var(--btd-ink-2); }
.btd-tabs button:hover { background: var(--btd-honey-l); }
.btd-tabs button.is-active { background: var(--btd-ink); color: #fff; }
.btd-tabs button:disabled { opacity: .35; cursor: default; background: transparent; }
.btd-tabs button.is-active svg { color: var(--btd-honey); }
.btd-tab-ic svg { width: 21px; height: 21px; }
.btd-panes { overflow-y: auto; min-height: 0; }
.btd-pane { padding: 14px; }
.btd-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--btd-stage); }
.btd-stagebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; min-height: 48px; background: rgba(255,255,255,.65); border-bottom: 1px solid var(--btd-line); }
.btd-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; }
.btd-zoom { display: flex; align-items: center; gap: 2px; }
.btd-zoom-lbl { font-size: 12px; min-width: 40px; text-align: center; color: var(--btd-ink-2); font-variant-numeric: tabular-nums; }
.btd-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.btd-canvas { display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.btd-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--btd-line); background: rgba(255,255,255,.65); }
.btd-views { display: flex; gap: 8px; overflow-x: auto; }
.btd-view { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 6px 3px; border: 2px solid transparent; border-radius: 10px; background: #fff; font-size: 11px; font-weight: 600; color: var(--btd-ink-2); }
.btd-view canvas { width: 46px; height: 55px; }
.btd-view.is-active { border-color: var(--btd-honey); color: var(--btd-ink); }
.btd-dot { position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--btd-honey); box-shadow: 0 0 0 2px #fff; }
.btd-area-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.btd-right { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--btd-line); background: var(--btd-bg); min-height: 0; }
.btd-card { background: var(--btd-panel); border: 1px solid var(--btd-line); border-radius: var(--btd-r); padding: 14px; }
.btd-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.btd-color-name { font-size: 12px; color: var(--btd-ink-2); }

/* swatches */
.btd-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.btd-swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); padding: 0; position: relative; }
.btd-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--btd-ink); }
.btd-swatch.is-oos { opacity: .3; cursor: not-allowed; }
.btd-swatch.is-oos::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--btd-bad); transform: rotate(45deg); }
.btd-swatch-sm { width: 20px; height: 20px; }
.btd-mini-sw { display: flex; gap: 4px; flex-wrap: wrap; flex-basis: 100%; margin-top: 6px; }

/* sizes */
.btd-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.btd-size { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--btd-line); border-radius: 9px; background: #fff; }
.btd-size.is-oos { opacity: .45; }
.btd-size-l { font-weight: 700; font-size: 13px; }
.btd-size-up { font-size: 10px; color: var(--btd-muted); }
.btd-qty { width: 100%; text-align: center; padding: 6px 4px; border: 1px solid var(--btd-line); border-radius: 7px; font: inherit; font-variant-numeric: tabular-nums; background: #fff; color: var(--btd-ink); }
.btd-qty:focus { outline: 2px solid var(--btd-honey); outline-offset: 0; }

/* price */
.btd-card-price { position: sticky; bottom: 0; }
.btd-price { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.btd-pr { display: flex; justify-content: space-between; gap: 10px; }
.btd-pr-sub { font-size: 12px; color: var(--btd-ink-2); }
.btd-pr-disc { font-size: 12px; color: var(--btd-ok); font-weight: 600; }
.btd-pr-unit { padding-top: 6px; border-top: 1px dashed var(--btd-line); }
.btd-pr-total { font-size: 18px; padding-top: 6px; border-top: 1px solid var(--btd-line); }
.btd-pr-total strong { font-size: 22px; }
.btd-pr-hint { font-size: 12px; background: var(--btd-honey-l); color: #7a5300; border-radius: 6px; padding: 5px 8px; text-align: center; }

/* forms */
.btd-input { width: 100%; padding: 8px 10px; border: 1px solid var(--btd-line); border-radius: 8px; font: inherit; background: #fff; color: var(--btd-ink); }
.btd-input:focus, .btd-textarea:focus { outline: 2px solid var(--btd-honey); outline-offset: -1px; border-color: transparent; }
.btd-textarea { resize: vertical; min-height: 64px; margin-bottom: 10px; font-size: 15px; }
.btd-num { width: 92px; flex: none; }
.btd-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.btd-row > .btd-lbl { flex: 0 0 100px; margin: 0; }
.btd-row > .btd-input:not(.btd-num) { flex: 1; min-width: 0; }
.btd-row-tools { gap: 4px; }
.btd-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--btd-ink-2); margin: 8px 0 4px; }
.btd-check { display: inline-flex !important; align-items: center; gap: 6px; flex: 0 0 auto !important; cursor: pointer; }
.btd-range { flex: 1; min-width: 80px; accent-color: var(--btd-honey-d); }
.btd-color { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--btd-line); border-radius: 7px; background: #fff; }
.btd-tg { min-width: 34px; height: 32px; border: 1px solid var(--btd-line); border-radius: 7px; background: #fff; font-weight: 700; }
.btd-tg.is-active { background: var(--btd-ink); color: #fff; border-color: var(--btd-ink); }
.btd-tg:disabled { opacity: .35; }
.btd-props-h { display: flex; align-items: baseline; justify-content: space-between; }
.btd-readout { font-size: 12px; color: var(--btd-muted); font-variant-numeric: tabular-nums; }

/* panes content */
.btd-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.btd-chip { padding: 5px 11px; border: 1px solid var(--btd-line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; }
.btd-chip.is-active { background: var(--btd-ink); color: #fff; border-color: var(--btd-ink); }
.btd-tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btd-tpl { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--btd-line); border-radius: 10px; background: #fff; text-align: left; }
.btd-tpl:hover { border-color: var(--btd-honey); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.btd-tpl img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 6px; background: var(--btd-stage); }
.btd-tpl-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 6; background: var(--btd-stage); border-radius: 6px; font-size: 11px; padding: 6px; text-align: center; }
.btd-tpl-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btd-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btd-preset { padding: 14px 8px; border: 1px solid var(--btd-line); border-radius: 10px; background: #fff; font-size: 20px; }
.btd-preset:hover { border-color: var(--btd-honey); }
.btd-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; border: 2px dashed #d8cfbf; border-radius: 12px; background: #fffdf8; text-align: center; cursor: pointer; }
.btd-drop:hover, .btd-drop.is-over { border-color: var(--btd-honey); background: var(--btd-honey-l); }
.btd-drop-ic svg { width: 30px; height: 30px; color: var(--btd-honey-d); }
.btd-tip { display: flex; gap: 8px; margin: 12px 0; padding: 10px; border-radius: 9px; background: #f6f2ea; font-size: 12px; color: var(--btd-ink-2); }
.btd-tip svg { width: 16px; height: 16px; color: var(--btd-warn); }
.btd-uploads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.btd-up { aspect-ratio: 1; padding: 6px; border: 1px solid var(--btd-line); border-radius: 9px; background: repeating-conic-gradient(#f3efe8 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.btd-up img { width: 100%; height: 100%; object-fit: contain; }
.btd-layer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.btd-layer { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; border: 1px solid var(--btd-line); border-radius: 9px; background: #fff; cursor: pointer; }
.btd-layer.is-active { border-color: var(--btd-honey); background: var(--btd-honey-l); }
.btd-layer.is-hidden .btd-layer-name { opacity: .45; text-decoration: line-through; }
.btd-layer.is-over { box-shadow: inset 0 2px 0 var(--btd-honey); }
.btd-layer-ic svg { width: 15px; height: 15px; color: var(--btd-ink-2); }
.btd-layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.btd-layer-warn svg { width: 14px; height: 14px; color: var(--btd-warn); }

/* badges / DPI */
.btd-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-left: 4px; }
.btd-badge svg { width: 12px; height: 12px; }
.btd-badge-ok { background: #e6f4ea; color: var(--btd-ok); }
.btd-badge-warn { background: #fff3db; color: var(--btd-warn); }
.btd-badge-bad { background: #ffe3e3; color: var(--btd-bad); }
.btd-dpi { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 9px; margin-bottom: 12px; font-size: 12px; }
.btd-dpi strong { font-size: 15px; }
.btd-dpi-ok { background: #e6f4ea; color: #1e6b31; }
.btd-dpi-warn { background: #fff3db; color: #8a5a00; }
.btd-dpi-bad { background: #ffe3e3; color: #a51f1f; }

/* toasts / busy / modal */
.btd-toasts { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 30; width: min(460px, calc(100% - 24px)); pointer-events: none; }
.btd-toast { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 10px 14px; border-radius: 10px; background: var(--btd-ink); color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.18); pointer-events: auto; transition: opacity .3s, transform .3s; font-size: 13px; }
.btd-toast .btd-ib { color: #fff; }
.btd-toast-error { background: var(--btd-bad); }
.btd-toast-warn { background: #8a5a00; }
.btd-toast-ok { background: #1e6b31; }
.btd-toast.is-out { opacity: 0; transform: translateY(6px); }
.btd-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(250,248,244,.7); z-index: 40; font-weight: 600; }
.btd-spinner { width: 22px; height: 22px; border: 3px solid var(--btd-line); border-top-color: var(--btd-honey); border-radius: 50%; animation: btd-spin .8s linear infinite; }
@keyframes btd-spin { to { transform: rotate(360deg); } }
.btd-modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(29,26,22,.55); z-index: 50; }
.btd-modal-box { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 22px; border-radius: 14px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.btd-modal-x { position: absolute; top: 10px; right: 10px; }
.btd-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.btd-issues { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.btd-issues li { display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.btd-issue-warn { background: #fff3db; color: #6d4700; }
.btd-issue-bad { background: #ffe3e3; color: #8f1d1d; }
.btd-steps { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.btd-steps li { display: flex; align-items: center; gap: 8px; }
.btd-step-ic { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--btd-line); flex: none; }
.btd-steps .is-run .btd-step-ic { border-color: var(--btd-honey); border-top-color: transparent; animation: btd-spin .8s linear infinite; }
.btd-steps .is-done .btd-step-ic { background: var(--btd-ok); border-color: var(--btd-ok); }
.btd-steps .is-fail .btd-step-ic { background: var(--btd-bad); border-color: var(--btd-bad); }
.btd-steps .is-fail { color: var(--btd-bad); }
.btd-progress { height: 6px; border-radius: 3px; background: var(--btd-line); overflow: hidden; }
.btd-progress i { display: block; height: 100%; width: 0; background: var(--btd-honey); transition: width .2s; }
.btd-step-detail { min-height: 18px; margin-top: 6px; }
.btd-success { display: flex; gap: 12px; align-items: center; padding: 12px; margin-top: 12px; border-radius: 10px; background: #e6f4ea; }
.btd-success p { margin: 2px 0 0; }
.btd-success-ic svg { width: 28px; height: 28px; color: var(--btd-ok); stroke-width: 3; }
.btd-error { margin-top: 12px; padding: 12px; border-radius: 10px; background: #ffe3e3; color: #8f1d1d; }

/* modal overlay launch mode */
.btd-overlay { position: fixed; inset: 0; z-index: 999999; display: none; padding: 2vh 2vw; background: rgba(29,26,22,.6); }
.btd-overlay.is-open { display: block; }
.btd-overlay .btd-editor { height: 100%; max-height: none; border: 0; box-shadow: 0 20px 80px rgba(0,0,0,.35); }
html.btd-noscroll, html.btd-noscroll body { overflow: hidden !important; }
.btd-launch { display: inline-flex; align-items: center; gap: 8px; }

/* responsive */
@media (max-width: 1180px) {
	.btd-body { grid-template-columns: 300px minmax(0, 1fr) 260px; }
	.btd-row > .btd-lbl { flex-basis: 84px; }
}
@media (max-width: 900px) {
	.btd-editor { height: auto; max-height: none; min-height: 0; }
	.btd-overlay { padding: 0; }
	.btd-overlay .btd-editor { border-radius: 0; height: 100%; overflow-y: auto; }
	.btd-body { display: flex; flex-direction: column; flex: none; min-height: auto; }
	.btd-center { order: 1; flex: none; min-height: auto; }
	.btd-left, .btd-right { flex: none; min-height: auto; }
	.btd-header { position: sticky; top: 0; z-index: 5; }
	.btd-stagebar { flex-wrap: wrap; }
	.btd-stage { height: 58vh; flex: none; }
	.btd-left { order: 2; grid-template-columns: 1fr; grid-template-rows: auto auto; border-right: 0; border-top: 1px solid var(--btd-line); }
	.btd-tabs { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--btd-line); position: sticky; top: 52px; z-index: 4; }
	.btd-tabs button { padding: 8px 2px; }
	.btd-tabs button { flex: 1; }
	.btd-panes { max-height: none; }
	.btd-right { order: 3; border-left: 0; }
	.btd-product-name { display: none; }
	.btd-toasts { position: fixed; bottom: 16px; }
}
