/* Fast Simon Merchandising Editor + AI assistant: a working prototype of Bar's design.
   Tokens are the values in Bar's Figma file (Fast Simon, Ready For Dev, Merchandising), read on 2026-11-16.
   Where a value could not be read (the Figma connector hit its monthly cap), it follows the same design language. */
/* Lato Medium (500) is served from fonts/ (Lato 2.015, SIL Open Font License): Google's Lato has no Medium. It joins Google's Lato faces as one family. */
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/lato-medium.woff2') format('woff2'); }
:root {
  --fs-text: #343434;
  --fs-text-2: #666666;
  --fs-text-3: #9a9a9a;
  --fs-line: #c9c9c9;
  --fs-surface: #f8f8f9;
  --fs-white: #ffffff;
  --fs-blue: #399bbf;
  --fs-blue-soft: #dbf1f9;
  --fs-blue-off: #aed1e0;
  --fs-hover: #ededed;
  --fs-green: #23b939;        /* the Promote action badge */
  --fs-green-label: #1fa332;  /* the Promoted label on a grid card */
  --fs-pin: #006af9;          /* Pinned */
  --fs-red: #d6403a;          /* Bury and Hide (red, as the shipped product did) */
  --fs-info-bg: #e6f0fe;
  --fs-info: #004bb1;
  --fs-ok-bg: #eff9f1;
  --fs-ok-line: #9fd2ab;
  --fs-ok: #1f7a3b;
  --fs-tooltip: #343434;
  --fs-scroll: #f4f4f4;
  --fs-font: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --fs-fast: 75ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #dfe1e5; font-family: var(--fs-font); color: var(--fs-text); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.ic { display: block; flex: none; fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The app is held to the screen and clips the stage (2026-12-01): a 1920 px stage the page could see made phones zoom
   out to fit it, which put the scaled editor off screen. */
#app { position: fixed; inset: 0; overflow: hidden; overflow: clip; }
/* On a phone or tablet held upright, the editor shrinks to the screen's width, so a short note sits under it (index.html places it). */
.device-note { display: none; }
@media (pointer: coarse) and (orientation: portrait) {
  .device-note { display: block; position: fixed; left: 16px; right: 16px; margin: 0; text-align: center; font-size: 14px; line-height: 20px; color: var(--fs-text); }
}

/* The 1920 x 963 canvas of the design. Scaled to fit the window when it is smaller. */
.fs-stage { position: absolute; left: 0; top: 0; width: 1920px; height: 963px; overflow: hidden; background: var(--fs-white); transform-origin: 0 0; }

/* Top nav */
.fs-top { position: absolute; left: 0; top: 0; width: 1920px; height: 62px; padding: 0 24px 0 18px; border-bottom: 1px solid var(--fs-line); background: var(--fs-white); display: flex; align-items: center; }
.fs-top .left { display: flex; align-items: center; gap: 24px; }
.fs-circle { width: 32px; height: 32px; border-radius: 100px; border: 1px solid var(--fs-line); display: grid; place-items: center; color: var(--fs-text-2); background: var(--fs-white); transition: background-color var(--fs-fast) ease-out, color var(--fs-fast) ease-out; }
.fs-circle:hover:not(:disabled) { background: var(--fs-hover); }
.fs-circle:disabled { color: #d0d0d0; border-color: #e3e3e3; cursor: default; }
.crumb { display: flex; align-items: center; gap: 16px; font-size: 20px; line-height: 28px; white-space: nowrap; }
.crumb .ic { color: var(--fs-text-2); }
.crumb b { font-weight: 400; color: var(--fs-text); }
.crumb span { color: var(--fs-text-3); }
.fs-top .right { margin-left: auto; display: flex; align-items: center; gap: 70px; }
.search { width: 330px; height: 36px; border-radius: 24px; background: var(--fs-surface); display: flex; align-items: center; gap: 12px; padding: 8px 20px; color: var(--fs-text-2); font-size: 12px; line-height: 16px; letter-spacing: 0.4px; }
.tools { display: flex; align-items: center; gap: 24px; }
.tools .pair { display: flex; gap: 10px; }
.tools .globe { color: #c4c4c4; }
.drop { display: flex; align-items: center; gap: 6px; color: var(--fs-blue); font-size: 14px; line-height: 20px; }
.drop .caret { margin-left: -2px; }
.btn-save { height: 32px; padding: 0 14px 0 12px; border-radius: 100px; border: 1px solid #e3e3e3; color: #b9b9b9; display: flex; align-items: center; gap: 6px; font-size: 14px; transition: background-color var(--fs-fast) ease-out; }
.btn-save.on { border-color: var(--fs-blue); color: var(--fs-blue); }
.btn-save.on:hover { background: #eef7fb; }
.btn-save:disabled { cursor: default; }

/* Body: left nav, side panel, grid */
.fs-body { position: absolute; left: 0; top: 62px; width: 1920px; height: 901px; display: flex; }
.fs-nav { width: 68px; flex: none; padding: 8px 10px; border-right: 1px solid var(--fs-line); background: var(--fs-white); display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 3; }
.nav-item { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: var(--fs-text-2); position: relative; transition: background-color var(--fs-fast) ease-out; }
.nav-item:hover { background: var(--fs-hover); }
.nav-item.on { background: var(--fs-blue-soft); color: var(--fs-blue); }
.nav-item .count { position: absolute; right: 4px; top: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 100px; background: var(--fs-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.nav-item .tip { position: absolute; left: 54px; top: 50%; transform: translateY(-50%); background: var(--fs-tooltip); color: #fff; font-size: 12px; line-height: 16px; padding: 4px 8px; border-radius: 4px; white-space: nowrap; pointer-events: none; opacity: 0; }
.nav-item:hover .tip, .nav-item:focus-visible .tip, .nav-item.tip-on .tip { opacity: 1; }

.fs-panel { width: 400px; flex: none; border-right: 1px solid var(--fs-line); background: var(--fs-white); display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 2; }
.panel-plain { padding: 22px 24px; }
.panel-plain h2 { margin: 0 0 20px; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--fs-text-2); text-align: center; }
.panel-plain p { margin: 0; font-size: 14px; line-height: 20px; color: var(--fs-text-2); }
.panel-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

/* Chat */
.chat-head { height: 76px; flex: none; padding: 0 12px; position: relative; display: flex; align-items: center; gap: 16px; }
.chat-head::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px; background: var(--fs-line); }
.chat-head .who { padding-left: 16px; }
/* Bar's file uses the Material 3 type scale in Lato. Medium (500) comes from fonts/lato-medium.woff2 (see the top of this file). */
.chat-head .t { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px; }
.chat-head .s { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--fs-text-3); }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 0 8px; scroll-behavior: smooth; }
.msgs::-webkit-scrollbar { width: 8px; }
.msgs::-webkit-scrollbar-thumb { background: var(--fs-scroll); border-radius: 200px; }
.msgs::-webkit-scrollbar-track { background: transparent; }
.msg { padding: 0 24px 16px; }
.msg.in { animation: msg-in 180ms ease-out both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }

.welcome { background: var(--fs-surface); border-radius: 12px; padding: 16px 16px 16px; }
.welcome h3 { margin: 6px 0 12px; font-size: 24px; line-height: 32px; font-weight: 400; display: flex; align-items: center; gap: 10px; }
.welcome p { margin: 0; font-size: 14px; line-height: 20px; letter-spacing: 0.25px; }
.welcome .try-title { margin: 16px 0 10px; font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.1px; }
.try { display: flex; flex-direction: column; gap: 8px; }
.try button { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; background: var(--fs-white); border-radius: 8px; padding: 8px 12px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--fs-text); transition: background-color var(--fs-fast) ease-out, box-shadow var(--fs-fast) ease-out; }
.try button .ic { margin-top: 1px; }
.try button:hover { box-shadow: inset 0 0 0 1px var(--fs-blue); }
.try button:disabled { cursor: default; box-shadow: none; }
.try b { font-weight: 700; }
.know { margin-top: 16px; background: var(--fs-info-bg); border-radius: 8px; padding: 10px 12px 12px; }
.know .kt { display: flex; align-items: center; gap: 6px; color: var(--fs-info); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 6px; }
.know ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.know li { display: flex; gap: 4px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--fs-text-2); }
.know li .ic { color: var(--fs-text-2); margin-top: 0; }
.know b { font-weight: 700; color: #4d4d4d; }

.you { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.you .lbl { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--fs-text-2); }
.bubble-you { max-width: 260px; padding: 12px 16px; border-radius: 12px; color: #fff; font-size: 14px; line-height: 20px; letter-spacing: 0.25px; background: linear-gradient(90deg, #399bbf 0%, #399bbf 45%, #8fc3d8 100%); }
.ai-lbl { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--fs-text-2); padding: 0 24px 10px; }
.bubble-ai { background: var(--fs-surface); border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 20px; letter-spacing: 0.035px; white-space: pre-line; }
.bubble-ai b { font-weight: 700; }
.dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #b3b3b3; animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* Action message (measured from Bar's file) */
.act { background: var(--fs-surface); border-radius: 12px; overflow: hidden; }
.act-head { display: flex; align-items: center; gap: 8px; padding: 12px 0 12px 16px; height: 64px; }
.act-head .sum { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.act-head .n { font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: 0.1px; white-space: nowrap; }
.act-head .p { font-size: 14px; line-height: 20px; color: var(--fs-text-2); letter-spacing: 0.25px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 4px 6px; border-radius: 2px; color: #fff; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; }
.badge.promote { background: var(--fs-green); }
.badge.bury, .badge.hide { background: var(--fs-red); }
.badge.pin { background: var(--fs-pin); }
.act.done .badge { opacity: 0.5; }
.act-toggle { width: 40px; height: 40px; border-radius: 100px; display: grid; place-items: center; color: var(--fs-text-2); margin-right: 8px; transition: background-color var(--fs-fast) ease-out; }
.act-toggle:hover { background: var(--fs-hover); }
.act-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; position: relative; }
.act.collapsed .act-list { max-height: 196px; overflow: hidden; }
.act.collapsed .act-list::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(rgba(248, 248, 249, 0), var(--fs-surface)); pointer-events: none; }
.act.done .act-list { opacity: 0.5; }
.item { position: relative; display: flex; gap: 12px; background: var(--fs-white); border-radius: 8px; overflow: hidden; min-height: 126px; padding-right: 12px; transition: opacity 150ms ease-out; }
.item .img { width: 74px; flex: none; align-self: stretch; background-size: cover; background-position: center top; }
.item .info { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 10px; min-width: 0; flex: 1; }
.item .moves { display: flex; align-items: center; gap: 4px; height: 24px; color: var(--fs-text-2); }
.pos { height: 20px; min-width: 20px; padding: 2px 6px; border-radius: 200px; box-shadow: inset 0 0 0 1px var(--fs-line); background: #fff; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; color: var(--fs-text-2); display: inline-flex; align-items: center; justify-content: center; }
.item .title { font-size: 12px; line-height: 16px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .sku { font-size: 12px; line-height: 16px; font-weight: 700; color: var(--fs-text-3); margin-top: -4px; }
.item .price { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; display: flex; gap: 6px; }
.item .price s { color: var(--fs-text-3); font-weight: 400; }
.item .ex { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 100px; display: grid; place-items: center; color: var(--fs-text-3); opacity: 0; transition: opacity var(--fs-fast) ease-out, background-color var(--fs-fast) ease-out, color var(--fs-fast) ease-out; }
.item:hover .ex, .item .ex:focus-visible, .item.out .ex { opacity: 1; }
.item .ex:hover { background: var(--fs-hover); color: var(--fs-text); }
.item.out .img, .item.out .info { opacity: 0.4; }
.item.out .moves .pos, .item.out .moves .ic { visibility: hidden; }
.item .out-note { display: none; font-size: 11px; line-height: 16px; font-weight: 700; color: var(--fs-text-2); }
.item.out .out-note { display: inline; position: absolute; left: 86px; top: 10px; }
.act.done .item .ex, .act.lock .item .ex { display: none; }
.act-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 16px; border-top: 1px solid var(--fs-line); }
.btn-text { font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: 0.1px; padding: 6px 8px; border-radius: 100px; transition: background-color var(--fs-fast) ease-out; }
.btn-text:hover { background: var(--fs-hover); }
.btn-fill { height: 32px; padding: 6px 12px; border-radius: 100px; background: var(--fs-blue); color: #fff; font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: 0.1px; transition: background-color var(--fs-fast) ease-out; }
.btn-fill:hover { background: #2f88a9; }
.btn-fill:disabled { background: var(--fs-blue-off); cursor: default; }
.act-foot .status { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 4px 10px; border-radius: 100px; font-size: 12px; line-height: 16px; font-weight: 700; }
.status.ok { background: var(--fs-ok-bg); box-shadow: inset 0 0 0 1px var(--fs-ok-line); color: var(--fs-ok); }
.status.cancel { background: #f1f1f2; box-shadow: inset 0 0 0 1px #dcdcdc; color: var(--fs-text-2); }
.act-foot.slim { padding: 12px 16px; }

/* Input row */
.input-row { height: 80px; flex: none; padding: 0 12px 0 28px; display: flex; align-items: center; gap: 16px; position: relative; }
.input-row::before { content: ''; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--fs-line); }
.input-row input { flex: 1; height: 40px; border: 0; outline: none; border-radius: 24px; background: var(--fs-surface); padding: 0 24px; font-size: 14px; letter-spacing: 0.25px; color: var(--fs-text); }
.input-row input::placeholder { color: var(--fs-text-2); }
.input-row input:focus-visible { box-shadow: inset 0 0 0 1px var(--fs-blue); }
.send { width: 40px; height: 40px; border-radius: 100px; background: var(--fs-blue); color: #fff; display: grid; place-items: center; transition: background-color var(--fs-fast) ease-out; }
.send:disabled { background: var(--fs-blue-off); cursor: default; }

/* Grid */
.fs-grid { flex: 1; min-width: 0; background: var(--fs-surface); overflow-y: auto; position: relative; scroll-behavior: smooth; }
.fs-grid::-webkit-scrollbar { width: 10px; }
.fs-grid::-webkit-scrollbar-thumb { background: var(--fs-line); border-radius: 200px; border: 2px solid var(--fs-surface); }
.banner { height: 480px; position: relative; overflow: hidden; background: linear-gradient(120deg, #33d6e0 0%, #12c8d6 100%); display: grid; place-items: center; text-align: center; color: #2c3b46; }
.banner .ph { font-size: 64px; line-height: 1; font-weight: 300; letter-spacing: 0.06em; text-transform: uppercase; }
.banner .ph b { display: block; font-weight: 900; font-size: 120px; letter-spacing: 0.02em; color: #fff; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.grid-wrap { width: 1188px; margin: 0 auto; padding: 40px 0 80px; }
.results { font-size: 14px; line-height: 20px; color: var(--fs-text-2); margin-bottom: 24px; }
.results b { color: var(--fs-text); font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(4, 267px); gap: 40px; }
.card { position: relative; border-radius: 8px; }
.card .ph { position: relative; height: 411px; border-radius: 8px; overflow: hidden; background: #e9ebee center top / cover no-repeat; }
.card .lab { position: absolute; left: 0; top: 12px; height: 20px; padding: 2px 6px; border-radius: 0 2px 2px 0; color: #fff; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 0.3px; }
.lab.promoted { background: var(--fs-green-label); }
.lab.pinned { background: var(--fs-pin); }
.lab.buried { background: var(--fs-red); }
.card .no { position: absolute; right: 12px; top: 12px; width: 24px; height: 24px; border-radius: 100px; background: #fff; box-shadow: inset 0 0 0 1px var(--fs-line); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--fs-text-2); }
.card .oos { position: absolute; left: 12px; bottom: 12px; height: 22px; padding: 3px 8px; border-radius: 100px; background: rgba(52, 52, 52, 0.82); color: #fff; font-size: 11px; line-height: 16px; font-weight: 700; }
.card .nm { margin-top: 12px; font-size: 14px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.card .pr { margin-top: 6px; font-size: 14px; line-height: 20px; font-weight: 700; display: flex; gap: 8px; }
.card .pr s { color: var(--fs-text-3); font-weight: 400; }
.card.blink .ph { animation: blink 1.2s ease-in-out 3; }
@keyframes blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(57, 155, 191, 0); } 50% { box-shadow: 0 0 0 4px rgba(57, 155, 191, 0.9); } }
.card.mark .ph { box-shadow: 0 0 0 3px var(--fs-blue); }
.card.leaving { opacity: 0; transform: scale(0.96); transition: opacity 260ms ease-in, transform 260ms ease-in; }

/* Toast after Save */
.toast { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--fs-tooltip); color: #fff; font-size: 14px; line-height: 20px; padding: 10px 16px; border-radius: 8px; display: flex; align-items: center; gap: 8px; z-index: 9; }

/* Calm motion: no movement, no blinking */
@media (prefers-reduced-motion: reduce) {
  .msg.in { animation: none; }
  .dots i { animation: none; opacity: 0.6; }
  .card.blink .ph { animation: none; box-shadow: 0 0 0 3px var(--fs-blue); }
  .msgs, .fs-grid { scroll-behavior: auto; }
}
.still .msg.in, .still .card.blink .ph { animation: none; }
.still .dots i { animation: none; opacity: 0.6; }
.still .card.blink .ph { box-shadow: 0 0 0 3px var(--fs-blue); }
.still .msgs, .still .fs-grid { scroll-behavior: auto; }
