.jkw dialog {box-sizing:border-box; width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border:0; padding:0; background:white; color:#171717}
.jkw dialog[open] {display:flex; flex-direction:column; position:fixed; inset:0}
.jkw dialog section {display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; padding:.55rem}
.jkw .jkw-editor section:has(> span:empty):has(> .jkw-cancel-copy[hidden]) {display:none}
.jkw dialog iframe {width:100%; flex:1; min-height:0; border:0}
.jkw [hidden] {display:none!important}

.jkw-proof {overflow:auto; flex:1; padding:1rem; min-height:0}
.jkw-proof img {display:block; width:auto; max-width:100%; height:auto; margin:1rem auto}
.jkw-proof p {color:#714600}

.jkw-list, .jkw-cart-copies {container-type:inline-size;display:grid;gap:.75rem;margin-block:.8rem}
.jkw-design {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:.75rem;border-top:1px solid #ccc;padding-top:.75rem}
.jkw-design-preview {justify-self:start;min-width:0;max-width:100%;display:block;padding:0;background:white;cursor:zoom-in}
.jkw-design-preview img {max-width:100%;object-fit:contain}
.jkw-design label {display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}
.jkw-design label input {width:4rem;box-sizing:border-box}
.jkw-design strong {overflow-wrap:anywhere}
.jkw-design > button:last-child {justify-self:start}
@container (min-width: 36rem) {
  .jkw-design {grid-template-columns:auto minmax(0,1fr) auto auto}
}
.jkw-proof img,.jkw-view img {object-fit:contain;max-height:76dvh}
.jkw-view div {overflow:auto;min-height:0;padding:.75rem}
.jkw-view img {display:block;max-width:100%;height:auto;margin:0 auto 1rem}
.jkw-view button {align-self:flex-start;margin:.5rem}
form.cart:has(.jkw) .quantity[hidden] {display:none!important}

form.cart .jkw {flex:1 1 100%;min-width:0;max-width:100%}
.jkw-list:empty, .jkw-cart-copies:empty {display:none}
.jkw-actions {display:flex;flex-wrap:wrap;gap:.5rem .75rem;align-items:stretch}
form.cart .jkw-actions > button {box-sizing:border-box;float:none;margin:0;max-width:100%;width:auto;white-space:nowrap}
.jkw-actions .jkw-status {flex-basis:100%;margin:0;text-align:start}
.jkw-actions .jkw-status:empty {display:none}
form.cart .jkw {container-type:inline-size}
.jkw-heading {display:flex;align-items:baseline;flex-wrap:wrap;gap:.4rem 1rem}
.jkw-heading h3 {margin:0}
.jkw-design > div {display:grid;justify-items:start}
form.cart .jkw .jkw-link {
  display:inline-block;width:auto;height:auto;min-height:24px;min-width:0;
  padding:0;margin:0;border:0;background:transparent;color:#202428;box-shadow:none;
  font:inherit;text-transform:none;text-align:start;text-decoration:underline;cursor:pointer;
}
.jkw-actions {flex-direction:column;align-items:flex-start}
@container (max-width:35.99rem) {
  .jkw-design {grid-template-columns:auto minmax(0,1fr) auto;gap:.4rem .65rem}
  .jkw-design-preview {grid-row:span 2}
  .jkw-design > div {grid-column:2 / -1}
  form.cart .jkw-actions > :is(.jkw-open,.single_add_to_cart_button) {width:100%}
}
form.cart .jkw-account-invite {margin:20px 0 1rem;line-height:1.5}
form.cart .jkw-account-invite p {margin:.35em 0}
form.cart .jkw-account-invite a {color:#202428;font-weight:600;text-decoration:underline;text-underline-offset:.15em}

form.cart:has(.jkw:not([data-cart-ready="yes"])) .single_add_to_cart_button {display:none!important}

.jkw .jkw-editor[data-restore] iframe {visibility:hidden}
.jkw .jkw-editor[data-restore] > section {
  position:absolute; inset:0; z-index:1; background:white; color:#222;
  display:flex; flex-direction:column; justify-content:center;
  text-align:center; padding:1.5rem;
}
.jkw .jkw-editor[data-restore] > section > span {font-size:1.1rem;font-weight:600}
.jkw .jkw-editor[data-restore="loading"] button,
.jkw .jkw-editor[data-restore="error"] button {order:1}
.jkw .jkw-editor[data-restore="loading"] > section > span::after {
  content:"";display:inline-block;width:1.35em;height:.4em;margin-inline-start:.2em;
  background:radial-gradient(circle,currentColor 45%,transparent 52%) left center / .45em 100% repeat-x;
  animation:jkw-restore-dots 1.35s step-end infinite;
}
@keyframes jkw-restore-dots {
  0% {clip-path:inset(0 66.666% 0 0)}
  33% {clip-path:inset(0 33.333% 0 0)}
  66% {clip-path:inset(0)}
}
@media (prefers-reduced-motion:reduce) {
  .jkw .jkw-editor[data-restore="loading"] > section > span::after {animation:none}
}
