/* TG-UNDO-1127 (PD-4): desktop parity + undo/redo. Scoped to #tees-studio.tgundo. Preview ?tgundo=p1127. */
@media (min-width:1024px){
  /* header Undo / Redo, next to the logo */
  #tees-studio.tgundo.tgdx .ts-top .tgun-hd{display:flex;align-items:center;gap:4px;flex:0 0 auto;margin:0 6px 0 10px;padding:3px;border:1px solid #e7e8ec;border-radius:12px;background:#fff}
  #tees-studio.tgundo.tgdx .tgun-b{display:flex;align-items:center;justify-content:center;width:34px;height:34px;margin:0;padding:0;border:0;border-radius:9px;background:transparent;color:#16243E;cursor:pointer;transition:background .15s,color .15s}
  #tees-studio.tgundo.tgdx .tgun-b svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
  #tees-studio.tgundo.tgdx .tgun-b:not(:disabled):hover{background:#fdecec;color:#E6010B}
  #tees-studio.tgundo.tgdx .tgun-b:focus-visible{outline:2px solid #E6010B;outline-offset:1px}
  #tees-studio.tgundo.tgdx .tgun-b:disabled{color:#b9bcc4;cursor:default}
  #tees-studio.tgundo.tgdx .tgun-b.is-hit{background:#E6010B;color:#fff}
  /* the old bottom-right Undo / Redo pair is replaced by the header pair on desktop (kept in the DOM for the core) */
  #tees-studio.tgundo.tgdx .ts-stage .ts-ur{display:none!important}
  /* Studio is a creative space: no quantity / price pill in the desktop header (same as mobile) */
  #tees-studio.tgundo.tgdx .ts-top .tgdd-qty{display:none!important}
  /* selection toolbar wider than the header: scroll arrows + fade */
  #tees-studio.tgundo.tgdx .ts-top .tgdk-bar{scrollbar-width:none}
  #tees-studio.tgundo.tgdx .ts-top .tgdk-bar::-webkit-scrollbar{display:none}
  #tees-studio.tgundo.tgdx .tgun-sa{position:absolute;top:50%;transform:translateY(-50%);z-index:9;display:flex;align-items:center;justify-content:center;width:26px;height:40px;margin:0;padding:0;border:1px solid #e7e8ec;border-radius:9px;background:#fff;color:#16243E;box-shadow:0 2px 8px rgba(22,36,62,.14);cursor:pointer}
  #tees-studio.tgundo.tgdx .tgun-sa[hidden]{display:none!important}
  #tees-studio.tgundo.tgdx .tgun-sa svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  #tees-studio.tgundo.tgdx .tgun-sa:hover{color:#E6010B;border-color:#E6010B}
  /* Templates in the left rail when the product has templates (mobile has them in the add row) */
  #tees-studio.tgundo.tgdx.tgdd .tgdx-rail [data-dx="templates"].tgun-tpl{display:flex!important}
  /* template sheet: overlay shares the class name "tgzn-tp" with template tiles (108px tall), so on desktop it showed as a strip at the bottom */
  #tees-studio.tgundo.tgdx .tgzn-ov.tgzn-tp{align-items:center}
  #tees-studio.tgundo.tgdx .tgzn-ov.tgzn-tp>.tgzn-card{max-width:760px;max-height:86vh}
  /* house styles: all styles visible on desktop (no sideways swipe with a mouse) */
  #tees-studio.tgundo.tgdx>.tgcol-bar{width:318px}
  #tees-studio.tgundo.tgdx>.tgcol-bar .tgcol-styles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:5px}
  #tees-studio.tgundo.tgdx>.tgcol-bar .tgcol-sty{min-width:0;padding-right:4px}
  #tees-studio.tgundo.tgdx>.tgcol-bar .tgcol-sty span{min-width:0;overflow:hidden}
  #tees-studio.tgundo.tgdx>.tgcol-bar .tgcol-sty b,#tees-studio.tgundo.tgdx>.tgcol-bar .tgcol-sty small{overflow:hidden;text-overflow:ellipsis;max-width:100%}
  #tees-studio.tgundo.tgdx>.tgcol-bar .tgcol-sty:hover,#tees-studio.tgundo.tgdx>.tgcol-bar .tgcol-chip:hover{border-color:#9aa0aa}
}
/* template sheet overlay: it shares the class "tgzn-tp" with the 108px template tiles, so it showed as a 108px strip at the bottom (mobile + desktop) */
#tees-studio.tgundo .tgzn-ov.tgzn-tp{position:fixed;inset:0;height:auto;padding:0;border-radius:0;overflow:visible;background:rgba(0,0,0,.45);flex-direction:row;align-items:flex-end;justify-content:center;gap:0;line-height:inherit;font-weight:inherit}
/* mobile: existing top Undo / Redo keep their look; a brand-red tap flash when used */
#tees-studio.tgundo:not(.tgdx) .ts-ur .ts-ib:not(:disabled):active{color:#E6010B!important;border-color:#E6010B!important}
