/* DYMIO "Tavo dizainas" — upload, preview and add-to-cart tool. Mobile first; preview sticks
   beside the controls from 782px up. The submit button inherits the theme button styles. */

/* The page template constrains every block to contentSize (720px), which squeezes the
   canvas to ~350px. On a page that contains the tool, let the title and post content run to
   wideSize and keep the prose at reading width on the same left edge as the tool.
   Beats WordPress's `.is-layout-constrained > :where(:not(.align*))` rule on specificity. */
.dymio-page:has(.dymio-dz) > .dymio-page-title,.dymio-page:has(.dymio-dz) > .wp-block-post-content { margin-left:auto; margin-right:auto; max-width:var(--wp--style--global--wide-size,1240px); }
.dymio-page:has(.dymio-dz) > .wp-block-post-content > *:not(.dymio-dz):not(.alignwide):not(.alignfull) { margin-left:0; margin-right:auto; max-width:var(--wp--style--global--content-size,720px); }

.dymio-dz { display:grid; gap:clamp(1.5rem,4vw,3rem); margin-block:1.5rem 3rem; }
.dymio-dz [hidden] { display:none!important; }
@media (min-width:782px) { .dymio-dz { grid-template-columns:minmax(0,56fr) minmax(0,44fr); align-items:start; } .dymio-dz-preview { position:sticky; top:7rem; } }

.dymio-dz-preview { background:#fff; border:1px solid var(--dymio-line); border-radius:var(--dymio-radius); padding:.75rem; }
.dymio-dz-canvas { aspect-ratio:1; border-radius:8px; display:block; height:auto; touch-action:none; width:100%; cursor:grab; }
.dymio-dz-canvas.is-dragging { cursor:grabbing; }
.dymio-dz-hint { color:var(--dymio-ink-muted); font-size:.85rem; margin:.75rem 0 .25rem; }
.dymio-dz-toggle { font-size:.85rem; }

.dymio-dz-step { border-top:1px solid var(--dymio-line); padding-top:1.25rem; }
.dymio-dz-step + .dymio-dz-step { margin-top:1.75rem; }
.dymio-dz-step h2 { align-items:center; display:flex; font-size:1.35rem; gap:.75rem; margin:0 0 1rem; }
.dymio-dz-num { align-items:center; background:var(--dymio-lime); border-radius:999px; color:var(--dymio-charcoal); display:inline-flex; font-family:var(--dymio-sans); font-size:.75rem; font-weight:700; height:1.75rem; justify-content:center; width:1.75rem; }

.dymio-dz-products { display:grid; gap:.5rem; grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr)); }
.dymio-dz-product { background:#fff; border:1px solid var(--dymio-line); border-radius:10px; color:var(--dymio-charcoal); cursor:pointer; font:inherit; font-size:.95rem; font-weight:600; -webkit-hyphens:auto; hyphens:auto; line-height:1.25; overflow-wrap:anywhere; padding:.75rem; text-align:left; }
.dymio-dz-product:hover, .dymio-dz-colour:hover { border-color:var(--dymio-charcoal); }
.dymio-dz-product[aria-checked="true"], .dymio-dz-colour[aria-checked="true"] { border-color:var(--dymio-charcoal); box-shadow:inset 0 0 0 1px var(--dymio-charcoal); }
.dymio-dz-product small { color:var(--dymio-ink-muted); display:block; font-size:.8rem; font-weight:400; margin-top:.2rem; }

.dymio-dz-colours { display:flex; flex-wrap:wrap; gap:.5rem; }
.dymio-dz-colour { align-items:center; background:#fff; border:1px solid var(--dymio-line); border-radius:999px; color:var(--dymio-charcoal); cursor:pointer; display:inline-flex; font:inherit; font-size:.85rem; font-weight:600; gap:.5rem; min-height:2.5rem; padding:.35rem 1rem .35rem .45rem; }
.dymio-dz-swatch { border:1px solid rgba(0,0,0,.25); border-radius:999px; display:inline-block; flex-shrink:0; height:1.5rem; width:1.5rem; }

.dymio-dz-sizes { display:flex; flex-wrap:wrap; gap:.5rem; }
.dymio-dz-side-label { font-weight:600; margin:1rem 0 .5rem; }
.dymio-dz-sides { display:flex; flex-wrap:wrap; gap:.5rem; }
.dymio-dz-side { background:#fff; border:1px solid var(--dymio-charcoal); border-radius:10px; color:var(--dymio-charcoal); cursor:pointer; font:inherit; font-size:.95rem; min-height:3rem; padding:.5rem 1rem; }
.dymio-dz-side[aria-checked="true"] { background:var(--dymio-charcoal); color:var(--dymio-cream); }
.dymio-dz-side:hover:not([aria-checked="true"]) { background:var(--dymio-muted); }
/* Same look as the product page size buttons (.dymio-size-button). */
.dymio-dz-size { background:#fff; border:1px solid var(--dymio-charcoal); border-radius:10px; color:var(--dymio-charcoal); cursor:pointer; font:inherit; font-size:.95rem; font-weight:600; min-height:3rem; min-width:3.5rem; padding:.5rem .9rem; }
.dymio-dz-size:hover:not([aria-checked="true"]) { background:var(--dymio-muted); }
.dymio-dz-size[aria-checked="true"] { background:var(--dymio-charcoal); color:var(--dymio-cream); }

.dymio-dz-drop { align-items:center; background:#fff; border:1px dashed var(--dymio-charcoal); border-radius:var(--dymio-radius); cursor:pointer; display:flex; justify-content:center; min-height:5rem; padding:1rem; position:relative; text-align:center; }
.dymio-dz-drop.is-over { background:var(--dymio-muted); }
.dymio-dz-drop:focus-within { outline:2px solid var(--dymio-charcoal); outline-offset:2px; }
.dymio-dz-drop input { position:absolute; opacity:0; width:1px; height:1px; }
.dymio-dz-image-tools { align-items:center; display:flex; flex-wrap:wrap; gap:.75rem 1rem; margin-top:.75rem; }
.dymio-dz-image-tools label { align-items:center; display:flex; flex:1 1 12rem; gap:.5rem; font-size:.85rem; }
.dymio-dz-image-tools input[type=range] { accent-color:var(--dymio-charcoal); flex:1; }
.dymio-dz-image-tools button { align-items:center; background:#fff; border:1px solid var(--dymio-charcoal); border-radius:999px; color:var(--dymio-charcoal); cursor:pointer; display:inline-flex; font:inherit; font-size:.85rem; font-weight:600; min-height:2.5rem; padding:.35rem 1rem; }
.dymio-dz-image-tools button:hover { background:var(--dymio-muted); }

.dymio-dz-quality { border-left:4px solid; border-radius:0 8px 8px 0; font-size:.9rem; margin:.75rem 0 0; padding:.5rem .75rem; }
.dymio-dz-quality.is-good { border-color:#2f6b3a; color:#2f6b3a; }
.dymio-dz-quality.is-ok { border-color:#8a5a00; color:#8a5a00; }
.dymio-dz-quality.is-low { border-color:#a3261a; color:#a3261a; }

.dymio-dz-order { border-top:1px solid var(--dymio-line); display:grid; gap:.75rem; margin-top:1.75rem; padding-top:1.25rem; }
.dymio-dz-price { align-items:baseline; display:flex; gap:.75rem; margin:0; }
.dymio-dz-price span { color:var(--dymio-ink-muted); font-size:.85rem; letter-spacing:.06em; text-transform:uppercase; }
.dymio-dz-price-value { font-family:var(--dymio-display); font-size:2rem; font-weight:800; letter-spacing:-.03em; line-height:1; }
.dymio-dz-status { color:#a3261a; font-size:.9rem; margin:0; }
.dymio-dz-submit { justify-self:start; }
.dymio-dz-submit:disabled { cursor:progress; opacity:.6; }
.dymio-dz-note { color:var(--dymio-ink-muted); font-size:.8rem; margin:0; }

@media (max-width:480px) { .dymio-dz-products { grid-template-columns:1fr; } }

/* Guidance card (designer-guidance.css loads after this file, hence the extra .dymio-dz): a grey card like the rest of the site. */
.dymio-dz .dymio-dz-guidance { background:var(--dymio-muted); border:0; border-radius:var(--dymio-radius); padding:1rem 1.1rem; }
.dymio-dz .dymio-dz-guidance details { border-top-color:var(--dymio-line); }
.dymio-dz .dymio-dz-guide-scroll table { background:#fff; }
.dymio-dz .dymio-dz-guide-scroll th, .dymio-dz .dymio-dz-guide-scroll td { border-color:var(--dymio-line); }
