/* AisleWatch motion pieces (home): the theft alert from first alert to evidence pack, and the store heatmap before and
   after a campaign. Timings live in the markup (data-at / data-off, seconds); js/motion.js adds .on.
   Reduced motion shows the final frame. Heat cells are flat fills in four steps. */

/* Shared motion states */
.mo { margin: 0; position: relative; }
.mo-ready [data-at]:not(.is) { transition: opacity .45s ease, transform .45s ease; }
.mo-ready [data-at]:not(.on):not(.is) { opacity: 0; transform: translateY(6px); pointer-events: none; }
.mo.m-reset *, .mo.m-static * { transition: none !important; animation: none !important; }
.mo:not(.mo-ready) [data-off] { display: none; }

/* Theft alert */
.fwa .rt-media { display: block; aspect-ratio: 16 / 9; }
.fwa .rt-media img { position: absolute; inset: 0; height: 100%; }
.mo-ready .fwa-b { transition: opacity .8s ease; }
.mo-ready .fwa-b:not(.on) { transform: none; }
.fwa .rt-media .cap { z-index: 1; }
.fwa-pill { display: grid; }
.fwa-pill i { grid-area: 1 / 1; font-style: normal; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 5px; white-space: nowrap; justify-self: start; color: var(--coral-2); background: var(--coral-soft); }
.fwa-pill i.wait { color: var(--wait); background: var(--wait-soft); }
.fwa-pill i.ok { color: var(--ok); background: var(--ok-soft); }
.fwa .rt-what { margin-top: 2px !important; }
.fwa-esc { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.fwa-esc li:first-child { font-weight: 400; color: var(--text-2); }
.fwa-r { font-style: normal; font-weight: 700; font-size: 12px; margin-left: 4px; }
.fwa-r.warn { color: var(--wait); }
.fwa-r.ok { color: var(--ok); }
.fwa-esc li:last-child span:last-child { color: var(--text); font-weight: 600; }

/* Store heatmap, before and after */
.fwh-app { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fwh-tabs { display: flex; align-items: center; gap: 18px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.fwh-n { color: var(--text); font-family: var(--head); font-weight: 700; margin-right: auto; padding: 10px 0 8px; }
.fwh-tl { display: flex; gap: 18px; }
/* r5: real tabs (role=tab buttons) for the two campaign windows */
.fwh-t { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin: 0; padding: 10px 0 8px; font: inherit; font-weight: 600; color: var(--text-3); cursor: pointer; transition: color .2s, border-color .2s; }
.fwh-t:hover { color: var(--text); }
.fwh-t[aria-selected="true"] { color: var(--text); border-bottom-color: var(--coral); }
.fwh-t:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 2px; }
.fwh .fwh-a, .fwh .fwh-b, .fwh .fwh-cap { transition: opacity .6s ease; }
.fwh[data-view="live"] .fwh-a, .fwh[data-view="before"] .fwh-b, .fwh[data-view="before"] .fwh-cap { opacity: 0; }
.fwh[data-view="before"] .fv-l, .fwh[data-view="live"] .fv-b { display: none; }
@media (prefers-reduced-motion: reduce) { .fwh .fwh-a, .fwh .fwh-b, .fwh .fwh-cap { transition: none; } }
.fwh-map svg { display: block; width: 100%; height: auto; }
.fwh-map .fx { fill: #D5DBD8; }
.fwh-map .h1 { fill: #F7D046; fill-opacity: .55; }
.fwh-map .h2 { fill: #F29A2E; fill-opacity: .55; }
.fwh-map .h3 { fill: #E8472A; fill-opacity: .55; }
.fwh-map .h4 { fill: #CF3A1F; fill-opacity: .8; }
.fwh-key rect { fill-opacity: 1 !important; }
.fwh-cap { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 6 4; }
.fwh-kpi { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.fwh-kpi div { padding: 10px 14px; border-left: 1px solid var(--line); }
.fwh-kpi div:first-child { border-left: 0; }
.fwh-kpi div > span { display: block; font-size: 12.5px; color: var(--text-3); }
.fwh-kpi b { font: 700 20px/1.2 var(--head); color: var(--text); font-variant-numeric: tabular-nums; }
.fwh-kpi em { font-style: normal; color: var(--ok); font-size: 14px; font-weight: 600; font-family: var(--body, inherit); }

@media (min-width: 1081px) and (max-height: 820px) {
  .fwa .rt-media { aspect-ratio: 16 / 8; }
  .fwa-esc { margin-top: 6px; padding-top: 6px; gap: 2px; }
  .fwh-kpi div { padding: 7px 12px; }
  .fwh-kpi b { font-size: 18px; }
}
@media (max-width: 600px) {
  .fwh-tabs { gap: 10px; font-size: 13px; padding: 0 10px; }
  .fwh-tl { gap: 12px; }
  .fwh-kpi div { padding: 8px 10px; }
  .fwh-kpi div > span { font-size: 11.5px; }
  .fwh-kpi b { font-size: 16px; }
  .fwh-kpi em { font-size: 12px; }
}
