/* SHARED UPLOADER v1.1.19 #a8a6dc75f183. Do not edit this copy: edit freshmagnets.com/uploader/src and run "npm run sync". */
/*
 * Photo uploader styles, shared by every store theme.
 *
 * Brand look comes from the --up-* variables below. A theme overrides them
 * (on .fm-up and .fm-up__modal; the modal is moved to <body> when it opens,
 * so it must carry them too). Defaults are the Fresh Magnets values, read
 * from the Fresh Magnets theme variables when they exist.
 * :where() gives these defaults zero specificity, so a theme's own
 * ".fm-up, .fm-up__modal { --up-...: ... }" wins wherever it loads.
 */
:where(.fm-up, .fm-up__modal) {
  --up-primary: var(--fm-terracotta-soft, #C2410C);   /* Upload / Done buttons */
  --up-on-primary: #fff;                               /* text on filled buttons */
  --up-accent: var(--fm-accent, #C2410C);              /* remove, errors, active outline */
  --up-brand: var(--fm-emerald, #28433A);              /* complete states, selected options */
  --up-brand-tint: rgba(40,67,58,.08);                 /* soft brand background */
  --up-ink: var(--fm-ink, #1E2A22);                    /* text */
  --up-paper: var(--fm-paper-light, #F7F4EF);          /* popup background */
  --up-surface: #fff;                                  /* boxes, inputs, option pills */
  --up-line: var(--fm-stone, #B6A089);                 /* dashed empty boxes, toggle off */
  --up-border-soft: rgba(30,42,34,.1);
  --up-border: rgba(30,42,34,.18);
  --up-border-strong: rgba(30,42,34,.2);
  --up-hairline: rgba(0,0,0,.1);
  --up-scrim: rgba(14,25,20,.55);                      /* page dimmer behind the popup */
  --up-chip: rgba(14,25,20,.62);                       /* portrait/landscape chip */
  --up-ctrl: rgba(14,25,20,.72);                       /* round photo buttons */
  --up-font: var(--fm-font-body, "Jost", sans-serif);
}

.fm-up { margin: 4px 0 14px; }
.fm-up__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fm-up__open {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--up-primary); color: var(--up-on-primary); border: 0;
  border-radius: 999px; padding: 13px 24px; font-size: 15px; font-weight: 500;
  font-family: var(--up-font); cursor: pointer; transition: opacity .15s ease;
}
.fm-up__open:hover { opacity: .9; }
.fm-up__open.is-started { background: var(--up-primary); }
.fm-up__status { font-size: 14px; opacity: .7; }
.fm-up__status.is-complete { color: var(--up-brand); font-weight: 500; opacity: 1; }
.fm-up__thumbs { margin-top: 12px; }
.fm-up__thumbslbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--up-brand); margin-bottom: 9px; }
.fm-up__thumbslbl svg { flex: 0 0 auto; }
.fm-up__thumbrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fm-up__thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--up-hairline); }
.fm-up__thumb--round { border-radius: 50%; }
.fm-up__thumb--rect { width: 44px; height: 66px; }
.fm-up__thumb--rect.fm-up__thumb--land { width: 66px; height: 44px; }
.fm-up__thumb--hidden { display: none; }
.fm-up__more { border: 1px dashed var(--up-line); background: none; border-radius: 8px; min-width: 52px; height: 52px; padding: 0 10px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--up-ink); font-family: var(--up-font); }
.fm-up__more:hover { border-color: var(--up-brand); }
.fm-up__modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.fm-up__modal[hidden] { display: none; }
.fm-up__overlay { position: absolute; inset: 0; background: var(--up-scrim); }
.fm-up__panel { position: relative; background: var(--up-paper); color: var(--up-ink); width: min(680px, 92vw); max-height: 88vh; max-height: 88dvh; overflow-y: auto; border-radius: 14px; padding: 26px 28px 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.fm-up__phead { display: flex; align-items: center; justify-content: space-between; }
.fm-up__ptitle { font-size: 24px; margin: 0; }
.fm-up__x { background: none; border: 0; color: var(--up-ink); cursor: pointer; line-height: 0; padding: 4px; }
.fm-up__psub { font-size: 14px; opacity: .8; margin: 6px 0 2px; }
.fm-up__legend { list-style: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--up-paper); font-size: 13px; line-height: 1.5; color: var(--up-ink); }
.fm-up__legend li { margin: 0; opacity: .85; }
.fm-up__legend b { display: inline-block; min-width: 1.2em; text-align: center; font-weight: 600; color: var(--up-brand); }
.fm-up__pmeta { font-size: 14px; font-weight: 500; opacity: .7; margin: 0 0 14px; }
.fm-up__pmeta.is-complete { color: var(--up-brand); opacity: 1; }
/* Wrapping flex row, not a column grid: every cell gets an explicit width
   from the column count (--fm-cols is set by the JS per pack size), so a
   landscape 2 x 3 can be 1.5 columns wide and still pack next to a portrait
   one or another landscape without leaving holes. */
.fm-up__grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; --fm-c: calc((100% - (var(--fm-cols, 3) - 1) * 12px) / var(--fm-cols, 3)); }
.fm-up__slot { position: relative; flex: 0 0 auto; width: var(--fm-c); aspect-ratio: 1 / 1; border: 2px dashed var(--up-line); border-radius: 10px; overflow: hidden; background: var(--up-surface); transition: border-color .15s ease; touch-action: none; user-select: none; }
.fm-up__tip-touch { display: none; }
/* Touch screens: a swipe that starts on a slot scrolls the uploader; photo drag and pinch
   live in the big editor (staged cell keeps touch-action: none). */
@media (pointer: coarse) {
  .fm-up__slot:not(.is-staged) { touch-action: pan-y; }
  .fm-up__tip-fine { display: none; }
  .fm-up__tip-touch { display: list-item; }
}
.fm-up__slot--round { border-radius: 50%; }
/* A photo the browser could not read: replace it (the + / swap still work). */
.fm-up__slot.is-bad, .fm-up__slot.is-filled.is-bad, .fm-up__slot.is-bad:hover { border: 3px solid #c0392b; }
/* The broken image would show its alt text over the box. */
.fm-up__slot.is-bad > img { visibility: hidden; }
.fm-up__slot.is-bad::after { content: "Add again"; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  background: #c0392b; color: #fff; font: 600 12px/1 var(--up-font, sans-serif); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.fm-up__slot--rect { aspect-ratio: 2 / 3; }
/* A 2 x 3 slot flipped to landscape. Same magnet, turned; the print file is
   rotated back to portrait on upload so the sheet template stays as tested. */
/* True scale: the portrait cell turned on its side. Width = portrait height
   (1.5 columns), height = one column. */
.fm-up__slot--rect.fm-up__slot--land { aspect-ratio: 3 / 2; width: calc(var(--fm-c) * 1.5); }
/* "Use one photo for all": only the first cell shows, two columns wide. */
.fm-up__grid--same .fm-up__slot:not(:first-child) { display: none; }
.fm-up__grid--same .fm-up__slot:first-child { width: calc(var(--fm-c) * 2 + 12px); }
.fm-up__grid--same .fm-up__slot--rect.fm-up__slot--land:first-child { width: min(100%, calc((var(--fm-c) * 2 + 12px) * 1.5)); }
.fm-up__layout { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--up-chip); z-index: 2; }
.fm-up__layoutbtn { width: 24px; height: 22px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.75); font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.fm-up__layoutbtn.is-on { background: #fff; color: var(--up-brand); }
.fm-up__layoutbtn:hover:not(.is-on) { color: #fff; }
.fm-up__slot:hover { border-color: var(--up-brand); }
.fm-up__slot.is-filled { border-style: solid; border-color: var(--up-brand); cursor: grab; }
.fm-up__slot.is-filled:active { cursor: grabbing; }
.fm-up__plus { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; font-size: 30px; line-height: 1; color: var(--up-line); }
.fm-up__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* Photo layers, zoomed by the uploader so the magnet's front fills the box. */
.fm-up__view { position: absolute; inset: 0; transform-origin: 50% 50%; pointer-events: none; }
.fm-up__slot > .fm-up__view { display: block; }
/* Behind a zoomed-out photo: what fills the empty strips (matches the print file). */
.fm-up__fill { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fm-up__fill[hidden] { display: none; }
/* Shown explicitly: themes hide empty divs (Dawn: div:empty { display: none }). */
.fm-up__view > .fm-up__fill:not([hidden]) { display: block; }
.fm-up__fill--blur { inset: -10%; background-size: cover; background-position: center; filter: blur(12px) brightness(1.12); }
/* Front of the magnet. Everything outside the line wraps around the side, so it
   is covered solid: customers see only what shows on the front (a faded edge
   read as "still visible", and photos had to be fixed by hand). The photo
   still prints there; only the preview hides it. Above the caption, so a
   caption band shows only where it shows on the magnet. */
.fm-up__safe { position: absolute; box-sizing: border-box; pointer-events: none; z-index: 2; border: 1px dashed rgba(0,0,0,.32); box-shadow: 0 0 0 999px var(--up-surface); }
/* Shown explicitly: themes often hide empty divs (Dawn: div:empty { display: none }). */
.fm-up__view > .fm-up__safe:not([hidden]) { display: block; }
.fm-up__safe[hidden] { display: none; }
.fm-up__slot--round .fm-up__safe { border-radius: 50%; }
/* Always shown on a filled photo (phones have no hover); brighter on hover. */
/* Top-left, out of the way of a caption band (usually at the bottom) and
   the layout chip (top-right). */
.fm-up__ctrls { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; opacity: .85; transition: opacity .15s ease; z-index: 2; }
.fm-up__ctrls[hidden] { display: none; }
.fm-up__slot.is-filled:hover .fm-up__ctrls { opacity: 1; }
.fm-up__ctrl { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; background: var(--up-ctrl); color: #fff; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.fm-up__ctrl:hover { background: var(--up-accent); }
.fm-up__ctrl--text { font-size: 13px; }
.fm-up__ctrl--text.is-on { background: var(--up-accent); }
.fm-up__slot.is-editing { outline: 3px solid var(--up-accent); outline-offset: 2px; }
/* Caption preview on the slot: band + centred single line, sized by JS with
   the same maths as the print file. */
.fm-up__cap { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; line-height: 1; pointer-events: none; z-index: 1; }
.fm-up__cap-line { position: absolute; left: 0; right: 0; text-align: center; white-space: nowrap; line-height: 1; }
.fm-up__cap-text--2 { margin-top: 10px; }
.fm-up__cap-opts.is-off { opacity: .4; pointer-events: none; }
/* Caption panel */
.fm-up__cap-panel { margin: 0; padding: 14px 16px 16px; border-radius: 12px; background: var(--up-surface); border: 1px solid var(--up-border-soft); }
.fm-up__cap-panel[hidden] { display: none; }
.fm-up__cap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fm-up__cap-title { font-weight: 600; font-size: 15px; }
.fm-up__cap-done { background: var(--up-brand); color: var(--up-on-primary); border: 0; border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: var(--up-font); }
.fm-up__cap-text { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 15px; border: 1px solid var(--up-border-strong); border-radius: 8px; background: var(--up-surface); font-family: var(--up-font); }
.fm-up__cap-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 10px; scrollbar-width: thin; }
.fm-up__cap-chips .fm-up__seg { flex: 0 0 auto; }
.fm-up__cap-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.fm-up__cap-lbl { flex: 0 0 64px; font-size: 12.5px; opacity: .7; line-height: 1.15; }
.fm-up__cap-help { font-size: 12px; opacity: .65; margin: 6px 0 0; }
.fm-up__cap-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-up__seg { border: 1px solid var(--up-border); background: var(--up-surface); color: var(--up-ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; font-family: var(--up-font); line-height: 1.1; }
.fm-up__seg.is-on { background: var(--up-brand); color: var(--up-on-primary); border-color: var(--up-brand); }
.fm-up__seg--font { font-size: 16px; padding: 5px 12px; }
.fm-up__seg--swatch { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--up-border); }
.fm-up__seg--swatch.is-on { border-color: var(--up-accent); box-shadow: 0 0 0 2px #fff inset; }
.fm-up__cap-color { width: 30px; height: 26px; padding: 0; border: 1px solid var(--up-border); border-radius: 6px; background: var(--up-surface); cursor: pointer; }
.fm-up__cap-op { width: 120px; accent-color: var(--up-brand); }
.fm-up__cap-size { width: 160px; }
.fm-up__cap-hint { font-size: 11.5px; opacity: .6; flex-basis: 100%; padding-left: 74px; }
/* Round cells clip their corners, so the buttons sit inside the circle:
   centred, a little below the top where the chord is wide enough. */
.fm-up__slot--round .fm-up__ctrls { left: 50%; top: 14%; transform: translateX(-50%); }
/* Text band at the top: buttons move to the bottom so the band stays visible. */
.fm-up__slot--cap-top .fm-up__ctrls { top: auto; bottom: 6px; }
.fm-up__slot--cap-top .fm-up__layout { top: auto; bottom: 6px; }
.fm-up__slot--round.fm-up__slot--cap-top .fm-up__ctrls { top: auto; bottom: 14%; }

.fm-up__slot--round .fm-up__cap { border-radius: 0; }
.fm-up__cap-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.fm-up__cap-all { background: var(--up-surface); color: var(--up-brand); border: 1px solid var(--up-brand); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: var(--up-font); }
.fm-up__cap-rm { background: var(--up-surface); color: var(--up-accent); border: 1px solid var(--up-accent); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: var(--up-font); }
.fm-up__cap-rm:hover { background: var(--up-accent); color: var(--up-on-primary); }
.fm-up__bulkhint { font-size: 13px; line-height: 1.5; margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--up-brand-tint); color: var(--up-brand); }
.fm-up__bulkhint[hidden] { display: none; }
.fm-up__same { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; margin: 0 0 18px; }
.fm-up__same input { position: absolute; opacity: 0; width: 0; height: 0; }
.fm-up__sameui { width: 40px; height: 22px; border-radius: 999px; background: var(--up-line); position: relative; transition: background .15s ease; flex: 0 0 auto; }
.fm-up__sameui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.fm-up__same input:checked + .fm-up__sameui { background: var(--up-brand); }
.fm-up__same input:checked + .fm-up__sameui::after { transform: translateX(18px); }
.fm-up__pfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.fm-up__pnote { font-size: 12px; opacity: .6; }
.fm-up__upmsg { font-size: 13px; font-weight: 500; color: var(--up-brand); display: inline-flex; align-items: center; gap: 7px; }
.fm-up__upmsg.is-error { color: var(--up-accent); }
.fm-up__upmsg[hidden] { display: none; }
.fm-up__done { background: var(--up-primary); color: var(--up-on-primary); border: 0; border-radius: 999px; padding: 12px 30px; font-size: 15px; font-weight: 500; cursor: pointer; font-family: var(--up-font); }
.fm-up__done[disabled] { opacity: .45; cursor: not-allowed; }
.fm-up-disabled { opacity: .5; cursor: not-allowed; }

/* ---- Editor: one magnet, big ---- */
.fm-up__edit { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: var(--up-scrim); }
.fm-up__edit[hidden] { display: none; }
.fm-up__editbox { background: var(--up-paper); color: var(--up-ink); width: min(960px, 94vw); max-height: 92vh; overflow-y: auto; border-radius: 14px; padding: 18px 24px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 14px; }
.fm-up__edithead { display: flex; align-items: center; justify-content: space-between; }
.fm-up__edittitle { font-size: 18px; font-weight: 600; }
.fm-up__editbody { display: grid; grid-template-columns: auto minmax(280px, 1fr); gap: 24px; align-items: start; }
.fm-up__stagewrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fm-up__stage { --fm-stage: min(420px, 78vw, 60vh); display: flex; align-items: center; justify-content: center; min-width: var(--fm-stage); min-height: var(--fm-stage); }
.fm-up__stage > .fm-up__slot { width: var(--fm-stage); flex: 0 0 auto; }
.fm-up__stage > .fm-up__slot--rect { width: calc(var(--fm-stage) * 2 / 3); }
.fm-up__stage > .fm-up__slot--rect.fm-up__slot--land { width: var(--fm-stage); }
.fm-up__slot.is-staged .fm-up__ctrls { display: none; }
.fm-up__slot.is-staged.is-editing { outline: none; }
.fm-up__stagetools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fm-up__stagezoom { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--up-border); background: var(--up-surface); color: var(--up-ink); font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fm-up__zoomrange { width: 150px; max-width: 40vw; accent-color: var(--up-brand); cursor: pointer; }
.fm-up__stagezoom:hover { border-color: var(--up-brand); color: var(--up-brand); }
.fm-up__stagehint { font-size: 12.5px; opacity: .65; margin: 0; text-align: center; max-width: 420px; }
.fm-up__fillrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fm-up__fillrow[hidden], .fm-up__cuthint[hidden] { display: none; }
.fm-up__fillrow .fm-up__cap-lbl { flex: 0 0 auto; }
.fm-up__cuthint { font-size: 12.5px; margin: 0; text-align: center; max-width: 420px; color: #9a4a1f; font-weight: 600; }
.fm-up__editside { min-width: 0; }
.fm-up__editfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fm-up__editnav { display: flex; gap: 8px; }
.fm-up__editstep { background: var(--up-surface); border: 1px solid var(--up-border); border-radius: 999px; padding: 9px 16px; font-size: 13.5px; cursor: pointer; font-family: var(--up-font); color: var(--up-ink); }
.fm-up__editstep[disabled] { opacity: .4; cursor: default; }
.fm-up__editstep[hidden] { display: none; }
@media (max-width: 760px) {
  .fm-up__edit { position: fixed; align-items: flex-start; }
  /* 100vh on mobile browsers is taller than the visible screen while the address bar shows;
     centering that box pushed the "Magnet 1 of 6" header off the top. dvh = visible height. */
  .fm-up__editbox { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; padding: 0 16px 24px; }
  .fm-up__edithead { position: sticky; top: 0; z-index: 2; background: var(--up-paper); padding: 12px 0 8px; margin-bottom: -6px; }
  .fm-up__editbody { grid-template-columns: 1fr; gap: 16px; }
  .fm-up__stage { --fm-stage: min(340px, 86vw, 46vh); }
  .fm-up__editfoot { flex-direction: column-reverse; align-items: stretch; }
  .fm-up__editnav { justify-content: space-between; }
  .fm-up__editfoot .fm-up__done { width: 100%; }
}
@media (max-width: 600px) {
  .fm-up__pfoot { flex-direction: column-reverse; align-items: stretch; }
  .fm-up__done { width: 100%; }
  /* Phones: two columns whatever the pack, so cells stay big enough to crop
     with a thumb. Beats the inline --fm-cols the JS sets. */
  .fm-up__grid { --fm-cols: 2 !important; gap: 10px; --fm-c: calc((100% - 10px) / 2); }
  .fm-up__grid--same .fm-up__slot:first-child { width: 100%; }
  .fm-up__legend { font-size: 12.5px; padding: 8px 12px; }
}
