/* PCE Store, scanned microchips screen.
   Styles for the components in app_pce_store_scanned, from the approved
   spec. Loaded by the PCEStore Layout when one of them is on the page, after
   pce-store-scan.css. Bump ASSET_REV in pceStoreLayout.isml after editing. */

/* This screen has 19px side margins (352px of content in a 390px frame). */
:root { --ps-gutter: 19px; }
html.pce-app {
  --ps-gutter: max(19px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}

/* ---------- Microchip records ---------- */

.ps-records { margin-top: 16px; }

.ps-records__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ps-records__empty {
  margin: 0;
  padding: 20px 16px;
  border: 1px dashed var(--ps-outline);
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 20px;
  text-align: center;
  color: var(--ps-text);
}

.ps-records__empty[hidden] { display: none; }

.ps-record {
  border: 1px solid var(--ps-ink);
  background: #FFFFFF;
}

.ps-record__header {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 4px 0 16px;
  background: var(--ps-ink);
  font-family: var(--ps-mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.ps-record__title { flex: 1; }

/* The cross is small in the design; the button around it is a full touch target. */
.ps-record__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #FFFFFF;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ps-record__remove svg { width: 11.5px; height: 11.5px; }
.ps-record__remove:active { opacity: 0.5; }

.ps-record__body {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
}

.ps-record__label {
  font-family: var(--ps-mono);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B7C8C;
}

.ps-record__number {
  margin-top: 5px;
  font-family: var(--ps-mono);
  font-weight: 600;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: 0.05em;
  color: var(--ps-ink);
  word-break: break-all;
}

.ps-record__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-top: 14px;
}

.ps-record__state {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 17px;
  color: #C7860A;
}

.ps-record__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #C7860A;
}

.ps-record__badge {
  flex: none;
  padding: 4px 8px;
  border-radius: 4px;
  background: #FBEFD8;
  font-weight: 600;
  font-size: 11.5px;
  line-height: 14px;
  color: #C7860A;
}

/* A record leaves by fading, so removing one does not look like a jump. */
.ps-record--leaving {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 160ms ease-in, transform 160ms ease-in;
}

/* ---------- Session summary ---------- */

.ps-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid var(--ps-outline);
  border-radius: 9px;
  background: #F2F6F8;
}

.ps-summary__label {
  font-weight: 600;
  font-size: 14px;
  line-height: 18px;
  color: var(--ps-ink);
}

.ps-summary__value {
  font-family: var(--ps-mono);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 13px;
  letter-spacing: 0.12em;
  text-align: right;
  color: #6B7C8C;
}

@media (prefers-reduced-motion: reduce) {
  .ps-record--leaving { transition: none; }
}
