/* ============================================================
   CANTIERI — Mockup 2D (aba "Mockup")
   Escopado em .mockup. Palco com a peça + painel de ajustes.
============================================================ */
.mockup { height:100%; }
.mockup .mk { display:flex; gap:16px; height:100%; min-height:540px; }

/* ---- palco ---- */
.mockup .mk-stage-wrap { flex:1; display:flex; flex-direction:column; min-width:0; position:relative; }
.mockup .mk-stage {
  flex:1; position:relative; display:flex; gap:16px; align-items:stretch; justify-content:center;
  background:#fff; border:1px solid var(--line-soft); border-radius:12px; overflow:hidden; min-height:0; padding:18px;
  background-image:radial-gradient(circle at 1px 1px, rgba(0,0,0,.05) 1px, transparent 0);
  background-size:22px 22px;
}
.mockup .mk-cell { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.mockup .mk-cell svg { width:100%; height:100%; display:block; }
.mockup .mk-cell canvas { max-width:100%; max-height:100%; width:auto; height:auto; display:block;
  box-shadow:0 10px 30px -12px rgba(0,0,0,.4); }
.mockup .mk-cell-lbl { font-family:var(--mono); font-size:10px; letter-spacing:.1em; color:var(--text-faint);
  background:var(--surface-2); padding:3px 12px; border-radius:20px; }
.mockup .mk-estampa { touch-action:none; }
.mockup .mk-handles { pointer-events:auto; }
.mockup .mk-handles circle { touch-action:none; }
.mockup .mk-loading { color:var(--text-faint); font-family:var(--mono); font-size:12px; }
.mockup .mk-hint {
  position:absolute; left:50%; bottom:14px; transform:translateX(-50%);
  background:rgba(20,20,20,.82); color:var(--cream); font-family:var(--mono); font-size:10.5px;
  letter-spacing:.04em; padding:6px 12px; border-radius:20px; pointer-events:none;
}

/* ---- painel ---- */
.mockup .mk-panel {
  width:320px; flex-shrink:0; background:var(--ink); border:1px solid var(--line-soft);
  border-radius:12px; display:flex; flex-direction:column; overflow:hidden;
}
.mockup .mk-head { padding:15px 18px; border-bottom:1px solid var(--line-soft); display:flex; align-items:center; gap:10px; }
.mockup .mk-head-ico {
  width:30px; height:30px; border-radius:8px; background:var(--accent-soft); border:1px solid var(--accent-line);
  display:flex; align-items:center; justify-content:center; color:var(--accent); flex-shrink:0;
}
.mockup .mk-head-t { font-size:13.5px; font-weight:600; }
.mockup .mk-head-s { font-size:11px; color:var(--text-faint); font-family:var(--mono); }
.mockup .mk-body { flex:1; overflow-y:auto; }
.mockup .mk-body::-webkit-scrollbar { width:10px; }
.mockup .mk-body::-webkit-scrollbar-thumb { background:var(--line); border-radius:5px; border:3px solid var(--ink); }

.mockup .mk-group { padding:15px 18px; border-bottom:1px solid var(--line-soft); }
.mockup .mk-group:last-child { border-bottom:none; }
.mockup .mk-group h2 {
  font-family:var(--mono); font-size:10px; letter-spacing:.13em; text-transform:uppercase;
  color:var(--text-faint); margin:0 0 12px; font-weight:500;
}
.mockup .mk-group h2 span { color:var(--text-dim); text-transform:none; letter-spacing:0; }

/* segmentado de vista */
.mockup .mk-seg { display:flex; gap:3px; background:var(--surface-2); padding:3px; border-radius:9px; }
.mockup .mk-seg button {
  flex:1; background:none; border:none; color:var(--text-dim); font-family:var(--mono); font-size:12px;
  padding:9px 4px; cursor:pointer; border-radius:6px; transition:.12s;
}
.mockup .mk-seg button.on { background:var(--accent); color:var(--ink); font-weight:600; }
.mockup .mk-seg button:hover:not(.on) { color:var(--text); }

/* swatch de cor */
.mockup .mk-swatch-row { display:flex; align-items:center; gap:11px; }
.mockup .mk-swatch {
  position:relative; width:38px; height:38px; border-radius:9px; border:1px solid var(--line);
  cursor:pointer; overflow:hidden; flex-shrink:0;
}
.mockup .mk-swatch input[type=color] {
  position:absolute; inset:-4px; width:calc(100% + 8px); height:calc(100% + 8px);
  border:none; padding:0; background:none; cursor:pointer;
}
.mockup .mk-sw-name { font-size:12.5px; font-weight:500; }
.mockup .mk-sw-hex { font-family:var(--mono); font-size:10.5px; color:var(--text-faint); margin-top:1px; }

/* botões */
.mockup .mk-btn-row { display:flex; gap:8px; }
.mockup .mk-btn-row .btn { flex:1; display:flex; align-items:center; justify-content:center; gap:7px; }
.mockup .mk-sub { font-size:11px; color:var(--text-faint); margin-top:9px; line-height:1.5; }

/* sliders */
.mockup .mk-ctrl { margin-bottom:14px; }
.mockup .mk-ctrl:last-child { margin-bottom:0; }
.mockup .mk-ctrl-lbl { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:8px; font-size:12.5px; }
.mockup .mk-ctrl-lbl .val { font-family:var(--mono); font-size:11px; color:var(--accent); }
.mockup input[type=range] {
  -webkit-appearance:none; appearance:none; width:100%; height:4px; border-radius:2px;
  background:var(--surface-3); outline:none; cursor:pointer;
}
.mockup input[type=range]::-webkit-slider-thumb {
  -webkit-appearance:none; width:14px; height:14px; border-radius:50%; background:var(--cream);
  border:3px solid var(--ink); box-shadow:0 0 0 1px var(--line); cursor:pointer;
}
.mockup input[type=range]::-webkit-slider-thumb:hover { background:var(--accent); }

/* swatch + pantone */
.mockup .mk-sw-info { flex:1; min-width:0; }
.mockup .mk-sw-name { font-size:12px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mockup .mk-pantone-btn { padding:7px 12px; flex-shrink:0; }
.mockup .mk-pantone { margin-top:12px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:10px; }
.mockup .mk-pantone input[type=text] {
  width:100%; background:var(--surface); border:1px solid var(--line); color:var(--text);
  font-family:var(--mono); font-size:12px; padding:8px 10px; border-radius:7px; margin-bottom:10px;
}
.mockup .mk-pantone input[type=text]:focus { outline:none; border-color:var(--accent-line); }
.mockup .mk-pantone-grid { display:grid; grid-template-columns:repeat(8,1fr); gap:5px; max-height:170px; overflow-y:auto; }
.mockup .mk-pantone-sw { aspect-ratio:1; border-radius:6px; border:1px solid rgba(0,0,0,.25); cursor:pointer; padding:0; transition:transform .1s; }
.mockup .mk-pantone-sw:hover { transform:scale(1.12); border-color:var(--accent); }

/* lista de estampas */
.mockup .mk-est-list { display:flex; flex-direction:column; gap:7px; margin-bottom:10px; }
.mockup .mk-empty { font-size:11.5px; color:var(--text-faint); padding:6px 2px; }
.mockup .mk-est-row { display:flex; align-items:center; gap:10px; padding:7px 8px; border:1px solid var(--line-soft);
  border-radius:9px; cursor:pointer; transition:.12s; }
.mockup .mk-est-row:hover { border-color:var(--line); }
.mockup .mk-est-row.sel { border-color:var(--accent-line); background:var(--accent-soft); }
.mockup .mk-est-thumb { width:34px; height:34px; border-radius:6px; background:#fff center/contain no-repeat;
  border:1px solid var(--line); flex-shrink:0; }
.mockup .mk-est-info { flex:1; min-width:0; }
.mockup .mk-est-name { font-size:12.5px; font-weight:500; }
.mockup .mk-est-view { font-family:var(--mono); font-size:10px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; }

/* menu de posições automáticas */
.mockup .mk-add-wrap { position:relative; }
.mockup .mk-place-menu { position:absolute; bottom:calc(100% + 6px); left:0; right:0; z-index:30;
  background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:5px;
  box-shadow:0 18px 40px -14px rgba(0,0,0,.8); max-height:260px; overflow-y:auto; }
.mockup .mk-place-opt { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
  background:none; border:none; cursor:pointer; color:var(--text); font-family:var(--sans); font-size:12.5px;
  padding:8px 10px; border-radius:7px; text-align:left; }
.mockup .mk-place-opt:hover { background:var(--surface-2); }
.mockup .mk-place-view { font-family:var(--mono); font-size:10px; color:var(--text-faint); text-transform:uppercase; }

/* responsivo */
@media (max-width:900px) {
  .mockup { flex-direction:column; height:auto; }
  .mockup .mk-panel { width:100%; }
  .mockup .mk-stage { min-height:360px; }
}
