/* Lanyard designer (/design-your-lanyard/). Reuses .step, .chips, .tiers, .field and .estimate from style.css */
.dz { padding: 8px 0 72px; }
.dz__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.dz__stage { position: sticky; top: calc(var(--header-h) + 12px); }
.dz__canvas { position: relative; height: min(calc(100vh - var(--header-h) - 76px), 780px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #f4f2f7; }
.dz__canvas canvas { display: block; width: 100%; height: 100%; }
.dz__views { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 2px; padding: 3px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 18px -10px rgba(43,23,82,.5); }
.dz__views button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--purple-ink); font-weight: 600; font-size: .86rem; white-space: nowrap; cursor: pointer; }
.dz__views button:hover { background: var(--lilac); }
.dz__views button.is-on { background: var(--purple); color: #fff; }
.dz__note { margin: 8px 2px 0; font-size: .82rem; color: var(--muted); }

.dz__panel { min-width: 0; }
.dz__head h1 { font-size: var(--step-4); margin-bottom: .3em; }
.dz__head p { color: var(--muted); margin-bottom: 8px; }
.dz .step { margin-top: 32px; }
.dz form.step { display: block; }
.dz .step .field { margin-bottom: 16px; }
.dz .fields .field { margin-bottom: 0; }
.dz-hint { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.dz-hint[hidden], .dz-limit__used[hidden], .dz-limit__warn[hidden], .dz-logo__on[hidden], .dz-logo[hidden], .dz-check[hidden], .opt-group[hidden] { display: none; }

/* Lanyard types */
.dz-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dz-type { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.dz-type:hover { border-color: var(--purple); }
.dz-type input { position: absolute; opacity: 0; pointer-events: none; }
.dz-type img, .dz-type__blank { width: 58px; height: 58px; flex: none; object-fit: cover; border-radius: 6px; background: var(--lilac); }
.dz-type__blank { display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--purple); }
.dz-type__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dz-type__text strong { font-size: .94rem; }
.dz-type__text small { font-size: .78rem; color: var(--muted); }
.dz-type__text .dz-type__price { color: var(--purple); font-weight: 600; }
.dz-type:has(input:checked) { border-color: var(--purple); background: var(--lilac); box-shadow: inset 0 0 0 1px var(--purple); }
.dz-type:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Colour limit */
.dz-limit { margin-top: 12px; padding: 12px 14px; background: var(--lilac); border-radius: 10px; font-size: .92rem; }
.dz-limit p { margin: 0; }
.dz-limit__max { font-weight: 700; }
.dz-limit__method { color: var(--muted); font-size: .86rem; }
.dz-limit__used { margin-top: 6px !important; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dz-limit__used span { margin-right: 4px; }
.dz-limit__used i, .dz-chips-mini span { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(30,22,51,.25); }
.dz-limit__warn { margin-top: 10px; padding: 10px 12px; background: #FFF7D6; border: 1px solid #F4DC85; border-radius: 8px; }
.dz-limit__warn .btn { margin-top: 8px; }

/* Colours */
.dz-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 6px; }
.dz-swatches button { aspect-ratio: 1; width: 100%; padding: 0; border: 1px solid rgba(30,22,51,.25); border-radius: 8px; cursor: pointer; }
.dz-swatches button.is-on { outline: 3px solid var(--purple); outline-offset: 2px; }
.dz-swatches--small { grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); }
.dz-custom { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dz-picker { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 6px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; cursor: pointer; }
.dz-picker input { width: 34px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; }
.dz-pms { flex: 1 1 170px; }
.dz-pms input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 1rem; }

.dz-row { display: flex; gap: 12px; align-items: flex-end; }
.dz-row .field { flex: 1 1 0; min-width: 0; }
.dz-row--even .field input[type=range] { width: 100%; min-height: 32px; accent-color: var(--purple); }
.dz-toggles { display: flex; gap: 4px; margin-bottom: 16px; }
.dz-toggles button { width: 46px; height: 46px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-size: 1.1rem; cursor: pointer; }
.dz-toggles button.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }

/* Logo */
.dz-logo__on { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; }
.dz-logo__on > img { width: 72px; height: 48px; object-fit: contain; flex: none; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 12px 12px; border-radius: 4px; }
.dz-logo__on > div { flex: 1 1 auto; min-width: 0; }
.dz-logo__name { margin: 0; font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.dz-chips-mini { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }

.dz-pdf { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.dz-pdf[aria-busy=true] { opacity: .6; }
.dz form .step__legend { margin-bottom: 8px; }
.dz form [data-form-alert] { margin: 12px 0; }
.dz form .fields { margin-top: 14px; }
.page-designer .trust { margin-top: 18px; }

/* Phones and small tablets: the proof stays in view while the choices scroll underneath */
@media (max-width: 960px) {
  .page-designer .site-header { position: static; }
  .page-designer .topbar { display: none; }
  .dz { padding-top: 0; }
  .dz__grid { display: block; padding-inline: 0; max-width: none; }
  .dz__stage { top: 0; z-index: 30; background: #fff; box-shadow: 0 8px 18px -14px rgba(43,23,82,.6); }
  .dz__canvas { height: 40vh; height: 40svh; min-height: 230px; border-width: 0 0 1px; border-radius: 0; }
  .dz__views { bottom: 8px; }
  .dz__views button { min-height: 34px; padding: 0 11px; font-size: .8rem; }
  .dz__note { display: none; }
  .dz__panel { padding: 16px 16px 88px; }
  .dz__head h1 { font-size: var(--step-3); }
  .dz__head p { font-size: .95rem; }
  .dz-type { gap: 8px; padding: 6px; }
  .dz-type img, .dz-type__blank { width: 44px; height: 44px; }
  .page-designer .crumbs { display: none; }
}
@media (max-width: 380px) {
  .dz-types { grid-template-columns: 1fr; }
  .dz__views button { padding: 0 9px; }
}
@media (min-width: 961px) { .page-designer .mobile-bar { display: none; } }
