/* Live HTML recreations of the actual app screens, shown inside the phone
   frames instead of PNG screenshots.
   Sharper than images at any size, a fraction of the weight, and editable.

   Colours below are Material 3's ColorScheme.fromSeed(seedColor: Colors.teal)
   in light mode — the same scheme main.dart builds — so these read as the real
   app rather than an approximation. */

.screen {
  --m3-primary: #006a60;
  --m3-primary-container: #9df2e4;
  --m3-on-primary-container: #00201c;
  --m3-surface: #f7faf8;
  --m3-on-surface: #191c1b;
  --m3-outline: #6f7975;
  --m3-outline-variant: #bfc9c4;
  --m3-teal-line: #00897b;

  position: absolute;
  inset: 0;
  background: var(--m3-surface);
  color: var(--m3-on-surface);
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

/* --- chrome --- */
.sb {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 14px 3px;
  font-size: 10px; font-weight: 600; color: var(--m3-on-surface);
  flex: none;
}
.sb-right { display: flex; gap: 3px; align-items: center; opacity: 0.75; letter-spacing: 1px; }

.appbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 12px;
  flex: none;
}
.appbar .title { font-size: 15px; font-weight: 500; flex: 1; }
.appbar .acts { display: flex; gap: 12px; opacity: 0.8; font-size: 13px; }

.screen-body { flex: 1; overflow: hidden; padding: 0 14px; }

/* --- product detail --- */
.pd-head { display: flex; gap: 10px; align-items: flex-start; }
.pd-thumb {
  width: 40px; height: 40px; border-radius: 7px; flex: none;
  background: var(--m3-primary-container);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.pd-name { font-size: 14px; font-weight: 700; line-height: 1.25; }
.pd-ean { color: var(--m3-outline); font-size: 9.5px; margin-top: 7px; }

/* price chart — inline SVG mirrors the CustomPainter: teal polyline, dots,
   grey baseline, min/max labels */
.pd-chart { margin: 14px 0 8px; }
.pd-chart svg { display: block; width: 100%; height: auto; }

.pd-delta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: #b3261e;
}
.pd-delta.down { color: #146c2e; }

.pd-section { font-size: 12px; font-weight: 600; margin: 16px 0 6px; }

.pd-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0;
}
.pd-row .when { font-size: 11px; }
.pd-row .where { font-size: 9.5px; color: var(--m3-outline); }
.pd-row .amt { font-size: 11.5px; font-weight: 700; }

/* --- search --- */
.search-field {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--m3-outline-variant);
  border-radius: 4px; padding: 9px 10px; margin-bottom: 4px;
  color: var(--m3-outline); font-size: 11px;
}
.res {
  display: flex; gap: 9px; align-items: center;
  padding: 8px 0;
}
.res-thumb {
  width: 30px; height: 30px; border-radius: 4px; flex: none;
  background: var(--m3-primary-container);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.res-name { font-size: 11.5px; font-weight: 500; }
.res-sub { font-size: 9.5px; color: var(--m3-outline); line-height: 1.3; margin-top: 1px; }

/* --- scan review --- */
.rev-store {
  border: 1px solid var(--m3-outline-variant);
  border-radius: 4px; padding: 8px 10px; font-size: 11px;
  display: flex; justify-content: space-between; color: var(--m3-on-surface);
}
.rev-store .lbl { color: var(--m3-outline); font-size: 9px; }
.rev-item {
  display: flex; gap: 8px; align-items: center; padding: 7px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.rev-item .nm {
  flex: 1; font-size: 11px;
  border-bottom: 1px dashed var(--m3-outline-variant); padding-bottom: 2px;
}
.rev-item .pr {
  width: 54px; text-align: right; font-size: 11px; font-weight: 600;
  border-bottom: 1px dashed var(--m3-outline-variant); padding-bottom: 2px;
}
.rev-badge {
  display: inline-block; font-size: 8px; font-weight: 700;
  color: var(--m3-primary); background: var(--m3-primary-container);
  border-radius: 100px; padding: 1px 6px; margin-left: 5px;
  vertical-align: middle; letter-spacing: 0.3px;
}

/* --- floating action button --- */
.fab {
  position: absolute; right: 12px; bottom: 14px;
  background: var(--m3-primary-container);
  color: var(--m3-on-primary-container);
  border-radius: 14px; padding: 10px 14px;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

/* --- camera screen --- */
.cam {
  position: absolute; inset: 0; background: #111;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
.cam-receipt {
  width: 62%; aspect-ratio: 1 / 1.9; border-radius: 3px;
  background: linear-gradient(#fdfdfb, #f2f2ee);
  padding: 10px 9px; display: flex; flex-direction: column; gap: 4px;
  transform: rotate(-1.2deg);
  box-shadow: 0 8px 26px rgba(0,0,0,0.5);
}
.cam-receipt i {
  display: block; height: 3px; border-radius: 2px; background: #cfcfc9;
}
.cam-receipt i.short { width: 45%; }
.cam-receipt i.mid { width: 72%; }
.cam-receipt i.head { height: 5px; width: 60%; background: #9a9a94; margin-bottom: 3px; }
.cam-guides { position: absolute; inset: 26px; pointer-events: none; }
.cam-guides span {
  position: absolute; width: 20px; height: 20px;
  border: 2px solid var(--m3-primary-container); opacity: 0.9;
}
.cam-guides span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.cam-guides span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.cam-guides span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.cam-guides span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.cam-hint {
  position: absolute; bottom: 16px; left: 14px; right: 14px;
  background: rgba(0,0,0,0.72); color: #fff;
  border-radius: 8px; padding: 7px 10px;
  font-size: 9.5px; text-align: center;
}
