/* innuga.com · the order pop-up (every package button) and the brand-materials field (order + audit forms)
   om- = order modal, at- = attachments. On top of tokens.css and site.css.
   Paper panel over an Ink scrim; one step at a time, 3 to 4 questions a step, progress on top, Back and Next at the bottom. */


/* ===== shell ===== */
.om { position: fixed; inset: 0; z-index: 200; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; /* one cell the size of the screen, so the panel can cap its height and scroll inside */ padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.om[hidden] { display: none; }
.om-scrim { position: absolute; inset: 0; background: rgb(27 21 16 / 0.62); }
.om-panel { position: relative; width: min(100%, 44rem); max-height: min(100%, 52rem); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--paper); color: var(--ink); }
html.om-open { overflow: hidden; }

.om-top { padding: 22px 28px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 16px; }
.om-step { font: 500 var(--fs-caption)/1.2 var(--font-text); letter-spacing: 0.01em; color: var(--stone); font-variant-numeric: tabular-nums; }
.om-x { width: 44px; height: 44px; margin: -6px -10px -6px 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.om-x svg { width: 18px; height: 18px; }
.om-x:focus-visible { outline: 3px solid var(--ink); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) { .om-x:hover { background: var(--sand); } }
.om-bar { grid-column: 1 / -1; height: 6px; background: var(--sand); overflow: hidden; }
.om-bar i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform 420ms var(--ease-out); }
.om-done-on .om-bar i { background: var(--green); }

.om-form { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 28px 28px 8px; }
.om-s { display: grid; gap: var(--s-3); align-content: start; }
.om-s[hidden] { display: none; }
.om-h { font: 800 clamp(1.75rem, 3.4vw, 2.375rem)/1 var(--font-display); letter-spacing: -0.035em; text-wrap: balance; }
.om-h:focus { outline: none; }
.om-lead { margin-top: -8px; color: var(--stone); max-width: 52ch; }

.om-nav { padding: 18px 28px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--sand); }
.om-nav[hidden] { display: none; }
.om-back { min-height: 44px; padding: 10px 2px; border: 0; background: transparent; color: var(--ink); font: 500 1rem/1 var(--font-text); cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; text-decoration-color: var(--amber); }
.om-back[hidden] { visibility: hidden; display: block; }
.om-back:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.om-next { margin-left: auto; }
.om-next[disabled] { opacity: 0.6; cursor: progress; }

/* ===== fields (own copies, so the pop-up looks the same on every page) ===== */
.om-f { display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.om-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.om-f > label, .om-f > legend { padding: 0; font: 500 1rem/1.3 var(--font-text); }
.om-f > legend { margin-bottom: 8px; }
.om-opt { font-weight: 400; color: var(--stone); }
.om-f input[type="text"], .om-f input[type="email"], .om-f input[type="url"], .om-f textarea { width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: var(--r-field); background: var(--white); color: var(--ink); font: 400 1.0625rem/1.2 var(--font-text); }
.om-f textarea { padding: 14px 16px; min-height: 112px; line-height: 1.45; resize: vertical; }
.om-f input::placeholder, .om-f textarea::placeholder { color: var(--stone); opacity: 0.75; }
.om-f input:focus-visible, .om-f textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 0; }
.om-help { font-size: 0.9375rem; line-height: 1.4; color: var(--stone); }
.om-err { display: flex; gap: 8px; align-items: baseline; font: 500 0.9375rem/1.35 var(--font-text); }
.om-err:empty { display: none; }
.om-err::before { content: "!"; content: "!" / ""; flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ember); color: var(--white); font: 800 0.75rem/1 var(--font-text); transform: translateY(2px); }
.om-f.is-bad input[type="text"], .om-f.is-bad input[type="email"], .om-f.is-bad input[type="url"] { outline: 2px solid var(--ember); outline-offset: 0; }
.om-f.is-bad .om-pill span, .om-f.is-bad .om-pk span { outline: 2px solid var(--ember); outline-offset: -2px; }

.om-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.om-pill, .om-pk { position: relative; display: inline-flex; }
.om-pill input, .om-pk input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.om-pill span { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 20px; border-radius: var(--r-pill); background: var(--white); font: 500 1rem/1.2 var(--font-text); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.om-pill input:checked + span { background: var(--ink); color: var(--paper); }
.om-pill input:focus-visible + span, .om-pk input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.om-pill input:active + span, .om-pk input:active + span { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .om-pill input:not(:checked):hover + span, .om-pk input:not(:checked):hover + span { background: var(--sand); } }

/* package cards: name, price for the chosen plan, one line of what is in it */
.om-pks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.om-pk span { width: 100%; display: grid; gap: 4px; align-content: start; padding: 14px 16px; background: var(--white); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.om-pk b { font: 800 1.375rem/1.1 var(--font-display); letter-spacing: -0.02em; }
.om-pk em { font: 500 0.9375rem/1.3 var(--font-text); font-style: normal; font-variant-numeric: tabular-nums; }
.om-pk small { font-size: 0.875rem; line-height: 1.35; color: var(--stone); }
.om-pk input:checked + span { background: var(--ink); color: var(--paper); }
.om-pk input:checked + span small { color: var(--mist); }
.om-plan[hidden] { display: none; }

/* the last step: a short summary with a way back to each part; the package and what it costs come first and stand out */
.om-sum-h { font: 800 1.375rem/1.1 var(--font-display); letter-spacing: -0.02em; margin-top: 12px; }
.om-sum-h .om-opt { font: 400 1rem/1 var(--font-text); letter-spacing: 0; }
.om-sum { margin: 0; display: grid; background: var(--white); }
.om-sum .om-sum-pk { background: var(--ink); color: var(--paper); border-top: 0; }
.om-sum .om-sum-pk dt { color: var(--mist); }
.om-sum .om-sum-pk dd b { display: block; font: 800 1.375rem/1.1 var(--font-display); letter-spacing: -0.02em; margin-bottom: 4px; }
.om-sum .om-sum-pk dd small { display: block; margin-top: 4px; font-weight: 400; font-size: 0.875rem; color: var(--mist); }
.om-sum .om-sum-pk button { color: var(--paper); }
.om-sum .om-sum-pk button:focus-visible { outline-color: var(--paper); }
.om-sum div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 16px; border-top: 1px solid var(--paper); }
.om-sum div:first-child { border-top: 0; }
.om-sum dt { font-size: 0.875rem; color: var(--stone); }
.om-sum dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.om-sum button { border: 0; background: transparent; padding: 4px 0; min-height: 32px; font: 500 0.875rem/1 var(--font-text); color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.om-sum button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.om-notice { font-size: 0.9375rem; color: var(--stone); }
.om-ferr { background: var(--white); padding: 14px 18px; display: flex; gap: 10px; align-items: baseline; }
.om-ferr[hidden] { display: none; }
.om-ferr::before { content: "!"; content: "!" / ""; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ember); color: var(--white); font: 800 0.8125rem/1 var(--font-text); transform: translateY(3px); }

/* thank you */
.om-done { justify-items: start; padding-bottom: 20px; }
.om-done .chip { margin-bottom: 4px; }
.om-done p { max-width: 50ch; font-size: var(--fs-lead); line-height: 1.45; }
.om-done p b { font-weight: 500; }
.om-next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.om-next-list li { background: var(--white); padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: baseline; }
.om-next-list li::before { content: ""; width: 14px; height: 13px; background: var(--ink); transform: translateY(1px);
  clip-path: polygon(47.3% 0, 52.7% 0, 100% 100%, 76.4% 100%, 50% 46%, 23.6% 100%, 0 100%); }
.om-done-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 8px; }

.om-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: honeypot, off screen */

/* ===== brand materials: links and files, both forms ===== */
.at { display: grid; gap: 10px; min-width: 0; }
.at-drop { position: relative; display: grid; justify-items: start; gap: 6px; padding: 18px 20px; border-radius: var(--r-field); background: var(--white); box-shadow: inset 0 0 0 2px var(--sand); transition: box-shadow var(--t-hover) ease, background-color var(--t-hover) ease; } /* taste-skill-ignore: drop zone outline */
.at-drop.is-over { box-shadow: inset 0 0 0 2px var(--ink); background: var(--paper); } /* taste-skill-ignore: drop zone outline */
.at-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.at-drop:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.at-drop b { font-weight: 500; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.at-drop small { font-size: 0.875rem; color: var(--stone); }
.at-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.at-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; background: var(--white); padding: 8px 8px 8px 14px; }
.at-list .at-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.at-list .at-s { font-size: 0.875rem; color: var(--stone); font-variant-numeric: tabular-nums; }
.at-list button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.at-list button svg { width: 14px; height: 14px; }
.at-list button:focus-visible { outline: 3px solid var(--ink); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) { .at-list button:hover { background: var(--sand); } }
.at-total { font-size: 0.875rem; color: var(--stone); font-variant-numeric: tabular-nums; }
.at-total.is-over { color: var(--ink); font-weight: 500; }

/* ===== small screens: the pop-up takes the whole screen ===== */
@media (max-width: 600px) {
  .om { padding: 0; place-items: stretch; }
  .om-panel { width: 100%; max-height: 100%; height: 100%; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .om-top { padding: 14px 20px 0; }
  .om-form { padding: 24px 20px 8px; }
  .om-nav { padding: 14px 20px 18px; }
  .om-row, .om-pks { grid-template-columns: 1fr; }
  .om-sum div { grid-template-columns: minmax(0, 1fr) auto; }
  .om-sum dt { grid-column: 1 / -1; }
}

/* ===== motion ===== */
/* ===== "Talk to us": the same shell on one screen, no progress bar, the send button inside the form ===== */
.cm-panel { width: min(100%, 40rem); grid-template-rows: auto minmax(0, 1fr); }
.cm-top { padding-bottom: 0; }
.cm-top .om-x { grid-column: 2; }
.cm-form { padding: 4px 28px 28px; }
.cm-ask .om-notice { margin-top: -4px; }
.cm-acts { display: flex; padding-top: 4px; }
.cm-done { padding-bottom: 8px; }
@media (max-width: 600px) { .cm-form { padding: 8px 20px 24px; } }

@media (prefers-reduced-motion: no-preference) {
  .om.is-in .om-scrim { animation: om-fade 240ms ease both; }
  .om.is-in .om-panel { animation: om-rise 420ms var(--ease-out) both; }
  .om-s.is-fwd { animation: om-fwd 320ms var(--ease-out) both; }
  .cm-done.is-fwd { animation: om-up 420ms var(--ease-out) both; } /* the thank-you settles in place: one screen, so nothing slides sideways */
  .om-s.is-bwd { animation: om-bwd 320ms var(--ease-out) both; }
  .om-done.is-fwd .om-next-list li { animation: om-up 500ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
}
@media (prefers-reduced-motion: reduce) {
  .om.is-in .om-panel, .om.is-in .om-scrim, .om-s.is-fwd, .om-s.is-bwd { animation: om-fade 200ms ease both; }
  .om-bar i { transition: none; }
}
@keyframes om-fade { from { opacity: 0; } }
@keyframes om-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes om-fwd { from { opacity: 0; transform: translateX(24px); } }
@keyframes om-bwd { from { opacity: 0; transform: translateX(-24px); } }
@keyframes om-up { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-contrast: more) {
  .om-panel, .om-pk span, .om-pill span, .om-f input, .om-f textarea, .om-sum, .at-list li { box-shadow: inset 0 0 0 2px var(--ink); } /* taste-skill-ignore: contrast mode */
}

/* Preview copies only: says plainly that the request did not leave the page */
.om-done .pv-note, .done .pv-note { font-size: var(--fs-caption); line-height: 1.4; color: var(--ink); background: var(--white); border: 1.5px dashed var(--ink); padding: 8px 12px; max-width: 46ch; margin: 0; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
