/* TrackRestocks Stage 22: item cards that read at a glance.
   One status line, the price with where/when, a single strip with a cell per store (a coloured top edge per status),
   and one line for the check time and schedule. Mobile first. */

.s22-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.s22-card > * { margin: 0; }

/* identity: small box-drawing tile beside the name, instead of a large empty picture area */
.s22-head { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; }
.s22-thumb { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2);
  display: grid; place-items: center; overflow: hidden; }
.s22-thumb img { width: 30px; height: 30px; opacity: .75; }
.s22-thumb.has-photo { background: #F4F4F6; border-color: transparent; }
.s22-thumb.has-photo img { width: 100%; height: 100%; object-fit: contain; opacity: 1; }
.s22-id { min-width: 0; }
.s22-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 3px; font-size: 12.5px; color: var(--dim); }
.s22-cat { color: var(--muted); font-weight: 600; }
.s22-new { color: #A5B4FC; font-weight: 600; }
.s22-title { margin: 0; font-size: 16.5px; line-height: 1.3; }
.s22-title a { color: var(--text); text-decoration: none; }
.s22-title a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* status: a plain sentence with a dot, not a pill */
.s16-status.s22-status { margin: 0; padding: 0; border: 0; background: none; border-radius: 0;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.s16-status.s22-status.is-out { color: var(--muted); }

/* price */
.s22-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.s22-price b { font-size: 26px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.s22-price span { font-size: 13px; color: var(--dim); }
.s22-price.is-in_stock b { color: #6EE7B7; }
.s22-price.is-msrp b { color: var(--muted); }
.s22-msrp { margin-top: -8px !important; font-size: 12.5px; color: var(--dim); }

/* store strip: one row, one cell per store */
.s22-strip { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.015); }
.s22-strip li { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 10px 10px 9px;
  border-top: 3px solid #52525B; min-width: 0; }
.s22-strip li + li { box-shadow: inset 1px 0 0 var(--line-2); }
.s22-strip li::before { content: none; }
.s22-store { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s22-sv { font-size: 14px; font-weight: 700; color: var(--text); }
.s22-at { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.s22-strip li.is-in { border-top-color: var(--green); background: rgba(16,185,129,.10); }
.s22-strip li.is-in .s22-sv { color: #6EE7B7; }
.s22-strip li.is-out .s22-sv { color: var(--muted); font-weight: 600; }
.s22-strip li.is-unread { border-top: 3px dashed var(--amber); }
.s22-strip li.is-unread .s22-sv { color: var(--amber); font-weight: 600; }
.s22-strip li.is-stale .s22-at { color: var(--amber); }
.s22-strip .s18-buy { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #6EE7B7; }

.s22-when { margin-top: -4px !important; font-size: 12.5px; color: var(--dim); }
.s22-pickup { font-size: 12.5px; color: #A5B4FC; }

/* footer: history link and the alert button on one line */
.s22-foot { margin-top: auto !important; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px solid var(--line); }
.s22-hist { font-size: 13px; color: var(--muted); text-underline-offset: 3px; }
.s22-hist:hover { color: var(--text); }
.s22-alert { min-width: 120px; }
.s22-hist:focus-visible, .s22-title a:focus-visible, .s22-alert:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; border-radius: 4px; }

@media (min-width: 900px) {
  .s22-card { padding: 20px; }
}

/* the instant answer under the hero uses the same strip */
.s18-answer-body .s22-strip { margin-top: 12px; }
.s18-answer-body .s22-when { margin: 8px 0 0 !important; }
.s18-answer-body .s22-status { margin-top: 6px; }
.s18-answer-card:has(.is-ph) { grid-template-columns: 64px 1fr; }
.s18-answer-img.is-ph { width: 64px; height: 64px; padding: 14px; background: var(--panel-2); border: 1px solid var(--line-2); opacity: .8; }
@media (max-width: 640px) {
  .s18-answer-card:has(.is-ph) { grid-template-columns: 52px 1fr; gap: 12px; }
  .s18-answer-img.is-ph { width: 52px; height: 52px; padding: 11px; }
}

/* Stage 23: Amazon off */
.s23-more { align-self: center; font-size: 13px; color: var(--dim); padding: 0 4px; }
.s23-offnote { color: var(--amber); }
.s23-dead { margin: 10px 0 0; font-size: 13px; }

/* "✓ Tracking" state: the button gets s11-btn-ghost on top of s11-btn-green, so give it readable colours */
.s22-foot [data-track][aria-pressed="true"],
.s18-answer-cta [data-track][aria-pressed="true"] { color: #6EE7B7; border-color: rgba(16,185,129,.5); background: rgba(16,185,129,.10); }
