/* Flyer and door hanger maker (koira.ai/tools/flyer-maker, /tools/door-hanger-maker,
   /tools/<trade>-flyer-template). Loaded after tools.css and extra.css. Colours only from the
   site's own tokens (site.css); type is the page's Google Sans throughout. */

.pm-dim{font-weight:500;opacity:.7;margin-left:4px}

/* The preview: the piece on a soft stage inside the green answer card. */
.pm-stage{display:flex;justify-content:center;align-items:flex-start;padding:18px;border-radius:20px;background:rgba(255,255,255,.16)}
.pm-prev{display:block;width:100%;height:auto;max-width:520px;box-shadow:0 10px 30px rgba(0,0,0,.22);background:#fff}
.pm-stage.hanger .pm-prev{width:auto;max-width:100%;max-height:640px;background:transparent}
.pm-opts{display:flex;flex-direction:column;gap:10px}
.pm-opts .tl-tg{color:#fff;font-size:14.5px}
.pm-opts .tl-tg i{background:rgba(255,255,255,.35)}

/* Logo picker. */
.pm-logo{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.pm-logo .tx-file{min-height:96px;width:180px;flex:none}
.pm-logo .tx-file img{height:52px;object-fit:contain;background:none}
.pm-link{flex:none;border:0;background:none;padding:6px 0;font:inherit;font-size:14.5px;font-weight:600;color:var(--g1);cursor:pointer;text-decoration:underline;text-underline-offset:3px}

/* Photo picker: library photos, your own, or none. */
.pm-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.pm-photos button,.pm-own{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;aspect-ratio:4/3;padding:0;border:0;border-radius:14px;overflow:hidden;background:var(--off);box-shadow:inset 0 0 0 1.5px rgba(16,16,18,.16);cursor:pointer;font:inherit;font-size:13.5px;font-weight:600;color:#2c2c2c;min-width:0}
.pm-photos img{width:100%;height:100%;object-fit:cover;display:block}
.pm-photos button[aria-pressed="true"],.pm-own.on{box-shadow:0 0 0 3px var(--g2)}
.pm-photos button:focus-visible,.pm-own:focus-within{outline:2px solid var(--g1);outline-offset:2px}
.pm-own input{position:absolute;opacity:0;width:1px;height:1px}
.pm-own i{font-style:normal;font-size:22px;line-height:1;color:var(--gd)}
.pm-none{color:var(--dim)}

/* Colour swatches. */
.pm-sw{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.pm-sw button{flex:none;width:30px;height:30px;padding:0;border:0;border-radius:50%;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(16,16,18,.18)}
.pm-sw button[aria-pressed="true"]{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--g1)}
.pm-cpick{position:relative;display:inline-flex;align-items:center;gap:8px;flex:none;height:34px;padding:0 12px 0 6px;border-radius:999px;background:#f2f2f0;font-size:14px;font-weight:600;color:#2c2c2c;cursor:pointer}
.pm-cpick input{width:24px;height:24px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer}
.pm-cpick input::-webkit-color-swatch-wrapper{padding:0}
.pm-cpick input::-webkit-color-swatch{border:0;border-radius:50%}

/* The postcard link. */
.pm-cta{display:flex;flex-direction:column;gap:4px;padding:16px 18px;border-radius:18px;background:#fff;color:#2c2c2c}
.pm-cta b{font-weight:600;font-size:16px;color:var(--gd)}
.pm-cta span{font-size:14px;line-height:1.4;color:var(--dim)}
.pm-cta:hover b{text-decoration:underline;text-underline-offset:3px}

/* Printing: only the sheet, at the piece's own page size (set inline with @page). */
.pm-sheet{display:none}
@media print{
  body.pm-printing>*:not(.pm-sheet){display:none!important}
  body.pm-printing{margin:0!important;padding:0!important;background:#fff!important}
  body.pm-printing .pm-sheet{display:flex!important;flex-wrap:nowrap;margin:0;padding:0}
  .pm-sheet img{display:block;flex:none;break-inside:avoid}
}

@media (max-width:600px){
  .pm-stage{padding:12px}
  .pm-stage.hanger .pm-prev{max-height:520px}
  .pm-logo .tx-file{width:100%}
}
